fix(code): Differentiate between national and census data
This commit is contained in:
parent
a51d55e3a5
commit
588cf4a3c9
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
# Summary of study findings
|
||||
|
||||
written into 02-data/supplementary/findings-*.csv tables
|
||||
|
||||
## Institutional
|
||||
|
||||
### Labour laws / regulatory systems
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue