Closed mbh329 closed 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
@SashaWeinstein What folder should the internal review files be in?
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
I do that too
@td928 Did you want to through this before i merge into dev?
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 the
aggregation_helpers.py
file 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.
aggregation_helpers.py
. right now there are two files that handle the column reordering:aggregation_helpers.py
andclean_aggregated.py
.