NYCPlanning / db-equitable-development-tool

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

Fix geography index tests #286

Closed SashaWeinstein closed 1 year ago

SashaWeinstein commented 2 years ago

I needed to fix the geography tests as my blog post writes about them and people may want to look at them. Previously the tests would compare the .sort() method of two arrays but this method modifies the object in-place and returns None. So it was comparing None to None and always passing.

After the tests were fixed a couple indicators were revealed as returning dataframes with missing PUMAs. This doesn't effect the output as NaN are added during the collate process but they were fixed so that tests pass.

Updates in PR 218 are in this PR as initializing an empty dataframe with a PUMA index is the best way to fix the indicators.