mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 17:44:20 -08:00
Add NATA cancer risk and respiratory hazard to definition L (#1001)
This commit is contained in:
parent
5a6d6d8557
commit
5706837956
7 changed files with 41 additions and 7 deletions
|
@ -322,7 +322,7 @@ class ScoreETL(ExtractTransformLoad):
|
|||
field_names.FEMA_RISK_FIELD,
|
||||
field_names.URBAN_HEURISTIC_FIELD,
|
||||
field_names.AIR_TOXICS_CANCER_RISK_FIELD,
|
||||
field_names.RESPITORY_HAZARD_FIELD,
|
||||
field_names.RESPIRATORY_HAZARD_FIELD,
|
||||
field_names.DIESEL_FIELD,
|
||||
field_names.PM25_FIELD,
|
||||
field_names.OZONE_FIELD,
|
||||
|
|
|
@ -8,6 +8,12 @@ logger = get_module_logger(__name__)
|
|||
|
||||
|
||||
class EJSCREENETL(ExtractTransformLoad):
|
||||
"""Load EJSCREEN data.
|
||||
|
||||
Data dictionary:
|
||||
https://gaftp.epa.gov/EJSCREEN/2019/2019_EJSCREEN_columns_explained.csv
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.EJSCREEN_FTP_URL = "https://edap-arcgiscloud-data-commons.s3.amazonaws.com/EJSCREEN2020/EJSCREEN_Tract_2020_USPR.csv.zip"
|
||||
self.EJSCREEN_CSV = self.TMP_PATH / "EJSCREEN_Tract_2020_USPR.csv"
|
||||
|
@ -19,7 +25,7 @@ class EJSCREENETL(ExtractTransformLoad):
|
|||
field_names.TOTAL_POP_FIELD,
|
||||
# pylint: disable=duplicate-code
|
||||
field_names.AIR_TOXICS_CANCER_RISK_FIELD,
|
||||
field_names.RESPITORY_HAZARD_FIELD,
|
||||
field_names.RESPIRATORY_HAZARD_FIELD,
|
||||
field_names.DIESEL_FIELD,
|
||||
field_names.PM25_FIELD,
|
||||
field_names.OZONE_FIELD,
|
||||
|
@ -61,7 +67,7 @@ class EJSCREENETL(ExtractTransformLoad):
|
|||
# but I think that's the direction we'd like to move all ETL classes. - LMB
|
||||
"ACSTOTPOP": field_names.TOTAL_POP_FIELD,
|
||||
"CANCER": field_names.AIR_TOXICS_CANCER_RISK_FIELD,
|
||||
"RESP": field_names.RESPITORY_HAZARD_FIELD,
|
||||
"RESP": field_names.RESPIRATORY_HAZARD_FIELD,
|
||||
"DSLPM": field_names.DIESEL_FIELD,
|
||||
"PM25": field_names.PM25_FIELD,
|
||||
"OZONE": field_names.OZONE_FIELD,
|
||||
|
|
|
@ -479,7 +479,7 @@
|
|||
"comparison_fields = [\n",
|
||||
" field_names.POVERTY_LESS_THAN_100_FPL_FIELD,\n",
|
||||
" field_names.POVERTY_LESS_THAN_200_FPL_FIELD,\n",
|
||||
" field_names.MEDIAN_INCOME_PERCENT_AMI_FIELD,\n",
|
||||
" field_names.MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD,\n",
|
||||
" field_names.LINGUISTIC_ISO_FIELD,\n",
|
||||
" field_names.UNEMPLOYMENT_FIELD,\n",
|
||||
" field_names.HIGH_SCHOOL_ED_FIELD,\n",
|
||||
|
|
|
@ -89,6 +89,7 @@ RMP_FIELD = "Proximity to Risk Management Plan (RMP) facilities"
|
|||
TSDF_FIELD = "Proximity to TSDF sites"
|
||||
NPL_FIELD = "Proximity to NPL sites"
|
||||
AIR_TOXICS_CANCER_RISK_FIELD = "Air toxics cancer risk"
|
||||
RESPIRATORY_HAZARD_FIELD = "Respiratory hazard index"
|
||||
|
||||
# Housing
|
||||
HOUSING_BURDEN_FIELD = "Housing burden (percent)"
|
||||
|
@ -104,7 +105,6 @@ DIABETES_FIELD = "Diagnosed diabetes among adults aged >=18 years"
|
|||
ASTHMA_FIELD = "Current asthma among adults aged >=18 years"
|
||||
HEART_DISEASE_FIELD = "Coronary heart disease among adults aged >=18 years"
|
||||
LIFE_EXPECTANCY_FIELD = "Life expectancy (years)"
|
||||
RESPITORY_HAZARD_FIELD = "Respiratory hazard index"
|
||||
CANCER_FIELD = "Cancer (excluding skin cancer) among adults aged >=18 years"
|
||||
HEALTH_INSURANCE_FIELD = (
|
||||
"Current lack of health insurance among adults aged 18-64 years"
|
||||
|
@ -260,6 +260,8 @@ IMPENETRABLE_SURFACES_LOW_INCOME_FIELD = (
|
|||
RMP_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for proximity to RMP sites and is low income"
|
||||
SUPERFUND_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for proximity to superfund sites and is low income"
|
||||
HAZARDOUS_WASTE_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for proximity to hazardous waste facilities and is low income"
|
||||
AIR_TOXICS_CANCER_RISK_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for air toxics cancer risk and is low income"
|
||||
RESPIRATORY_HAZARD_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for respiratory hazard index and is low income"
|
||||
|
||||
# Critical Clean Water and Waste Infrastructure
|
||||
WASTEWATER_DISCHARGE_LOW_INCOME_FIELD = f"At or above the {PERCENTILE}th percentile for wastewater discharge and is low income"
|
||||
|
|
|
@ -54,7 +54,7 @@ class ScoreC(Score):
|
|||
[
|
||||
field_names.AIR_TOXICS_CANCER_RISK_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX,
|
||||
field_names.RESPITORY_HAZARD_FIELD
|
||||
field_names.RESPIRATORY_HAZARD_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX,
|
||||
field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX,
|
||||
field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX,
|
||||
|
|
|
@ -36,7 +36,7 @@ class ScoreF(Score):
|
|||
)
|
||||
| (
|
||||
self.df[
|
||||
field_names.RESPITORY_HAZARD_FIELD
|
||||
field_names.RESPIRATORY_HAZARD_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
> 0.9
|
||||
|
|
|
@ -407,6 +407,8 @@ class ScoreL(Score):
|
|||
field_names.RMP_LOW_INCOME_FIELD,
|
||||
field_names.SUPERFUND_LOW_INCOME_FIELD,
|
||||
field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD,
|
||||
field_names.AIR_TOXICS_CANCER_RISK_LOW_INCOME_FIELD,
|
||||
field_names.RESPIRATORY_HAZARD_LOW_INCOME_FIELD,
|
||||
]
|
||||
|
||||
rmp_sites_threshold = (
|
||||
|
@ -426,6 +428,22 @@ class ScoreL(Score):
|
|||
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
|
||||
air_toxics_cancer_risk_threshold = (
|
||||
self.df[
|
||||
field_names.AIR_TOXICS_CANCER_RISK_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
|
||||
respiratory_hazard_risk_threshold = (
|
||||
self.df[
|
||||
field_names.RESPIRATORY_HAZARD_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
>= self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
|
||||
# individual series-by-series
|
||||
self.df[field_names.RMP_LOW_INCOME_FIELD] = (
|
||||
rmp_sites_threshold & self.df[field_names.FPL_200_SERIES]
|
||||
|
@ -436,6 +454,14 @@ class ScoreL(Score):
|
|||
self.df[field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD] = (
|
||||
tsdf_sites_threshold & self.df[field_names.FPL_200_SERIES]
|
||||
)
|
||||
self.df[field_names.AIR_TOXICS_CANCER_RISK_LOW_INCOME_FIELD] = (
|
||||
air_toxics_cancer_risk_threshold
|
||||
& self.df[field_names.FPL_200_SERIES]
|
||||
)
|
||||
self.df[field_names.RESPIRATORY_HAZARD_LOW_INCOME_FIELD] = (
|
||||
respiratory_hazard_risk_threshold
|
||||
& self.df[field_names.FPL_200_SERIES]
|
||||
)
|
||||
|
||||
self._increment_total_eligibility_exceeded(
|
||||
pollution_eligibility_columns
|
||||
|
|
Loading…
Add table
Reference in a new issue