Fixed Decennial 2020 tract removal bug

This commit is contained in:
Carlos Felix 2024-12-02 12:55:34 -05:00 committed by Carlos Felix
commit a983a42b55
2 changed files with 2 additions and 1 deletions

View file

@ -128,7 +128,7 @@ class CensusDecennialETL(ExtractTransformLoad):
> 0,
DEC_FIELD_NAMES.TERRITORY_MEDIAN_INCOME,
] = territory["median_income"]
self.df_all = pd.concat([self.df_all, df])
self.df_all = pd.concat([self.df_all, df], ignore_index=True)
def _merge_tracts_2010_compatibility(self):
"""Merges tract 69120950200 to match 2010 tracts"""

View file

@ -97,6 +97,7 @@ def test_load_data(extract_path_fixture: Path, territory_params_fixture):
df = dec.df_all
assert len(df) == 64
assert len(df.columns) == 30
assert df.index.is_unique
# Columns should not have any census variable names
census_vars = list(DEC_TERRITORY_PARAMS[0]["xwalk"].keys()) + list(