mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 22:21:17 -07:00
Adding DOT composite to travel score (#1820)
This adds the DOT dataset to the ETL and to the score. Note that currently we take a percentile of an average of percentiles.
This commit is contained in:
parent
932179841f
commit
ebac552d75
17 changed files with 553 additions and 354 deletions
|
@ -344,6 +344,9 @@ CDC_SVI_INDEX_RPL_THEMES_OVERALL_FIELD: str = (
|
|||
)
|
||||
CDC_SVI_INDEX_THEMES_PRIORITY_COMMUNITY: str = "At or above 90 for overall percentile ranking according to Social Vulnerability Indices"
|
||||
|
||||
# DOT Travel Burden Data
|
||||
DOT_TRAVEL_BURDEN_FIELD: str = "DOT Travel Barriers Score"
|
||||
|
||||
# Maryland EJSCREEN Data.
|
||||
MARYLAND_EJSCREEN_SCORE_FIELD: str = "Maryland Environmental Justice Score"
|
||||
|
||||
|
@ -416,6 +419,7 @@ DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD = (
|
|||
)
|
||||
TRAFFIC_PROXIMITY_LOW_INCOME_FIELD = f"Greater than or equal to the {PERCENTILE}th percentile for traffic proximity and is low income?"
|
||||
|
||||
|
||||
# Affordable and Sustainable Housing
|
||||
LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD = (
|
||||
f"Greater than or equal to the {PERCENTILE}th percentile for lead paint and"
|
||||
|
@ -494,6 +498,10 @@ TRAFFIC_PROXIMITY_LOW_INCOME_LOW_HIGHER_ED_FIELD = (
|
|||
f"traffic proximity{SCORE_M_LOW_INCOME_SUFFIX}?"
|
||||
)
|
||||
|
||||
DOT_TRAVEL_BURDEN_LOW_INCOME_FIELD = (
|
||||
f"Greater than or equal to the {PERCENTILE}th percentile "
|
||||
f"for DOT transit barriers and is low income?"
|
||||
)
|
||||
# Affordable and Sustainable Housing
|
||||
LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_LOW_HIGHER_ED_FIELD = (
|
||||
f"Greater than or equal to the {PERCENTILE}th percentile for lead paint,"
|
||||
|
@ -624,6 +632,7 @@ PM25_EXCEEDS_PCTILE_THRESHOLD = (
|
|||
)
|
||||
DIESEL_EXCEEDS_PCTILE_THRESHOLD = f"Greater than or equal to the {PERCENTILE}th percentile for diesel particulate matter"
|
||||
TRAFFIC_PROXIMITY_PCTILE_THRESHOLD = f"Greater than or equal to the {PERCENTILE}th percentile for traffic proximity"
|
||||
DOT_BURDEN_PCTILE_THRESHOLD = f"Greater than or equal to the {PERCENTILE}th percentile for DOT travel barriers"
|
||||
LEAD_PAINT_PROXY_PCTILE_THRESHOLD = (
|
||||
f"Greater than or equal to the {PERCENTILE}th percentile for lead paint and"
|
||||
f" the median house value is less than {MEDIAN_HOUSE_VALUE_PERCENTILE}th "
|
||||
|
|
|
@ -246,6 +246,8 @@ class ScoreNarwhal(Score):
|
|||
# In Xth percentile or above for PM 2.5 (Source: EPA, Office of Air and Radiation (OAR) fusion of model and monitor data)]
|
||||
# or
|
||||
# In Xth percentile or above traffic proximity and volume (Source: 2017 U.S. Department of Transportation (DOT) traffic data
|
||||
# or
|
||||
# In Xth percentile or above for DOT Travel Disadvantage
|
||||
# AND
|
||||
# Low income: In Nth percentile or above for percent of block group population
|
||||
# of households where household income is less than or equal to twice the federal
|
||||
|
@ -255,6 +257,7 @@ class ScoreNarwhal(Score):
|
|||
transportion_eligibility_columns = [
|
||||
field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD,
|
||||
field_names.TRAFFIC_PROXIMITY_LOW_INCOME_FIELD,
|
||||
field_names.DOT_TRAVEL_BURDEN_LOW_INCOME_FIELD,
|
||||
]
|
||||
|
||||
self.df[field_names.DIESEL_EXCEEDS_PCTILE_THRESHOLD] = (
|
||||
|
@ -264,6 +267,14 @@ class ScoreNarwhal(Score):
|
|||
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
|
||||
self.df[field_names.DOT_BURDEN_PCTILE_THRESHOLD] = (
|
||||
self.df[
|
||||
field_names.DOT_TRAVEL_BURDEN_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
|
||||
self.df[field_names.TRAFFIC_PROXIMITY_PCTILE_THRESHOLD] = (
|
||||
self.df[
|
||||
field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX
|
||||
|
@ -274,6 +285,7 @@ class ScoreNarwhal(Score):
|
|||
self.df[field_names.TRAFFIC_THRESHOLD_EXCEEDED] = (
|
||||
self.df[field_names.TRAFFIC_PROXIMITY_PCTILE_THRESHOLD]
|
||||
| self.df[field_names.DIESEL_EXCEEDS_PCTILE_THRESHOLD]
|
||||
| self.df[field_names.DOT_BURDEN_PCTILE_THRESHOLD]
|
||||
)
|
||||
|
||||
self.df[field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD] = (
|
||||
|
@ -286,6 +298,11 @@ class ScoreNarwhal(Score):
|
|||
& self.df[field_names.FPL_200_SERIES_IMPUTED_AND_ADJUSTED]
|
||||
)
|
||||
|
||||
self.df[field_names.DOT_TRAVEL_BURDEN_LOW_INCOME_FIELD] = (
|
||||
self.df[field_names.DOT_BURDEN_PCTILE_THRESHOLD]
|
||||
& self.df[field_names.FPL_200_SERIES_IMPUTED_AND_ADJUSTED]
|
||||
)
|
||||
|
||||
self._increment_total_eligibility_exceeded(
|
||||
transportion_eligibility_columns,
|
||||
skip_fips=constants.DROP_FIPS_FROM_NON_WTD_THRESHOLDS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue