Adding NLCD data (#1826)

Adding NLCD's natural space indicator end to end to the score.
This commit is contained in:
Emma Nechamkin 2022-08-17 14:21:28 -04:00 committed by GitHub
commit 7d89d41e49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 288 additions and 18 deletions

View file

@ -636,6 +636,19 @@ HIGH_FUTURE_WILDFIRE_RISK_FIELD = (
"at risk of fire in 30 years"
)
# NCLD Nature Deprived
TRACT_PERCENT_NON_NATURAL_FIELD_NAME = "Share of the tract's land area that is covered by impervious surface or cropland as a percent"
NON_NATURAL_PCTILE_THRESHOLD = (
f"Greater than or equal to the {PERCENTILE}th percentile for share of the tract's land area that is covered "
"by impervious surface or cropland as a percent"
)
NON_NATURAL_LOW_INCOME_FIELD_NAME = (
f"Greater than or equal to the {PERCENTILE}th percentile for share of the tract's land area that is covered "
"by impervious surface or cropland as a percent and is low income?"
)
TRACT_ELIGIBLE_FOR_NONNATURAL_THRESHOLD = (
"Does the tract have at least 35 acres in it?"
)
LINGUISTIC_ISOLATION_PCTILE_THRESHOLD = f"Greater than or equal to the {PERCENTILE}th percentile for households in linguistic isolation"
POVERTY_PCTILE_THRESHOLD = f"Greater than or equal to the {PERCENTILE}th percentile for households at or below 100% federal poverty level"
@ -650,7 +663,6 @@ ISLAND_LOW_MEDIAN_INCOME_PCTILE_THRESHOLD = (
ISLAND_UNEMPLOYMENT_PCTILE_THRESHOLD = f"{CENSUS_DECENNIAL_UNEMPLOYMENT_FIELD_2009} exceeds {PERCENTILE}th percentile"
ISLAND_POVERTY_PCTILE_THRESHOLD = f"{CENSUS_DECENNIAL_POVERTY_LESS_THAN_100_FPL_FIELD_2009} exceeds {PERCENTILE}th percentile"
# Not currently used in a factor
EXTREME_HEAT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD = (
f"Greater than or equal to the {PERCENTILE}th percentile for summer days above 90F and "

View file

@ -365,6 +365,7 @@ class ScoreNarwhal(Score):
field_names.HOUSING_BURDEN_LOW_INCOME_FIELD,
field_names.HISTORIC_REDLINING_SCORE_EXCEEDED_LOW_INCOME_FIELD,
field_names.NO_KITCHEN_OR_INDOOR_PLUMBING_LOW_INCOME_FIELD,
field_names.NON_NATURAL_LOW_INCOME_FIELD_NAME,
]
# Historic disinvestment
@ -419,6 +420,19 @@ class ScoreNarwhal(Score):
& self.df[field_names.FPL_200_SERIES_IMPUTED_AND_ADJUSTED]
)
# High non-natural space
self.df[field_names.NON_NATURAL_PCTILE_THRESHOLD] = (
self.df[
field_names.TRACT_PERCENT_NON_NATURAL_FIELD_NAME
+ field_names.PERCENTILE_FIELD_SUFFIX
]
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
)
self.df[field_names.NON_NATURAL_LOW_INCOME_FIELD_NAME] = (
self.df[field_names.NON_NATURAL_PCTILE_THRESHOLD]
& self.df[field_names.FPL_200_SERIES_IMPUTED_AND_ADJUSTED]
)
# any of the burdens
self.df[field_names.HOUSING_THREHSOLD_EXCEEDED] = self.df[
housing_eligibility_columns