safe/definitions/field_groups/gender_vulnerability_field_group.py
# coding=utf-8
"""Gender related field groups.
Whilst gender_field_group.py breaks down all ages, this grouping looks at
especially vulnerable field groups (pregnant, lactating).
"""
from safe.definitions.fields import (
child_bearing_age_count_field,
lactating_count_field,
pregnant_count_field)
from safe.definitions.fields import (
child_bearing_age_displaced_count_field,
pregnant_displaced_count_field,
lactating_displaced_count_field)
from safe.definitions.fields import (
child_bearing_age_ratio_field,
lactating_ratio_field,
pregnant_ratio_field)
from safe.utilities.i18n import tr
__copyright__ = "Copyright 2017, The InaSAFE Project"
__license__ = "GPL version 3"
__email__ = "info@inasafe.org"
__revision__ = '$Format:%H$'
gender_vulnerability_ratio_group = {
'key': 'gender_vulnerability_ratio_group',
'name': tr('Gender Vulnerability Ratio'),
'description': tr(
'Demographic breakdown to use for displaced population based on '
'gender. Vulnerability ratio groupings are used when there '
'is a vector aggregation layer that contains detailed demographic '
'information (as ratios) about the population living in each '
'administrative or census area. These ratios are then applied to the '
'count of displaced population per aggregation area to provide a more '
'detailed break down of the number of people displaced in each '
'gender profile. Vulnerable segments of the population '
'can include criteria like the number of infants, the number of '
'elderly, the number of disabled people, and so on.'),
'fields': [
child_bearing_age_ratio_field,
pregnant_ratio_field,
lactating_ratio_field
],
# Exclusive = False: able to put same layer's field to some fields
# Exclusive = True: only able to put a layer's field to a field
'exclusive': False,
'notes': [],
'constraints': {
'sum': {
'kwargs': {
'max': 1
},
'message': tr(
'The sum of gender ratios should not be more than 1.')
}
}
}
gender_vulnerability_count_group = {
'key': 'gender_vulnerability_count_group',
'name': tr('Gender Vulnerability Count'),
'description': tr(
'Demographic breakdown to use for displaced population based on '
'gender. Vulnerability count groupings are used when there '
'is a vector exposure layer that contains detailed demographic '
'information (as counts) about the population living in each '
'area. These counts are then used to calculate the ratio of '
'vulnerable population sectors for each aggregation area. These are '
'then used to produce a detailed break down of the number of '
'displaced people in each gender profile. Vulnerable segments '
'of the population can include criteria like the number of infants, '
'the number of pregnant women, lactating women and so on.'),
'fields': [
child_bearing_age_count_field,
pregnant_count_field,
lactating_count_field
],
# Exclusive = False: able to put same layer's field to some fields
# Exclusive = True: only able to put a layer's field to a field
'exclusive': False,
'notes': []
}
gender_vulnerability_displaced_count_group = {
'key': 'gender_vulnerability_displaced_count_group',
'name': tr('Gender Vulnerability Displaced Count'),
'header_name': tr('Gender Vulnerability'),
'description': tr(
'Demographic breakdown to use for displaced population based on '
'gender. These data are presented in the report as the number '
'of displaced people in each vulnerable gender group. Gender based '
'vulnerable segments of the population can include criteria like '
'the number of pregnant women, lactating women and so on.'),
'fields': [
child_bearing_age_displaced_count_field,
pregnant_displaced_count_field,
lactating_displaced_count_field
],
# Exclusive = False: able to put same layer's field to some fields
# Exclusive = True: only able to put a layer's field to a field
'exclusive': False,
'notes': []
}