diff --git a/03-documentation/findings-per-policy-area.md b/03-documentation/findings-per-policy-area.md index e38ea78..e19ce75 100644 --- a/03-documentation/findings-per-policy-area.md +++ b/03-documentation/findings-per-policy-area.md @@ -1,5 +1,7 @@ # Summary of study findings +written into 02-data/supplementary/findings-*.csv tables + ## Institutional ### Labour laws / regulatory systems diff --git a/src/prep_data.py b/src/prep_data.py index 9c4af44..21d9ec4 100644 --- a/src/prep_data.py +++ b/src/prep_data.py @@ -18,9 +18,9 @@ def calculate_validities( vd[repr_col] = vd[repr_col].fillna("") vd[method_col] = vd[method_col].fillna("") - # needs to check national before subnational, subnational before local - vd.loc[vd[repr_col].str.contains("national"), EXT_COL_NAME] = 5.0 - vd.loc[vd[repr_col].str.contains("regional"), EXT_COL_NAME] = 4.0 + # needs to check national before subnational and census, subnational before local + vd.loc[vd[repr_col].str.contains("|".join(["national", "regional"])), EXT_COL_NAME] = 4.0 + vd.loc[vd[repr_col].str.contains("census"), EXT_COL_NAME] = 5.0 vd.loc[vd[repr_col].str.contains("subnational"), EXT_COL_NAME] = 3.0 vd.loc[vd[repr_col].str.contains("local"), EXT_COL_NAME] = 2.0