Skip to content

Commit

Permalink
add data former members of czechoslovakia and yugoslavia
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrodes committed May 13, 2024
1 parent a8fdc9f commit f706500
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,43 @@
country_impute: Russia
year_min: 1813
year_max: 1921

# Czechoslovakia
- country:
- Czechia
- Slovakia
country_impute: Czechoslovakia
year_min: 1918
year_max: 1992

# Yugoslavia
- country:
- Croatia
- Bosnia and Herzegovina
- Slovenia
- North Macedonia
country_impute: Yugoslavia
year_min: 1918
year_max: 1989
- country:
- Serbia
- Montenegro
- Kosovo
country_impute: Yugoslavia
year_min: 1918
year_max: 1991

# Serbia and Montenegro
- country:
- Serbia
- Montenegro
- Kosovo
country_impute: Serbia and Montenegro
year_min: 1992
year_max: 2005

# Kosovo
- country: Kosovo
country_impute: Serbia
year_min: 2006
year_max: 2007
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ tables:
common:
description_processing: |-
Data for former USSR member states has been obtained by imputing the values of the USSR. This includes: Russia, Ukraine, Belarus, Latvia, Lithuania, Estonia, Armenia, Azerbaijan, Georgia, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Uzbekistan, and Moldova.
Data for former Czechoslovakia member states has been obtained by imputing the values of Czechoslovakia. This includes: Czech Republic and Slovakia.
Data for former Yugoslavia member states has been obtained by imputing the values of Yugoslavia. This includes: Slovenia, Croatia, Bosnia and Herzegovina, Serbia, Montenegro, Kosovo, and North Macedonia.
variables:
exelec_lied:
title: Elections for chief executive
Expand Down
7 changes: 4 additions & 3 deletions etl/steps/data/garden/democracy/2024-03-07/lexical_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,15 @@ def run(dest_dir: str) -> None:
) == {"Germany"}, "Other versions of Germany!"

# Impute values
tb = add_imputes(tb=tb, path=PATH_IMPUTE, col_flag_imputed="values_imputed")
col_flag_imputed = "values_imputed"
tb = add_imputes(tb=tb, path=PATH_IMPUTE, col_flag_imputed=col_flag_imputed)

# Get region data
tb_regions = tb.loc[~tb["values_imputed"]].drop(columns=["values_imputed"]).copy()
tb_regions = tb.loc[~tb[col_flag_imputed]].drop(columns=[col_flag_imputed]).copy()
tb_regions = get_region_aggregates(tb_regions, ds_regions, ds_population)

# Drop is imputed flag
tb = tb.drop(columns=["values_imputed"])
tb = tb.drop(columns=[col_flag_imputed])

# Format
tb = tb.format(["country", "year"])
Expand Down

0 comments on commit f706500

Please sign in to comment.