GeoDaCenter / opioid-policy-scan

The Opioid Environment Policy Scan provides access to data at multiple spatial scales to help characterize the multi-dimensional risk environment impacting opioid use in justice populations across the United States.
13 stars 14 forks source link

reconcile all non-geom-related variables in CSVs and dictionaries, #69 #70

Closed mradamcox closed 11 months ago

mradamcox commented 11 months ago

This discrepancies listed in #69 were resolved through direct changes to the CSV and Data Dictionary files. In some cases an update to the dictionary required further changes in files that didn't previously have an error.

Cascading these changes up to the script(s) that generated the CSVs would be really good in the future, so hopefully this info can be used to do that eventually.

In a number of cases, the dictionaries also didn't agree with the absence/presence of variables in the historical CSVs, so the x presence values were altered to fit the CSV datasets.

No geometry-related fields were touched in this pull request, as that will be handled separately in a more comprehensive way (may require changes to the shapefiles, for example.

closes #69.

State

file field original field new note
S_Dict.xlsx A15_24P Age15_24P
S_Dict.xlsx Age18_64 (unchanged) remove 2010 x (field not in CSV)
S_Dict.xlsx ChildrenP (unchanged) remove 2010 x (field not in CSV)
S_2010.csv A15_24P Age15_24P
S_Latest.csv TotPopE TotPop
S_Latest.csv A15_24P Age15_24P
S_Latest.csv NoHSP NoHsP
S_Latest.csv PrMisuse20 PrMsuse20P

County

file field original field new note
C_Dict.xlsx A15_24P Age15_24P
C_1980.csv A15_24P Age15_24P
C_2010.csv A15_24P Age15_24P
C_2010.csv VacP VacantP

Tract

file field original field new note
T_Dict.xlsx A15_24P Age15_24P
T_Dict.xlsx ChildrenP (unchanged) add x for 1980
T_Dict.xlsx ChildrenP (unchanged) add x for 1990
T_Dict.xlsx ChildrenP (unchanged) add x for 2000
T_Dict.xlsx PciE (unchanged) remove x for 2000
T_Dict.xlsx GiniCoeff (unchanged) add x for 2010
T_Dict.xlsx NonRelFhhP (unchanged) remove x for 2010
T_Dict.xlsx NonRelNfhhP (unchanged) remove x for 2010
T_Dict.xlsx MinDisFqhc FqhcMinDis
T_1980.csv A15_24P Age15_24P
T_1980.csv NoHSP NoHsP
T_1990.csv NoHsp NoHsP
T_2000.csv NoHsp NoHsP
T_2010.csv A15_24P Age15_24P
T_2010.csv VacP VacantP
T_Latest.csv NoHSP NoHsP
T_Latest.csv A15_24P Age15_24P
T_Latest.csv TotPopE TotPop

ZTCA

file field original field new note
Z_Dict.xlsx PacISP PacIsP
Z_Dict.xlsx HispP (unchanged) remove x for 1980
Z_Dict.xlsx HispP (unchanged) remove x for 1990
Z_Dict.xlsx HispP (unchanged) remove x for 2000
Z_Dict.xlsx MedInc (unchanged) add x for 2010
Z_Dict.xlsx Age55_59 (unchanged) add x for 1980
Z_1980.csv Ov65P Ovr65P
Z_1990.csv Ov65P Ovr65P
Z_2000.csv Ov65P Ovr65P
Z_2010.csv VacP VacantP
Z_Latest.csv PacISP PacIsP