Removing low pop tracts from FEMA population loss (#1898)

dropping 0 population from FEMA
This commit is contained in:
Emma Nechamkin 2022-09-12 13:48:38 -04:00 committed by GitHub
commit 60164c8637
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -579,12 +579,17 @@ class ScoreETL(ExtractTransformLoad):
f"Dropping {len(drop_tracts)} tracts from Linguistic Isolation"
)
elif numeric_column == field_names.DOT_TRAVEL_BURDEN_FIELD:
elif numeric_column in [
field_names.DOT_TRAVEL_BURDEN_FIELD,
field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD,
]:
# Not having any people appears to be correlated with transit burden, but also doesn't represent
# on the ground need. For now, we remove these tracts from the percentile calculation. (To be QAed live)
# on the ground need. For now, we remove these tracts from the percentile calculation.ß
# Similarly, we want to exclude low population tracts from FEMA's index
low_population = 20
drop_tracts = df_copy[
df_copy[field_names.TOTAL_POP_FIELD] <= low_population
df_copy[field_names.TOTAL_POP_FIELD].fillna(0)
<= low_population
][field_names.GEOID_TRACT_FIELD].to_list()
logger.info(
f"Dropping {len(drop_tracts)} tracts from DOT traffic burden"