Skip to content

Commit

Permalink
Merge pull request #116 from unicef-drp/eu_enlargement
Browse files Browse the repository at this point in the history
New country grouping & added sex ratio to gender
  • Loading branch information
Amy-Reidy authored Feb 12, 2025
2 parents 4aaa592 + 396c20a commit 813892a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 57 deletions.
38 changes: 36 additions & 2 deletions dash_service/pages/transmonee.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
years = list(range(2000, 2025))

# some indexes have been listed as ratios in SDG database so we need to specify not to round these indicators
codes_3_decimals = ['HVA_EPI_INF_RT_0-14', 'EDU_SE_TOT_GPI_L2_MAT', 'EDU_SE_TOT_GPI_L2_REA', 'EDU_SE_AGP_CPRA_L3']
codes_3_decimals = ['HVA_EPI_INF_RT_0-14', 'EDU_SE_TOT_GPI_L2_MAT', 'EDU_SE_TOT_GPI_L2_REA', 'EDU_SE_AGP_CPRA_L3', 'DM_SP_POP_BRTH_MF']
codes_1_decimal = ['DM_FRATE_COMP', 'PV_GINI_COEF']

# a key:value dictionary of countries where the 'key' is the country name as displayed in the selection
Expand Down Expand Up @@ -447,6 +447,19 @@
"Sweden",
]

eu_enlargement_countries = [
"Albania",
"Bosnia and Herzegovina",
"Georgia",
"Kosovo (UNSCR 1244)",
"Montenegro",
"North Macedonia",
"Republic of Moldova",
"Serbia",
"Türkiye",
"Ukraine",
]

efta_countries = ["Iceland", "Liechtenstein", "Norway", "Switzerland"]


Expand Down Expand Up @@ -692,6 +705,18 @@ def update_country_dropdown(country_group):
{"label": country, "value": country}
for country in eu_countries + efta_countries
]
elif country_group == "eu_enlargement":
options = [{"label": country, "value": country} for country in eu_enlargement_countries]
elif country_group == "eu + enlargement":
options = [
{"label": country, "value": country}
for country in eu_countries + eu_enlargement_countries
]
elif country_group == "eu + enlargement + efta":
options = [
{"label": country, "value": country}
for country in eu_countries + eu_enlargement_countries + efta_countries
]
elif country_group == "central_asia":
options = [{"label": country, "value": country} for country in central_asia]
elif country_group == "eastern_europe":
Expand Down Expand Up @@ -1234,7 +1259,7 @@ def get_base_layout(**kwargs):
),
dbc.Col(
html.Div([
html.H2("TransMonEE Dashboard", style={'color': 'white', 'marginTop': '0.75em', 'marginBottom': '0.2em','fontWeight': 'bold'}),
html.H2("TransMonEE Regional Dashboard on Children", style={'color': 'white', 'marginTop': '0.75em', 'marginBottom': '0.2em','fontWeight': 'bold'}),
html.H5("Monitoring child rights data in Europe and Central Asia", style={'color': 'white', 'marginTop': '0.2em'})
]),
lg=7, md=8, sm=12,
Expand Down Expand Up @@ -1616,8 +1641,11 @@ def get_base_layout(**kwargs):
{"label": "All countries", "value": "all"},
{"label": "UNICEF programme countries", "value": "unicef"},
{"label": "EU countries", "value": "eu"},
{"label": "EU enlargement countries", "value": "eu_enlargement"},
{"label": "EU + EU enlargement countries", "value": "eu + enlargement"},
{"label": "EFTA countries", "value": "efta"},
{"label": "EU + EFTA countries", "value": "eu + efta"},
{"label": "EU + EU enlargement + EFTA countries", "value": "eu + enlargement + efta"},
{"label": "Central Asian countries", "value": "central_asia"},
{"label": "Eastern European countries", "value": "eastern_europe"},
{"label": "Western European countries", "value": "western_europe"},
Expand Down Expand Up @@ -2791,10 +2819,16 @@ def get_filters(years_slider, countries, country_group):
countries = unicef_country_prog
elif country_group == "eu":
countries = eu_countries
elif country_group == "eu_enlargement":
countries = eu_enlargement_countries
elif country_group == "eu + enlargement":
countries = eu_countries + eu_enlargement_countries
elif country_group == "efta":
countries = efta_countries
elif country_group == "eu + efta":
countries = eu_countries + efta_countries
elif country_group == "eu + enlargement + efta":
countries = eu_countries + eu_enlargement_countries + efta_countries
elif country_group == "central_asia":
countries = central_asia
elif country_group == "eastern_europe":
Expand Down
53 changes: 0 additions & 53 deletions dash_service/static/FT_SP_DYN_ADKL.csv

This file was deleted.

Binary file not shown.
Binary file removed dash_service/static/Full CRC database_28_08_24.xlsx
Binary file not shown.
11 changes: 9 additions & 2 deletions dash_service/static/page_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,13 @@
'suffix': min_max_card_suffix,
'min_max': True,
'yaxis':'Percentage of women',
'button_name': 'Women aged 20-24 years married or in union before age 18 (SDG 5.3.1)'}],
'button_name': 'Women aged 20-24 years married or in union before age 18 (SDG 5.3.1)'},
{'name': 'Sex ratio at birth',
'indicator': 'DM_SP_POP_BRTH_MF',
'suffix': min_max_card_suffix,
'min_max': True,
'yaxis':'Ratio',
'button_name': 'Sex ratio at birth'},],
'AIO_AREA': {
'indicators': ['EC_GDI',
'EC_GII',
Expand All @@ -1562,7 +1568,8 @@
'PT_CHLD_1-14_PS-PSY-V_CGVR-GND',
'PT_F_PS-SX_V_PTNR_12MNTH-GND',
'PT_F_15-19_MRD-GND',
'PT_F_20-24_MRD_U18-GND'],
'PT_F_20-24_MRD_U18-GND',
'DM_SP_POP_BRTH_MF'],
'default_graph': 'bar',
'default': 'EC_GDI-GND'}},
'DIS': {'NAME': 'Disability',
Expand Down
Binary file removed dash_service/static/~$Full CRC database - v25-1-22.xlsx
Binary file not shown.
Binary file removed dash_service/static/~$Full CRC database_28_08_24.xlsx
Binary file not shown.

0 comments on commit 813892a

Please sign in to comment.