NYCPlanning / db-equitable-development-tool

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

Fix borough level aggregation for two housing security indicators #240

Closed SashaWeinstein closed 2 years ago

SashaWeinstein commented 2 years ago

Issues with missing info at borough level for eviction cases and evictions by city marshals

Branch was opened to just fix eviction cases and I saw issue with evictions when checking

Eviction cases

Issue was that conversion from numeric borough code was replacing with text of full borough name. This was fixed in CD_helpers.get_borough_num_mapper to set text borough as code ("BX", "MN") instead of full borough name.

Evictions by City Marshals

Was missing staten island evictions because boroughs are all uppercase in source data and my code to clean converted all but first letter to lowercase. This however sent "STATEN ISLAND" to "Staten island" and the lowercase "i" kept those records from being converted to "SI". This was hot-fixed, a more elegant solution would involve a case-insensitive match