NYCPlanning / db-equitable-development-tool

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

Add HH Economic Security (edu. attainment) Indicators from 2000 PUMS Data #209

Closed mbh329 closed 2 years ago

mbh329 commented 2 years ago

Few different things going on in this pull request including some reorganizing and renaming of files and what folders they are in, new code to handle the HH economic security indicators coming form 2000 census pums xlsx file dcp pop sent us, and a couple additions to theaggregation_helpers.pyfile that handles the reordering of the columns.

pums_2000_economics.py

Pretty straightforward. Follows the established conventions and logic to handle the xlsx files coming from dcp population. the data points (columns) of interest here are the educational attainment data points (less than high school, high school graduate or equivalent, etc) and the denominator (population 25 plus) which are the only data points coming from the 2000 pums for the hh econ security category. the main accessor now has a function that reorders the columns that builds off the work sasha had already done. It cycles through the 4 race crosstabs (anh, bnh, hsp, wnh) instead of the 5 (anh, bnh, hsp, onh, wnh) in the newer PUMS data.

aggregation_helpers.py

Added a parameter to order_aggregated_columns that can handle the different categories.

TODO: Wanted to keep this pull req relatively small but there is still some refactoring that needs to be done. will make another pull req with these changes.

SashaWeinstein commented 2 years ago

Awesome, really glad we are re-using code to reorder the columns and thinking about how to re-use code to ingest dcp pop data.

I pulled down the code and realized that the a median age column for "onh" was added to demographics from 2000 census pums. I fixed that and also re-named a couple variables and added a docstring to identify the main accessor of the 2000 census pums demographics.

Next I'll take a look at new pums_2000_economics.py file

mbh329 commented 2 years ago

@SashaWeinstein What folder should the internal review files be in?

SashaWeinstein commented 2 years ago

oh shoot I got housing security and quality and household economic security mixed up, my bad. internal review review files are in the correct place

mbh329 commented 2 years ago

I do that too

mbh329 commented 2 years ago

@td928 Did you want to through this before i merge into dev?