NYCPlanning / db-equitable-development-tool

Data Repo for the equitable development tool (EDDT)
MIT License
0 stars 0 forks source link

Add standardized tokens across all QOL indicators #239

Closed mbh329 closed 2 years ago

mbh329 commented 2 years ago

Most of the work done in this pull request are minor changes to add one of the following tokens to the column labels: _count, _pct, rate, median, or index (if not already following this convention). Some minor refactoring was also done to the names of the python scripts and names of the accessor function so that they match (this follows a convention we laid out later in the process that was a minor lift). In addition to renaming the scripts and accessors, these changes were update in the all_accessors.py for a (hopefully) easy collate and export process. I did not write internal review files for every script but if that is necessary I can go back and export them

Max:

access_subway_and_access_ADA
access_to_broadband
access_to_jobs
access_to_openspace
access_transit_car - removed the reorder mapper here as it was no longer necessary 
covid_death
diabetes_self_report

see te's comments below for additional comments as we worked on this together

Te's Work

education_outcome
health_mortality
heat_vulnerability
safety_ped_aslt_hospitalization
traffic_fatalities

Majority of the work should straight forwrd and self explanatory. See below notes

safety_ped_aslt_hospitalization

for both indicators, the _rate token is added.

education_outcome

no change

health_mortality

the script that required most work. First, the really messy list comprehension to create the column names is abandoned and refactored to use a simpler column creation. Then order_PUMS_QOL_multiple_years is called to reorder the columns. This all takes place in the renamed rename_reorder_columns function.

traffic_fatalities

very minimal work required but used trial and error approach to add _token to the correction spot.

SashaWeinstein commented 2 years ago

great, reviewing now. think it was right choice to not add files to external review

SashaWeinstein commented 2 years ago

Heads up that pytest is failing because of an accidental sqlalchemy import. I turned off auto-imports to stop this issue from happening