-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎉 anomalist: Improve Anomalist backend #3405
Conversation
Quick links (staging server):
Login: chart-diff: ✅No charts for review.data-diff: ❌ Found differences= Dataset garden/democracy/2024-03-07/bmr
= Table bmr
= Table num_countries_regime
~ Column num_countries_regime (changed metadata)
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_regime_ws (changed metadata)
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table num_countries_regime_years
~ Column num_countries_years_in_democracy_consec (changed metadata)
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_years_in_democracy_ws_consec (changed metadata)
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table population_regime_years
~ Column population_years_in_democracy_consec (changed metadata)
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_years_in_democracy_ws_consec (changed metadata)
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == '91+' -%>
? - -
+ + <% if category == '91+' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table population_regime
~ Column population_regime (changed metadata)
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_regime_ws (changed metadata)
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if category == 0 -%>
? - -
+ + <% if category == 0 %>
- - <%- elif category == 1 -%>
? - -
+ + <% elif category == 1 %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/democracy/2024-03-07/eiu
= Table avg_pop
= Table num_countries
~ Column num_regime_eiu (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table num_people
~ Column pop_regime_eiu (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table eiu
= Dataset garden/democracy/2024-03-07/fh
= Table fh
= Table fh_regions
~ Column num_electdem_fh (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == 'Non-electoral democracy' -%>
? - -
+ + <% elif category == 'Non-electoral democracy' %>
- - <%- elif category == 'Electoral democracy' -%>
? - -
+ + <% elif category == 'Electoral democracy' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_regime_fh (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == 'Not free' -%>
? - -
+ + <% elif category == 'Not free' %>
- - <%- elif category == 'Partly free' -%>
? - -
+ + <% elif category == 'Partly free' %>
- - <%- elif category == 'Free' -%>
? - -
+ + <% elif category == 'Free' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_electdem_fh (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == 'Non-electoral democracy' -%>
? - -
+ + <% elif category == 'Non-electoral democracy' %>
- - <%- elif category == 'Electoral democracy' -%>
? - -
+ + <% elif category == 'Electoral democracy' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_regime_fh (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == 'Not free' -%>
? - -
+ + <% elif category == 'Not free' %>
- - <%- elif category == 'Partly free' -%>
? - -
+ + <% elif category == 'Partly free' %>
- - <%- elif category == 'Free' -%>
? - -
+ + <% elif category == 'Free' %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/democracy/2024-03-07/lexical_index
= Table region_aggregates
~ Column num_democracy_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_group_age_electdem_lied (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- elif category == '-1' -%>
? - -
+ + <% elif category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_group_age_polyarchy_lied (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- elif category == '-1' -%>
? - -
+ + <% elif category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_regime_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_suffrage_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_democracy_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_group_age_electdem_lied (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_group_age_polyarchy_lied (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_regime_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_suffrage_lied (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table lexical_index
= Dataset garden/democracy/2024-03-07/polity
= Table avg_pop
= Table num_countries
~ Column num_group_age_dem_polity (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- elif category == '-1' -%>
? - -
+ + <% elif category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_regime_polity (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table num_people
~ Column pop_group_age_dem_polity (changed metadata)
- - <%- if 'years' in category -%>
? - -
+ + <% if 'years' in category %>
- - <%- elif category == '-1' -%>
? - -
+ + <% elif category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pop_regime_polity (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table polity
= Dataset garden/democracy/2024-03-07/vdem
= Table vdem_multi_with_regions
~ Column civ_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column civ_soc_str_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column corr_exec_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column corr_jud_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column corr_leg_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column corr_publsec_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column corruption_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column delibdem_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column dom_auton_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column egaldem_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column electdem_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column int_auton_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column libdem_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column participdem_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column personalism_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column phys_integr_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column pol_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column priv_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column public_admin_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column rule_of_law_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column socgr_civ_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column socgr_pow_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column terr_contr_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column wom_civ_libs_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column wom_civ_soc_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column wom_emp_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column wom_parl_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column wom_pol_par_vdem (changed metadata)
- - <%- if aggregate_method == 'average' -%>
? - -
+ + <% if aggregate_method == 'average' %>
- - <%- elif aggregate_method < 'population-weighted average' -%>
? - -
+ + <% elif aggregate_method < 'population-weighted average' %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table vdem_num_countries
~ Column num_countries_hoe (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_hog (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_hos (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_regime (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_regime_amb (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_wom_parl (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == '0% women' -%>
? - -
+ + <% elif category == '0% women' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_years_in_electdem (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column num_countries_years_in_libdem (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table vdem
= Table vdem_multi_without_regions
= Table vdem_population
~ Column population_hoe (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_hog (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_hos (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_regime (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_regime_amb (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_wom_parl (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- elif category == '0% women' -%>
? - -
+ + <% elif category == '0% women' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_years_in_electdem (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column population_years_in_libdem (changed metadata)
- - <%- if category == '-1' -%>
? - -
+ + <% if category == '-1' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/demography/2023-09-27/survivor_percentiles
= Table survivor_percentiles
~ Column age (changed metadata)
- - <%- if percentile == 1 -%>
? - -
+ + <% if percentile == 1 %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/demography/2023-10-03/life_tables
= Table life_tables
~ Column central_death_rate_mf_ratio (changed metadata)
- - <%- if type == "cohort" -%>
? - -
+ + <% if type == "cohort" %>
- - <%- elif type == "period" -%>
? - -
+ + <% elif type == "period" %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy (changed metadata)
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- if sex == 'both' -%>
? - -
+ + <% if sex == 'both' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'both' -%>
? - -
+ + <% if sex == 'both' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age != '0' -%>
? - -
+ + <% if age != '0' %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_fm_diff (changed metadata)
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_fm_ratio (changed metadata)
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/demography/2023-10-09/life_expectancy
= Table life_expectancy
~ Column life_expectancy (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if (age == 0) and (sex == 'all') -%>
? - -
+ + <% if (age == 0) and (sex == 'all') %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_0 (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if (age == 0) and (sex == 'all') -%>
? - -
+ + <% if (age == 0) and (sex == 'all') %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table life_expectancy_only_proj
~ Column life_expectancy_0_only_proj (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_only_proj (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table life_expectancy_with_proj
~ Column life_expectancy_0_with_proj (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if (age == 0) and (sex == 'all') -%>
? - -
+ + <% if (age == 0) and (sex == 'all') %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_with_proj (changed metadata)
- - <%- if age == 0 -%>
? - -
+ + <% if age == 0 %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if (age == 0) and (sex == 'all') -%>
? - -
+ + <% if (age == 0) and (sex == 'all') %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/demography/2023-10-20/broken_limits_le
= Table broken_limits_le
~ Column country_with_max_le (changed metadata)
- - Name of the country with the yearly maximum life expectancy registered<%- if (sex == 'female') %> among females<% elif (sex == 'male') %> among males<% endif -%>.
? - -
+ + Name of the country with the yearly maximum life expectancy registered<% if (sex == 'female') %> among females<% elif (sex == 'male') %> among males<% endif %>.
~ Column life_expectancy (changed metadata)
- - <%- if (sex == 'female') -%>
? - -
+ + <% if (sex == 'female') %>
- - <%- elif (sex == 'male') -%>
? - -
+ + <% elif (sex == 'male') %>
- - <%- elif (sex == 'all') -%>
? - -
+ + <% elif (sex == 'all') %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/demography/2024-07-12/un_wpp_historical
= Table projections
~ Column population (changed metadata)
- - <%- if variant != 'estimates' -%> Projections from 2024 onwards are based on the UN's << variant >> scenario. <%- endif -%>
? - -
+ + <%- if variant != 'estimates' %> Projections from 2024 onwards are based on the UN's << variant >> scenario. <%- endif %>
= Table estimates
~ Column population_estimates (changed metadata)
- - <%- if variant != 'estimates' -%> Projections from 2024 onwards are based on the UN's << variant >> scenario. <%- endif -%>
? - -
+ + <%- if variant != 'estimates' %> Projections from 2024 onwards are based on the UN's << variant >> scenario. <%- endif %>
= Dataset garden/health/2024-06-11/isaps_plastic_surgery
= Table isaps_plastic_surgery
~ Column num_procedures (changed metadata)
- - <%- if (category_1 == 'all') -%>
? - -
+ + <% if (category_1 == 'all') %>
- - <%- elif (category_1 != 'all') and (category_2 == 'all') -%>
? - -
+ + <% elif (category_1 != 'all') and (category_2 == 'all') %>
- - <%- elif (category_1 != 'all') and (category_2 != 'all') and (procedure_name == 'all') -%>
? - -
+ + <% elif (category_1 != 'all') and (category_2 != 'all') and (procedure_name == 'all') %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/health/2024-09-05/seattle_pathogens
= Table seattle_pathogens_month
~ Column percentage_month (changed metadata)
- - The share of specimens detected with respiratory pathogen << organism >>. <%- if organism == 'RSV' -%>
? - -
+ + The share of specimens detected with respiratory pathogen << organism >>. <% if organism == 'RSV' %>
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column present_month (changed metadata)
- - The number of specimens detected with respiratory pathogen << organism >>. <%- if organism == 'RSV' -%>
? - -
+ + The number of specimens detected with respiratory pathogen << organism >>. <% if organism == 'RSV' %>
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column tested_month (changed metadata)
- - The number of specimens tested to detect the respiratory pathogen << organism >>. Some of these specimens may have tested positive for the pathogen, while others (or all of them) may have tested negative. <%- if organism == 'RSV' -%>
? ^^^^^^^^^^^^^ -
+ + The number of specimens tested to detect the respiratory pathogen << organism >>. Some of these specimens may have tested positive for the pathogen, while others (or all of them) may have tested negative. <% if organism == 'RSV' %>
? ^^^^^^^^^^^^
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Table seattle_pathogens
~ Column percentage (changed metadata)
- - The share of specimens detected with respiratory pathogen << organism >>. <%- if organism == 'RSV' -%>
? - -
+ + The share of specimens detected with respiratory pathogen << organism >>. <% if organism == 'RSV' %>
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column present (changed metadata)
- - The number of specimens detected with respiratory pathogen << organism >>. <%- if organism == 'RSV' -%>
? - -
+ + The number of specimens detected with respiratory pathogen << organism >>. <% if organism == 'RSV' %>
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column tested (changed metadata)
- - The number of specimens tested to detect the respiratory pathogen << organism >>. Some of these specimens may have tested positive for the pathogen, while others (or all of them) may have tested negative. <%- if organism == 'RSV' -%>
? ^^^^^^^^^^^^^ -
+ + The number of specimens tested to detect the respiratory pathogen << organism >>. Some of these specimens may have tested positive for the pathogen, while others (or all of them) may have tested negative. <% if organism == 'RSV' %>
? ^^^^^^^^^^^^
- - <%- elif organism == 'Influenza A' -%>
? - -
+ + <% elif organism == 'Influenza A' %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/health/latest/global_health_mpox
= Table global_health_mpox
~ Dim country
- - Removed values: 4 / 77 (5.19%)
date country
2024-10-12 Burundi
2024-10-12 Cameroon
2024-10-12 Cote d'Ivoire
2024-10-06 Nigeria
~ Dim date
- - Removed values: 4 / 77 (5.19%)
country date
Burundi 2024-10-12
Cameroon 2024-10-12
Cote d'Ivoire 2024-10-12
Nigeria 2024-10-06
~ Column reported_cases (changed data)
- - Removed values: 4 / 77 (5.19%)
country date reported_cases
Burundi 2024-10-12 186
Cameroon 2024-10-12 9
Cote d'Ivoire 2024-10-12 32
Nigeria 2024-10-06 60
~ Column suspected_cases_cumulative (changed data)
- - Removed values: 4 / 77 (5.19%)
country date suspected_cases_cumulative
Burundi 2024-10-12 1521
Cameroon 2024-10-12 205
Cote d'Ivoire 2024-10-12 269
Nigeria 2024-10-06 1297
= Dataset garden/hmd/2023-09-19/hmd
= Table hmd
~ Column central_death_rate_mf_ratio (changed metadata)
- - <%- if type == "cohort" -%>
? - -
+ + <% if type == "cohort" %>
- - <%- elif type == "period" -%>
? - -
+ + <% elif type == "period" %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy (changed metadata)
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- if sex == 'both' -%>
? - -
+ + <% if sex == 'both' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if sex == 'both' -%>
? - -
+ + <% if sex == 'both' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if age != '0' -%>
? - -
+ + <% if age != '0' %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_fm_diff (changed metadata)
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
~ Column life_expectancy_fm_ratio (changed metadata)
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- if age == '0' -%>
? - -
+ + <% if age == '0' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/oecd/2023-10-11/life_expectancy_birth
= Table life_expectancy_birth
~ Column life_expectancy_birth (changed metadata)
- - <%- if sex == 'all' -%>
? - -
+ + <% if sex == 'all' %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/regions/2023-01-01/regions
= Table regions
~ Column aliases (changed data)
~ Changed values: 1 / 312 (0.32%)
code aliases - aliases +
WHO_WPAC ["WPRO"] NaN
= Dataset garden/un/2023-10-02/un_wpp_lt
= Table un_wpp_lt
~ Column life_expectancy (changed metadata)
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- elif type == "cohort" -%>
? - -
+ + <% elif type == "cohort" %>
- - <%- endif -%>
? - -
+ + <% endif %>
- - <%- if type == "period" -%>
? - -
+ + <% if type == "period" %>
- - <%- else -%>
? - -
+ + <% else %>
- - <%- endif -%>
? - -
+ + <% endif %>
= Dataset garden/un/2024-07-12/un_wpp
= Table median_age
~ Column median_age (changed metadata)
- - Age that divides the population in two parts of equal size, that is, there are as many persons with ages above the median as there are with ages below the median. <%-if not (sex == 'all' and age == 'all') -%>
? ^ -
+ + Age that divides the population in two parts of equal size, that is, there are as many persons with ages above the median as there are with ages below the median. <% if not (sex == 'all' and age == 'all') %>
? ^
- - <%- if sex != 'all' -%>
? -
+ + <%- if sex != 'all' %>
- - <%- elif sex != 'all' -%>
? -
+ + <%- elif sex != 'all' %>
- - <%- endif -%>
? -
+ + <%- endif %>
- - <%- if age == '0' -%>
? -
+ + <%- if age == '0' %>
- - <%- elif '-' in age|string or '+' in age|string -%>
? -
+ + <%- elif '-' in age|string or '+' in age|string %>
- - <%- elif age != 'all' -%>
? -
+ + <%- elif age != 'all' %>
- - <%- endif -%>.
? -
+ + <%- endif %>.
- - <%-endif -%>
? ^ -
+ + <% endif %>
? ^
- - <%
...diff too long, truncated... Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included Edited: 2024-10-15 14:59:34 UTC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I had a couple of suggestions, feel free to go what your instincts tell you.
(By the way, this is the code I had before going on holiday)
class AnomalyDetector:
anomaly_type: str
def get_text(self, entity: str, year: int) -> str:
return f"Anomaly happened in {entity} in {year}!"
def get_score_df(
self, df: pd.DataFrame, variables: list[gm.Variable], variable_mapping: dict[int, int]
) -> pd.DataFrame:
raise NotImplementedError
class LostAnomalyDetector(AnomalyDetector):
# New data misses entity-years that used to exist in old version.
anomaly_type = "lost"
def get_score_df(self, df: pd.DataFrame, variables: list[gm.Variable], variable_mapping) -> pd.DataFrame:
# Create a dataframe of zeros.
df_lost = df.copy()
# Make 1 all cells that used to have data in the old version, but are missing in the new version.
for variable_id_old, variable_id_new in variable_mapping.items():
affected_rows = df[(df[variable_id_old].notnull()) & (df[variable_id_new].isnull())].index
df_lost.loc[affected_rows, variable_id_new] = 1
return df_lost
class GPAnomalyDetector(AnomalyDetector):
anomaly_type = "gp"
def get_text(self, entity: str, year: int) -> str:
return f"There is an outlier {entity} in {year}!"
def get_score_df(
self, df: pd.DataFrame, variables: list[gm.Variable], variable_mapping: dict[int, int]
) -> pd.DataFrame:
score_df = df * np.nan
...
Various improvements on anomalist backend.