Closed td928 closed 2 years ago
Okay so turns out not a complicated refactor to do it more explicitly at all. @SashaWeinstein I agree it is more readable this way and let me know the new commit addressed your concern. Thanks!
@SashaWeinstein cool I like what you did with zip. Let me know if you can approve and I will merge it in. Thanks!
That looks a lot better! I made an additional change to use the python built-in zip
instead of enumerate because I finally figured out what zip
does and I wanted to use it.
I think it was added already @SashaWeinstein
Overview
addressing #260 from a single spreadsheet and relatively straightforward work
load_clean_nycha_data
To clean up the puma level NYCHA tenants data.
the bulk of work takes place where the RAD and public housing population gets summed up by race.
nycha_tenants
I don't love the design that the join with census data takes place in here. I initially had in the
load_clean_nycha_data
but then realize if the join takes place earlier would mess up the percentage columns for the total population from census. I settled for this current design but open to other suggestions.get_percentage
to get the percentage of NYCHA population out of total population of the geography
final output has 24 columns each 2 measures (count, pct) 2 indicators(nycha tenants & pop) 6 races