From 18f299c5f819eda353be9fff32d8dd56c8019941 Mon Sep 17 00:00:00 2001 From: Lucas Merrill Brown Date: Tue, 18 Jan 2022 14:56:55 -0500 Subject: [PATCH] Issue 1141: Definition M (#1151) --- client/src/components/AreaDetail/index.tsx | 32 +- client/src/data/constants.tsx | 20 +- .../data_pipeline/etl/constants.py | 4 +- .../data_pipeline/etl/score/constants.py | 32 +- .../data_pipeline/etl/score/etl_score_geo.py | 6 +- .../data_pipeline/etl/score/etl_score_post.py | 2 +- .../tests/sample_data/score_data_initial.csv | 6 +- .../snapshots/downloadable_data_expected.pkl | Bin 13658 -> 13685 bytes .../tests/snapshots/score_data_expected.pkl | Bin 45002 -> 45872 bytes .../snapshots/score_transformed_expected.pkl | Bin 44614 -> 45484 bytes .../tests/snapshots/tile_data_expected.pkl | Bin 3085 -> 3085 bytes .../etl/sources/cdc_svi_index/etl.py | 2 +- .../README.md | 0 .../__init__.py | 0 .../{epa_rsei_aggregate => epa_rsei}/etl.py | 8 +- .../etl/sources/maryland_ejscreen/etl.py | 2 +- .../ipython/scoring_comparison.ipynb | 135 ++- .../data_pipeline/score/field_names.py | 26 + .../data_pipeline/score/score_l.py | 96 +-- .../data_pipeline/score/score_m.py | 770 ++++++++++++++++++ .../data_pipeline/score/score_runner.py | 2 + 21 files changed, 1000 insertions(+), 143 deletions(-) rename data/data-pipeline/data_pipeline/etl/sources/{epa_rsei_aggregate => epa_rsei}/README.md (100%) rename data/data-pipeline/data_pipeline/etl/sources/{epa_rsei_aggregate => epa_rsei}/__init__.py (100%) rename data/data-pipeline/data_pipeline/etl/sources/{epa_rsei_aggregate => epa_rsei}/etl.py (96%) create mode 100644 data/data-pipeline/data_pipeline/score/score_m.py diff --git a/client/src/components/AreaDetail/index.tsx b/client/src/components/AreaDetail/index.tsx index 4725d604..7779d87c 100644 --- a/client/src/components/AreaDetail/index.tsx +++ b/client/src/components/AreaDetail/index.tsx @@ -256,57 +256,57 @@ const AreaDetail = ({properties}:IAreaDetailProps) => { id: 'climate-change', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLIMATE), indicators: [expAgLoss, expBldLoss, expPopLoss, lowInc], - isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_CLIMATE_FACTOR_DISADVANTAGED_M] : null, }, { id: 'clean-energy', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_ENERGY), indicators: [energyBurden, pm25, lowInc], - isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_ENERGY_FACTOR_DISADVANTAGED_M] : null, }, { id: 'clean-transport', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_TRANSPORT), indicators: [dieselPartMatter, trafficVolume, lowInc], - isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_TRANSPORT_FACTOR_DISADVANTAGED_M] : null, }, { id: 'sustain-house', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.SUSTAIN_HOUSE), indicators: [houseBurden, leadPaint, lowInc], - isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_HOUSING_FACTOR_DISADVANTAGED_M] : null, }, { id: 'leg-pollute', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.LEG_POLLUTE), indicators: [proxHaz, proxNPL, proxRMP, lowInc], - isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_POLLUTION_FACTOR_DISADVANTAGED_M] : null, }, { id: 'clean-water', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.CLEAN_WATER), indicators: [wasteWater, lowInc], - isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_WATER_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_WATER_FACTOR_DISADVANTAGED_M] : null, }, { id: 'health-burdens', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.HEALTH_BURDEN), indicators: [asthma, diabetes, heartDisease, lifeExpect, lowInc], - isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_HEALTH_FACTOR_DISADVANTAGED_M] : null, }, { id: 'work-dev', titleText: intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CATEGORY.WORK_DEV), indicators: [lowMedInc, lingIso, unemploy, poverty, highSchool], - isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_L] ? - properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_L] : null, + isDisadvagtaged: properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] ? + properties[constants.IS_WORKFORCE_FACTOR_DISADVANTAGED_M] : null, }, ]; diff --git a/client/src/data/constants.tsx b/client/src/data/constants.tsx index 49b6806d..618341f4 100644 --- a/client/src/data/constants.tsx +++ b/client/src/data/constants.tsx @@ -35,8 +35,8 @@ export const PERFORMANCE_MARKER_MAP_IDLE = 'MAP_IDLE'; export type J40Properties = { [key: string]: any }; // Properties -export const SCORE_PROPERTY_HIGH = 'SL_PFS'; -export const SCORE_PROPERTY_LOW = 'L_SCORE'; +export const SCORE_PROPERTY_HIGH = 'SM_PFS'; +export const SCORE_PROPERTY_LOW = 'M_SCORE'; export const GEOID_PROPERTY = 'GEOID10'; // Indicator values: @@ -70,14 +70,14 @@ export const PROXIMITY_RMP_SITES_PERCENTILE = 'RMP_PFS'; export const PROXIMITY_TSDF_SITES_PERCENTILE = 'TSDF_PFS'; // Category booleans (disadvantaged or not): -export const IS_CLIMATE_FACTOR_DISADVANTAGED_L = 'L_CLT'; -export const IS_ENERGY_FACTOR_DISADVANTAGED_L = 'L_ENY'; -export const IS_TRANSPORT_FACTOR_DISADVANTAGED_L = 'L_TRN'; -export const IS_HOUSING_FACTOR_DISADVANTAGED_L = 'L_HSG'; -export const IS_POLLUTION_FACTOR_DISADVANTAGED_L = 'L_PLN'; -export const IS_WATER_FACTOR_DISADVANTAGED_L = 'L_WTR'; -export const IS_HEALTH_FACTOR_DISADVANTAGED_L = 'L_HLTH'; -export const IS_WORKFORCE_FACTOR_DISADVANTAGED_L = 'L_WKFC'; +export const IS_CLIMATE_FACTOR_DISADVANTAGED_M = 'M_CLT'; +export const IS_ENERGY_FACTOR_DISADVANTAGED_M = 'M_ENY'; +export const IS_TRANSPORT_FACTOR_DISADVANTAGED_M = 'M_TRN'; +export const IS_HOUSING_FACTOR_DISADVANTAGED_M = 'M_HSG'; +export const IS_POLLUTION_FACTOR_DISADVANTAGED_M = 'M_PLN'; +export const IS_WATER_FACTOR_DISADVANTAGED_M = 'M_WTR'; +export const IS_HEALTH_FACTOR_DISADVANTAGED_M = 'M_HLTH'; +export const IS_WORKFORCE_FACTOR_DISADVANTAGED_M = 'M_WKFC'; // Total indicators values: export const TOTAL_NUMBER_OF_DISADVANTAGE_INDICATORS = 'TC'; diff --git a/data/data-pipeline/data_pipeline/etl/constants.py b/data/data-pipeline/data_pipeline/etl/constants.py index b63160eb..fc6adf1f 100644 --- a/data/data-pipeline/data_pipeline/etl/constants.py +++ b/data/data-pipeline/data_pipeline/etl/constants.py @@ -90,8 +90,8 @@ DATASET_LIST = [ "class_name": "HudRecapETL", }, { - "name": "epa_rsei_aggregate", - "module_dir": "epa_rsei_aggregate", + "name": "epa_rsei", + "module_dir": "epa_rsei", "class_name": "EPARiskScreeningEnvironmentalIndicatorsETL", }, { diff --git a/data/data-pipeline/data_pipeline/etl/score/constants.py b/data/data-pipeline/data_pipeline/etl/score/constants.py index 19c1bd06..1bd16abc 100644 --- a/data/data-pipeline/data_pipeline/etl/score/constants.py +++ b/data/data-pipeline/data_pipeline/etl/score/constants.py @@ -120,16 +120,16 @@ TILES_SCORE_COLUMNS = { + field_names.PERCENTILE_FIELD_SUFFIX: "UF_PFS", field_names.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "WF_PFS", - field_names.L_WATER: "L_WTR", - field_names.L_WORKFORCE: "L_WKFC", - field_names.L_CLIMATE: "L_CLT", - field_names.L_ENERGY: "L_ENY", - field_names.L_TRANSPORTATION: "L_TRN", - field_names.L_HOUSING: "L_HSG", - field_names.L_POLLUTION: "L_PLN", - field_names.L_HEALTH: "L_HLTH", - field_names.SCORE_L_COMMUNITIES: "SL_C", - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX: "SL_PFS", + field_names.M_WATER: "M_WTR", + field_names.M_WORKFORCE: "M_WKFC", + field_names.M_CLIMATE: "M_CLT", + field_names.M_ENERGY: "M_ENY", + field_names.M_TRANSPORTATION: "M_TRN", + field_names.M_HOUSING: "M_HSG", + field_names.M_POLLUTION: "M_PLN", + field_names.M_HEALTH: "M_HLTH", + field_names.SCORE_M_COMMUNITIES: "SM_C", + field_names.SCORE_M + field_names.PERCENTILE_FIELD_SUFFIX: "SM_PFS", field_names.EXPECTED_POPULATION_LOSS_RATE_LOW_INCOME_FIELD: "EPLRLI", field_names.EXPECTED_AGRICULTURE_LOSS_RATE_LOW_INCOME_FIELD: "EALRLI", field_names.EXPECTED_BUILDING_LOSS_RATE_LOW_INCOME_FIELD: "EBLRLI", @@ -151,8 +151,8 @@ TILES_SCORE_COLUMNS = { field_names.POVERTY_LOW_HS_EDUCATION_FIELD: "PLHSE", field_names.LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD: "LMILHSE", field_names.UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD: "ULHSE", - field_names.LOW_HS_EDUCATION_FIELD: "LHE", - field_names.FPL_200_SERIES: "FPL200S", + field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD: "LHE", + field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES: "FPL200S", field_names.THRESHOLD_COUNT: "TC", field_names.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD: "IAULHSE", field_names.ISLAND_AREAS_POVERTY_LOW_HS_EDUCATION_FIELD: "ISPLHSE", @@ -191,10 +191,10 @@ TILES_SCORE_FLOAT_COLUMNS = [ field_names.TSDF_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.UNEMPLOYMENT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LOW_HS_EDUCATION_FIELD, + field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD, field_names.ISLAND_AREAS_LOW_HS_EDUCATION_FIELD, field_names.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.SCORE_M + field_names.PERCENTILE_FIELD_SUFFIX, ] # Finally we augment with the GEOID10, county, and state @@ -203,9 +203,9 @@ DOWNLOADABLE_SCORE_COLUMNS = [ field_names.COUNTY_FIELD, field_names.STATE_FIELD, field_names.THRESHOLD_COUNT, - field_names.SCORE_L_COMMUNITIES, + field_names.SCORE_M_COMMUNITIES, field_names.TOTAL_POP_FIELD, - field_names.FPL_200_SERIES, + field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES, field_names.EXPECTED_AGRICULTURE_LOSS_RATE_LOW_INCOME_FIELD, field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, diff --git a/data/data-pipeline/data_pipeline/etl/score/etl_score_geo.py b/data/data-pipeline/data_pipeline/etl/score/etl_score_geo.py index ba728040..4ac543c3 100644 --- a/data/data-pipeline/data_pipeline/etl/score/etl_score_geo.py +++ b/data/data-pipeline/data_pipeline/etl/score/etl_score_geo.py @@ -33,12 +33,12 @@ class GeoScoreETL(ExtractTransformLoad): self.DATA_PATH / "census" / "geojson" / "us.json" ) - # Import the shortened name for Score L percentile ("SL_PFS") that's used on the + # Import the shortened name for Score M percentile ("SM_PFS") that's used on the # tiles. self.TARGET_SCORE_SHORT_FIELD = constants.TILES_SCORE_COLUMNS[ - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX + field_names.SCORE_M + field_names.PERCENTILE_FIELD_SUFFIX ] - self.TARGET_SCORE_RENAME_TO = "L_SCORE" + self.TARGET_SCORE_RENAME_TO = "M_SCORE" # Import the shortened name for tract ("GTF") that's used on the tiles. self.TRACT_SHORT_FIELD = constants.TILES_SCORE_COLUMNS[ diff --git a/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py b/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py index 49836d7f..c42d7b84 100644 --- a/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py +++ b/data/data-pipeline/data_pipeline/etl/score/etl_score_post.py @@ -323,7 +323,7 @@ class PostScoreETL(ExtractTransformLoad): # Rename score column downloadable_df_copy = downloadable_df.rename( columns={ - field_names.SCORE_L_COMMUNITIES: "Identified as disadvantaged (v0.1)" + field_names.SCORE_M_COMMUNITIES: "Identified as disadvantaged (v0.1)" }, inplace=False, ) diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/sample_data/score_data_initial.csv b/data/data-pipeline/data_pipeline/etl/score/tests/sample_data/score_data_initial.csv index f3a2ad6e..242647f8 100644 --- a/data/data-pipeline/data_pipeline/etl/score/tests/sample_data/score_data_initial.csv +++ b/data/data-pipeline/data_pipeline/etl/score/tests/sample_data/score_data_initial.csv @@ -1,3 +1,3 @@ -GEOID10_TRACT,Persistent Poverty Census Tract,Housing burden (percent),Total population,Median household income (% of state median household income),Current asthma among adults aged greater than or equal to 18 years,Coronary heart disease among adults aged greater than or equal to 18 years,Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years,Current lack of health insurance among adults aged 18-64 years,Diagnosed diabetes among adults aged greater than or equal to 18 years,Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years,Percent of individuals < 100% Federal Poverty Line,Percent of individuals < 150% Federal Poverty Line,Percent of individuals below 200% Federal Poverty Line,Area Median Income (State or metropolitan),Median household income in the past 12 months,Energy burden,FEMA Risk Index Expected Annual Loss Score,Urban Heuristic Flag,Air toxics cancer risk,Respiratory hazard index,Diesel particulate matter exposure,PM2.5 in the air,Ozone,Traffic proximity and volume,Proximity to Risk Management Plan (RMP) facilities,Proximity to hazardous waste sites,Proximity to NPL sites,Wastewater discharge,Percent pre-1960s housing (lead paint indicator),Individuals under 5 years old,Individuals over 64 years old,Linguistic isolation (percent),Percent of households in linguistic isolation,Poverty (Less than 200% of federal poverty line),Percent individuals age 25 or over with less than high school degree,Unemployment (percent),Median value ($) of owner-occupied housing units,Percent enrollment in college or graduate school,Expected building loss rate (Natural Hazards Risk Index),Expected agricultural loss rate (Natural Hazards Risk Index),Expected population loss rate (Natural Hazards Risk Index),Percent individuals age 25 or over with less than high school degree in 2009,Percentage households below 100% of federal poverty line in 2009,Unemployment (percent) in 2009,Unemployment (percent) in 2010,Percent of individuals less than 100% Federal Poverty Line in 2010,Total population in 2009,Summer days above 90F,Percent low access to healthy food,Percent impenetrable surface areas,Third grade reading proficiency,Median household income as a percent of area median income,Life expectancy (years),Median household income as a percent of territory median income in 2009,Housing burden (percent) (percentile),Housing burden (percent) (value urban only),Housing burden (percent) (percentile urban only),Housing burden (percent) (value rural only),Housing burden (percent) (percentile rural only),Housing burden (percent) (percentile urban/rural),Housing burden (percent) (min-max normalized),Total population (percentile),Total population (value urban only),Total population (percentile urban only),Total population (value rural only),Total population (percentile rural only),Total population (percentile urban/rural),Total population (min-max normalized),Median household income (% of state median household income) (percentile),Median household income (% of state median household income) (value urban only),Median household income (% of state median household income) (percentile urban only),Median household income (% of state median household income) (value rural only),Median household income (% of state median household income) (percentile rural only),Median household income (% of state median household income) (percentile urban/rural),Median household income (% of state median household income) (min-max normalized),Current asthma among adults aged greater than or equal to 18 years (percentile),Current asthma among adults aged greater than or equal to 18 years (value urban only),Current asthma among adults aged greater than or equal to 18 years (percentile urban only),Current asthma among adults aged greater than or equal to 18 years (value rural only),Current asthma among adults aged greater than or equal to 18 years (percentile rural only),Current asthma among adults aged greater than or equal to 18 years (percentile urban/rural),Current asthma among adults aged greater than or equal to 18 years (min-max normalized),Coronary heart disease among adults aged greater than or equal to 18 years (percentile),Coronary heart disease among adults aged greater than or equal to 18 years (value urban only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile urban only),Coronary heart disease among adults aged greater than or equal to 18 years (value rural only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile rural only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile urban/rural),Coronary heart disease among adults aged greater than or equal to 18 years (min-max normalized),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (value urban only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile urban only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (value rural only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile rural only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile urban/rural),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (min-max normalized),Current lack of health insurance among adults aged 18-64 years (percentile),Current lack of health insurance among adults aged 18-64 years (value urban only),Current lack of health insurance among adults aged 18-64 years (percentile urban only),Current lack of health insurance among adults aged 18-64 years (value rural only),Current lack of health insurance among adults aged 18-64 years (percentile rural only),Current lack of health insurance among adults aged 18-64 years (percentile urban/rural),Current lack of health insurance among adults aged 18-64 years (min-max normalized),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile),Diagnosed diabetes among adults aged greater than or equal to 18 years (value urban only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile urban only),Diagnosed diabetes among adults aged greater than or equal to 18 years (value rural only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile rural only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile urban/rural),Diagnosed diabetes among adults aged greater than or equal to 18 years (min-max normalized),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (value urban only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile urban only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (value rural only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile rural only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile urban/rural),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (min-max normalized),Percent of individuals < 100% Federal Poverty Line (percentile),Percent of individuals < 100% Federal Poverty Line (value urban only),Percent of individuals < 100% Federal Poverty Line (percentile urban only),Percent of individuals < 100% Federal Poverty Line (value rural only),Percent of individuals < 100% Federal Poverty Line (percentile rural only),Percent of individuals < 100% Federal Poverty Line (percentile urban/rural),Percent of individuals < 100% Federal Poverty Line (min-max normalized),Percent of individuals < 150% Federal Poverty Line (percentile),Percent of individuals < 150% Federal Poverty Line (value urban only),Percent of individuals < 150% Federal Poverty Line (percentile urban only),Percent of individuals < 150% Federal Poverty Line (value rural only),Percent of individuals < 150% Federal Poverty Line (percentile rural only),Percent of individuals < 150% Federal Poverty Line (percentile urban/rural),Percent of individuals < 150% Federal Poverty Line (min-max normalized),Percent of individuals below 200% Federal Poverty Line (percentile),Percent of individuals below 200% Federal Poverty Line (value urban only),Percent of individuals below 200% Federal Poverty Line (percentile urban only),Percent of individuals below 200% Federal Poverty Line (value rural only),Percent of individuals below 200% Federal Poverty Line (percentile rural only),Percent of individuals below 200% Federal Poverty Line (percentile urban/rural),Percent of individuals below 200% Federal Poverty Line (min-max normalized),Area Median Income (State or metropolitan) (percentile),Area Median Income (State or metropolitan) (value urban only),Area Median Income (State or metropolitan) (percentile urban only),Area Median Income (State or metropolitan) (value rural only),Area Median Income (State or metropolitan) (percentile rural only),Area Median Income (State or metropolitan) (percentile urban/rural),Area Median Income (State or metropolitan) (min-max normalized),Median household income in the past 12 months (percentile),Median household income in the past 12 months (value urban only),Median household income in the past 12 months (percentile urban only),Median household income in the past 12 months (value rural only),Median household income in the past 12 months (percentile rural only),Median household income in the past 12 months (percentile urban/rural),Median household income in the past 12 months (min-max normalized),Energy burden (percentile),Energy burden (value urban only),Energy burden (percentile urban only),Energy burden (value rural only),Energy burden (percentile rural only),Energy burden (percentile urban/rural),Energy burden (min-max normalized),FEMA Risk Index Expected Annual Loss Score (percentile),FEMA Risk Index Expected Annual Loss Score (value urban only),FEMA Risk Index Expected Annual Loss Score (percentile urban only),FEMA Risk Index Expected Annual Loss Score (value rural only),FEMA Risk Index Expected Annual Loss Score (percentile rural only),FEMA Risk Index Expected Annual Loss Score (percentile urban/rural),FEMA Risk Index Expected Annual Loss Score (min-max normalized),Urban Heuristic Flag (percentile),Urban Heuristic Flag (value urban only),Urban Heuristic Flag (percentile urban only),Urban Heuristic Flag (value rural only),Urban Heuristic Flag (percentile rural only),Urban Heuristic Flag (percentile urban/rural),Urban Heuristic Flag (min-max normalized),Air toxics cancer risk (percentile),Air toxics cancer risk (value urban only),Air toxics cancer risk (percentile urban only),Air toxics cancer risk (value rural only),Air toxics cancer risk (percentile rural only),Air toxics cancer risk (percentile urban/rural),Air toxics cancer risk (min-max normalized),Respiratory hazard index (percentile),Respiratory hazard index (value urban only),Respiratory hazard index (percentile urban only),Respiratory hazard index (value rural only),Respiratory hazard index (percentile rural only),Respiratory hazard index (percentile urban/rural),Respiratory hazard index (min-max normalized),Diesel particulate matter exposure (percentile),Diesel particulate matter exposure (value urban only),Diesel particulate matter exposure (percentile urban only),Diesel particulate matter exposure (value rural only),Diesel particulate matter exposure (percentile rural only),Diesel particulate matter exposure (percentile urban/rural),Diesel particulate matter exposure (min-max normalized),PM2.5 in the air (percentile),PM2.5 in the air (value urban only),PM2.5 in the air (percentile urban only),PM2.5 in the air (value rural only),PM2.5 in the air (percentile rural only),PM2.5 in the air (percentile urban/rural),PM2.5 in the air (min-max normalized),Ozone (percentile),Ozone (value urban only),Ozone (percentile urban only),Ozone (value rural only),Ozone (percentile rural only),Ozone (percentile urban/rural),Ozone (min-max normalized),Traffic proximity and volume (percentile),Traffic proximity and volume (value urban only),Traffic proximity and volume (percentile urban only),Traffic proximity and volume (value rural only),Traffic proximity and volume (percentile rural only),Traffic proximity and volume (percentile urban/rural),Traffic proximity and volume (min-max normalized),Proximity to Risk Management Plan (RMP) facilities (percentile),Proximity to Risk Management Plan (RMP) facilities (value urban only),Proximity to Risk Management Plan (RMP) facilities (percentile urban only),Proximity to Risk Management Plan (RMP) facilities (value rural only),Proximity to Risk Management Plan (RMP) facilities (percentile rural only),Proximity to Risk Management Plan (RMP) facilities (percentile urban/rural),Proximity to Risk Management Plan (RMP) facilities (min-max normalized),Proximity to hazardous waste sites (percentile),Proximity to hazardous waste sites (value urban only),Proximity to hazardous waste sites (percentile urban only),Proximity to hazardous waste sites (value rural only),Proximity to hazardous waste sites (percentile rural only),Proximity to hazardous waste sites (percentile urban/rural),Proximity to hazardous waste sites (min-max normalized),Proximity to NPL sites (percentile),Proximity to NPL sites (value urban only),Proximity to NPL sites (percentile urban only),Proximity to NPL sites (value rural only),Proximity to NPL sites (percentile rural only),Proximity to NPL sites (percentile urban/rural),Proximity to NPL sites (min-max normalized),Wastewater discharge (percentile),Wastewater discharge (value urban only),Wastewater discharge (percentile urban only),Wastewater discharge (value rural only),Wastewater discharge (percentile rural only),Wastewater discharge (percentile urban/rural),Wastewater discharge (min-max normalized),Percent pre-1960s housing (lead paint indicator) (percentile),Percent pre-1960s housing (lead paint indicator) (value urban only),Percent pre-1960s housing (lead paint indicator) (percentile urban only),Percent pre-1960s housing (lead paint indicator) (value rural only),Percent pre-1960s housing (lead paint indicator) (percentile rural only),Percent pre-1960s housing (lead paint indicator) (percentile urban/rural),Percent pre-1960s housing (lead paint indicator) (min-max normalized),Individuals under 5 years old (percentile),Individuals under 5 years old (value urban only),Individuals under 5 years old (percentile urban only),Individuals under 5 years old (value rural only),Individuals under 5 years old (percentile rural only),Individuals under 5 years old (percentile urban/rural),Individuals under 5 years old (min-max normalized),Individuals over 64 years old (percentile),Individuals over 64 years old (value urban only),Individuals over 64 years old (percentile urban only),Individuals over 64 years old (value rural only),Individuals over 64 years old (percentile rural only),Individuals over 64 years old (percentile urban/rural),Individuals over 64 years old (min-max normalized),Linguistic isolation (percent) (percentile),Linguistic isolation (percent) (value urban only),Linguistic isolation (percent) (percentile urban only),Linguistic isolation (percent) (value rural only),Linguistic isolation (percent) (percentile rural only),Linguistic isolation (percent) (percentile urban/rural),Linguistic isolation (percent) (min-max normalized),Percent of households in linguistic isolation (percentile),Percent of households in linguistic isolation (value urban only),Percent of households in linguistic isolation (percentile urban only),Percent of households in linguistic isolation (value rural only),Percent of households in linguistic isolation (percentile rural only),Percent of households in linguistic isolation (percentile urban/rural),Percent of households in linguistic isolation (min-max normalized),Poverty (Less than 200% of federal poverty line) (percentile),Poverty (Less than 200% of federal poverty line) (value urban only),Poverty (Less than 200% of federal poverty line) (percentile urban only),Poverty (Less than 200% of federal poverty line) (value rural only),Poverty (Less than 200% of federal poverty line) (percentile rural only),Poverty (Less than 200% of federal poverty line) (percentile urban/rural),Poverty (Less than 200% of federal poverty line) (min-max normalized),Percent individuals age 25 or over with less than high school degree (percentile),Percent individuals age 25 or over with less than high school degree (value urban only),Percent individuals age 25 or over with less than high school degree (percentile urban only),Percent individuals age 25 or over with less than high school degree (value rural only),Percent individuals age 25 or over with less than high school degree (percentile rural only),Percent individuals age 25 or over with less than high school degree (percentile urban/rural),Percent individuals age 25 or over with less than high school degree (min-max normalized),Unemployment (percent) (percentile),Unemployment (percent) (value urban only),Unemployment (percent) (percentile urban only),Unemployment (percent) (value rural only),Unemployment (percent) (percentile rural only),Unemployment (percent) (percentile urban/rural),Unemployment (percent) (min-max normalized),Median value ($) of owner-occupied housing units (percentile),Median value ($) of owner-occupied housing units (value urban only),Median value ($) of owner-occupied housing units (percentile urban only),Median value ($) of owner-occupied housing units (value rural only),Median value ($) of owner-occupied housing units (percentile rural only),Median value ($) of owner-occupied housing units (percentile urban/rural),Median value ($) of owner-occupied housing units (min-max normalized),Percent enrollment in college or graduate school (percentile),Percent enrollment in college or graduate school (value urban only),Percent enrollment in college or graduate school (percentile urban only),Percent enrollment in college or graduate school (value rural only),Percent enrollment in college or graduate school (percentile rural only),Percent enrollment in college or graduate school (percentile urban/rural),Percent enrollment in college or graduate school (min-max normalized),Expected building loss rate (Natural Hazards Risk Index) (percentile),Expected building loss rate (Natural Hazards Risk Index) (value urban only),Expected building loss rate (Natural Hazards Risk Index) (percentile urban only),Expected building loss rate (Natural Hazards Risk Index) (value rural only),Expected building loss rate (Natural Hazards Risk Index) (percentile rural only),Expected building loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected building loss rate (Natural Hazards Risk Index) (min-max normalized),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile),Expected agricultural loss rate (Natural Hazards Risk Index) (value urban only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile urban only),Expected agricultural loss rate (Natural Hazards Risk Index) (value rural only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile rural only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected agricultural loss rate (Natural Hazards Risk Index) (min-max normalized),Expected population loss rate (Natural Hazards Risk Index) (percentile),Expected population loss rate (Natural Hazards Risk Index) (value urban only),Expected population loss rate (Natural Hazards Risk Index) (percentile urban only),Expected population loss rate (Natural Hazards Risk Index) (value rural only),Expected population loss rate (Natural Hazards Risk Index) (percentile rural only),Expected population loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected population loss rate (Natural Hazards Risk Index) (min-max normalized),Percent individuals age 25 or over with less than high school degree in 2009 (percentile),Percent individuals age 25 or over with less than high school degree in 2009 (value urban only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile urban only),Percent individuals age 25 or over with less than high school degree in 2009 (value rural only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile rural only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile urban/rural),Percent individuals age 25 or over with less than high school degree in 2009 (min-max normalized),Percentage households below 100% of federal poverty line in 2009 (percentile),Percentage households below 100% of federal poverty line in 2009 (value urban only),Percentage households below 100% of federal poverty line in 2009 (percentile urban only),Percentage households below 100% of federal poverty line in 2009 (value rural only),Percentage households below 100% of federal poverty line in 2009 (percentile rural only),Percentage households below 100% of federal poverty line in 2009 (percentile urban/rural),Percentage households below 100% of federal poverty line in 2009 (min-max normalized),Unemployment (percent) in 2009 (percentile),Unemployment (percent) in 2009 (value urban only),Unemployment (percent) in 2009 (percentile urban only),Unemployment (percent) in 2009 (value rural only),Unemployment (percent) in 2009 (percentile rural only),Unemployment (percent) in 2009 (percentile urban/rural),Unemployment (percent) in 2009 (min-max normalized),Unemployment (percent) in 2010 (percentile),Unemployment (percent) in 2010 (value urban only),Unemployment (percent) in 2010 (percentile urban only),Unemployment (percent) in 2010 (value rural only),Unemployment (percent) in 2010 (percentile rural only),Unemployment (percent) in 2010 (percentile urban/rural),Unemployment (percent) in 2010 (min-max normalized),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile),Percent of individuals less than 100% Federal Poverty Line in 2010 (value urban only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile urban only),Percent of individuals less than 100% Federal Poverty Line in 2010 (value rural only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile rural only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile urban/rural),Percent of individuals less than 100% Federal Poverty Line in 2010 (min-max normalized),Total population in 2009 (percentile),Total population in 2009 (value urban only),Total population in 2009 (percentile urban only),Total population in 2009 (value rural only),Total population in 2009 (percentile rural only),Total population in 2009 (percentile urban/rural),Total population in 2009 (min-max normalized),Summer days above 90F (percentile),Summer days above 90F (value urban only),Summer days above 90F (percentile urban only),Summer days above 90F (value rural only),Summer days above 90F (percentile rural only),Summer days above 90F (percentile urban/rural),Summer days above 90F (min-max normalized),Percent low access to healthy food (percentile),Percent low access to healthy food (value urban only),Percent low access to healthy food (percentile urban only),Percent low access to healthy food (value rural only),Percent low access to healthy food (percentile rural only),Percent low access to healthy food (percentile urban/rural),Percent low access to healthy food (min-max normalized),Percent impenetrable surface areas (percentile),Percent impenetrable surface areas (value urban only),Percent impenetrable surface areas (percentile urban only),Percent impenetrable surface areas (value rural only),Percent impenetrable surface areas (percentile rural only),Percent impenetrable surface areas (percentile urban/rural),Percent impenetrable surface areas (min-max normalized),Low third grade reading proficiency (percentile),Third grade reading proficiency (value urban only),Low third grade reading proficiency (percentile urban only),Third grade reading proficiency (value rural only),Low third grade reading proficiency (percentile rural only),Low third grade reading proficiency (percentile urban/rural),Low median household income as a percent of area median income (percentile),Median household income as a percent of area median income (value urban only),Low median household income as a percent of area median income (percentile urban only),Median household income as a percent of area median income (value rural only),Low median household income as a percent of area median income (percentile rural only),Low median household income as a percent of area median income (percentile urban/rural),Low life expectancy (percentile),Life expectancy (years) (value urban only),Low life expectancy (percentile urban only),Life expectancy (years) (value rural only),Low life expectancy (percentile rural only),Low life expectancy (percentile urban/rural),Low median household income as a percent of territory median income in 2009 (percentile),Median household income as a percent of territory median income in 2009 (value urban only),Low median household income as a percent of territory median income in 2009 (percentile urban only),Median household income as a percent of territory median income in 2009 (value rural only),Low median household income as a percent of territory median income in 2009 (percentile rural only),Low median household income as a percent of territory median income in 2009 (percentile urban/rural),Total population in 2009 (island areas) and 2019 (states and PR),Score A,Score B,Socioeconomic Factors,Sensitive populations,Environmental effects,Exposures,Pollution Burden,Population Characteristics,Score C,Score D,Score E,"Low AMI, Low HS graduation",Meets socioeconomic criteria,Meets burden criteria,Score F (communities),Score G (communities),Score G,Score G (percentile),Score H (communities),Score H,Score I (communities),Score I,Score I (percentile),NMTC (communities),Score K (communities),Total threshold criteria exceeded,Is low income?,Greater than or equal to the 90th percentile for expected population loss rate and is low income?,Greater than or equal to the 90th percentile for expected agriculture loss rate and is low income?,Greater than or equal to the 90th percentile for expected building loss rate and is low income?,Climate Factor (Definition L),Greater than or equal to the 90th percentile for PM2.5 exposure and is low income?,Greater than or equal to the 90th percentile for energy burden and is low income?,Energy Factor (Definition L),Greater than or equal to the 90th percentile for diesel particulate matter and is low income?,Greater than or equal to the 90th percentile for traffic proximity and is low income?,Transportation Factor (Definition L),Greater than or equal to the 90th percentile for lead paint and the median house value is less than 90th percentile and is low income?,Greater than or equal to the 90th percentile for housing burden and is low income?,Housing Factor (Definition L),Greater than or equal to the 90th percentile for proximity to RMP sites and is low income?,Greater than or equal to the 90th percentile for proximity to superfund sites and is low income?,Greater than or equal to the 90th percentile for proximity to hazardous waste facilities and is low income?,Pollution Factor (Definition L),Greater than or equal to the 90th percentile for wastewater discharge and is low income?,Water Factor (Definition L),Greater than or equal to the 90th percentile for diabetes and is low income?,Greater than or equal to the 90th percentile for asthma and is low income?,Greater than or equal to the 90th percentile for heart disease and is low income?,Greater than or equal to the 90th percentile for low life expectancy and is low income?,Health Factor (Definition L),Low high school education,Greater than or equal to the 90th percentile for households in linguistic isolation and has low HS education,Greater than or equal to the 90th percentile for households at or below 100% federal poverty level and has low HS education,Greater than or equal to the 90th percentile for low median household income as a percent of area median income and has low HS education,Greater than or equal to the 90th percentile for unemployment and has low HS education,Unemployment (percent) in 2009 (island areas) and 2010 (states and PR),Unemployment (percent) in 2009 exceeds 90th percentile,Percentage households below 100% of federal poverty line in 2009 (island areas) and 2010 (states and PR),Percentage households below 100% of federal poverty line in 2009 exceeds 90th percentile,Low median household income as a percent of territory median income in 2009 exceeds 90th percentile,Low high school education in 2009 (island areas),Greater than or equal to the 90th percentile for unemployment and has low HS education in 2009 (island areas),Greater than or equal to the 90th percentile for households at or below 100% federal poverty level and has low HS education in 2009 (island areas),Greater than or equal to the 90th percentile for low median household income as a percent of area median income and has low HS education in 2009 (island areas),Workforce Factor (Definition L),Definition L (communities),Any Non-Workforce Factor (Definition L),Definition L (percentile),Score A (percentile),Score A (top 25th percentile),Score A (top 30th percentile),Score A (top 35th percentile),Score A (top 40th percentile),Score B (percentile),Score B (top 25th percentile),Score B (top 30th percentile),Score B (top 35th percentile),Score B (top 40th percentile),Score C (percentile),Score C (top 25th percentile),Score C (top 30th percentile),Score C (top 35th percentile),Score C (top 40th percentile),Score D (percentile),Score D (top 25th percentile),Score D (top 30th percentile),Score D (top 35th percentile),Score D (top 40th percentile),Score E (percentile),Score E (top 25th percentile),Score E (top 30th percentile),Score E (top 35th percentile),Score E (top 40th percentile) -01073001100,True,0.2752043596730245,4897.0,0.7327449738800064,11.2,7.2,6.7,16.6,19.3,15.1,0.150375939849624,0.318796992481203,0.3744360902255639,57447.0,37030.0,0.049,18.7674524286,1.0,51.1530304943,0.735568574566,0.63998588,10.3951975342,39.404630719,253.995131498,2.03499777769,0.708723792992,0.134193041308,1.0556674669,0.205868653936,0.0308352052277,0.185011231366,0.0,0.0,0.407205697528,0.0821917808219178,0.0092071611253196,85500.0,0.0890751899397432,0.0004047858,0.0052243632,2.8039e-06,,,,0.1536983669548511,0.3189099613330878,,62.666668,0.068036923,0.171,58.143433,0.6445941476491375,70.3,,0.6466760729305078,0.2752043596730245,0.5700318443928049,,,0.5700318443928049,0.2752043596730245,0.6512411994432508,4897.0,0.6248587667340021,,,0.6248587667340021,0.0696873532467162,0.2608335861859708,0.7327449738800064,0.2830143458759886,,,0.2830143458759886,0.1567394572745385,0.8509696039125366,11.2,0.835724928163468,,,0.835724928163468,0.3795180722891565,0.7264920810941454,7.2,0.7844637979353648,,,0.7844637979353648,0.1875,0.4789587420739856,6.7,0.5678012699989358,,,0.5678012699989358,0.303921568627451,0.6191105803406409,16.6,0.6018127638440527,,,0.6018127638440527,0.2094488188976378,0.965388552418323,19.3,0.9599666536592288,,,0.9599666536592288,0.4275862068965517,0.697012994398476,15.1,0.7279967363155841,,,0.7279967363155841,0.3440233236151603,0.62043226838371,0.150375939849624,0.6145691950863328,,,0.6145691950863328,0.150375939849624,0.7319580582099551,0.318796992481203,0.7209861695730607,,,0.7209861695730607,0.318796992481203,0.6304939233619051,0.3744360902255639,0.6277982991151962,,,0.6277982991151962,0.3744360902255639,0.305080182775983,57447.0,0.2657396925099514,,,0.2657396925099514,0.2232322025800286,0.1531195524384805,37030.0,0.1572054644434553,,,0.1572054644434553,0.1395180645004889,0.864954517474865,0.049,0.9005173954895489,,,0.9005173954895489,0.0037065052950075,0.6038301323911519,18.7674524286,0.6383816255626487,,,0.6383816255626487,0.1876745242859999,0.5972204988211937,1.0,0.5000085573944445,,,0.5000085573944445,1.0,0.9847958474680182,51.1530304943,0.9819551446670092,,,0.9819551446670092,0.0300384933188293,0.968365553602812,0.735568574566,0.962352336928608,,,0.962352336928608,0.1696726613313424,0.7632321085543794,0.63998588,0.70386920047937,,,0.70386920047937,0.1053235274194042,0.928945948563286,10.3951975342,0.914819538763832,,,0.914819538763832,0.5130755332417333,0.2507228532296667,39.404630719,0.2360646695853011,,,0.2360646695853011,0.2834163202031902,0.4608804184722397,253.995131498,0.3487028727629068,,,0.3487028727629068,0.0081194347824311,0.9022445642626452,2.03499777769,0.8805423357414318,,,0.8805423357414318,0.1192079731904979,0.4244672369292306,0.708723792992,0.2870715924264731,,,0.2870715924264731,0.0016327034632494,0.753733057661383,0.134193041308,0.7050707022289178,,,0.7050707022289178,0.0172289593763426,0.9223869977156124,1.0556674669,0.9078447963253958,,,0.9078447963253958,9.412822248180045e-06,0.4454669531492817,0.205868653936,0.4334577327353032,,,0.4334577327353032,0.205868653936,0.1202416183565086,0.0308352052277,0.108484267470127,,,0.108484267470127,0.0793595720750642,0.695774381427278,0.185011231366,0.7452494265073442,,,0.7452494265073442,0.185011231366,0.1272208772721677,0.0,0.0997988895955446,,,0.0997988895955446,0.0,0.1284712368751773,0.0,0.0986150580340329,,,0.0986150580340329,0.0,0.668247726382076,0.407205697528,0.6576848015886603,,,0.6576848015886603,0.407205697528,0.4189274017467249,0.0821917808219178,0.4443872826422471,,,0.4443872826422471,0.0821917808219178,0.0297871177547618,0.0092071611253196,0.0285699569046924,,,0.0285699569046924,0.0092071611253196,0.1124511830921203,85500.0,0.1074913548122025,,,0.1074913548122025,0.0379401628742081,0.7459685121012851,0.0890751899397432,0.6989610478672336,,,0.6989610478672336,0.0890751899397432,0.7846412062513758,0.0004047858,0.82138883658833,,,0.82138883658833,0.01597287904858,0.5120452999319701,0.0052243632,0.5028314457028648,,,0.5028314457028648,0.0095124530398832,0.6143028498159407,2.8039e-06,0.6689315237296548,,,0.6689315237296548,0.0013204531501148,,,,,,,,,,,,,,,,,,,,,,0.9349594607528132,0.1536983669548511,0.9315960352498582,,,0.9315960352498582,0.1536983669548511,0.8950599559730369,0.3189099613330878,0.8870754376621368,,,0.8870754376621368,0.3189099613330878,,,,,,,,0.7537922665342821,62.666668,0.7585193484443679,,,0.7585193484443679,0.4423529401799308,0.8019598155467721,0.068036923,0.7905320987865615,,,0.7905320987865615,0.068036923,0.4126953421856217,0.171,0.2701910981682835,,,0.2701910981682835,0.1775700879261655,0.990724418702258,58.143433,0.9890918535191758,,,0.9890918535191758,0.8209741753282674,0.6445941476491375,0.7947837521917007,,,0.7947837521917007,0.97046998263836,70.3,0.9652438793658,,,0.9652438793658,,,,,,,4897.0,0.5435875640644005,0.2799472837363994,0.3784219111378495,0.3144122923519848,0.6896597619436307,0.7261571216484003,0.7139913350801438,0.3464171017449171,0.2473388089694474,0.1547617998296523,0.3781718392172476,False,True,True,True,True,1,1,True,1,True,1,1,True,True,0,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,0.1536983669548511,False,0.3189099613330878,False,False,False,False,False,False,False,False,False,0,0.5532898204078324,False,False,False,False,0.5490856986899564,False,False,False,False,0.5480683083104825,False,False,False,False,0.5438440021080796,False,False,False,False,0.3320495668977446,False,False,False,False -01073001400,True,0.1823529411764705,1906.0,0.7136694633528574,11.1,9.1,7.3,21.4,22.4,17.4,0.2816032887975334,0.3679342240493319,0.4835560123329907,57447.0,36066.0,0.07,17.3011023381,1.0,54.6950518653,0.76056054321,0.9098084377,10.498270137,39.3676601307,3015.87969265,1.81382525188,3.24085850684,0.214095348703,0.365101735929,0.628839590444,0.0582371458552,0.178908709339,0.0245098039215686,0.0165289256198,0.425498426023,0.1742543171114599,0.1150121065375302,67800.0,0.0771549125979505,0.0008951111,0.0067284885,2.3791e-06,,,,0.0804953560371517,0.2950894905920146,,61.666668,0.087159691,0.34900002,93.77919,0.6278134628440127,71.0,,0.3421186011150532,0.1823529411764705,0.2730613650055943,,,0.2730613650055943,0.1823529411764705,0.0867961243766976,1906.0,0.0702656897319135,,,0.0702656897319135,0.0271235644860611,0.2409731608418613,0.7136694633528574,0.263412880473859,,,0.263412880473859,0.1524802086740484,0.8385794307486707,11.1,0.8242488204618823,,,0.8242488204618823,0.3734939759036144,0.9217563763541756,9.1,0.934238532761006,,,0.934238532761006,0.2391304347826086,0.6048579715089994,7.3,0.6840345524850119,,,0.6840345524850119,0.3333333333333333,0.7894025988796952,21.4,0.765821774451027,,,0.765821774451027,0.2850393700787401,0.9878088657624612,22.4,0.9854641881585016,,,0.9854641881585016,0.4988505747126436,0.8447283118655634,17.4,0.8547216999538827,,,0.8547216999538827,0.411078717201166,0.8689250707460116,0.2816032887975334,0.8593419809294734,,,0.8593419809294734,0.2816032887975334,0.8013233263612626,0.3679342240493319,0.7879907224465252,,,0.7879907224465252,0.3679342240493319,0.7892247330790578,0.4835560123329907,0.7755862898376428,,,0.7755862898376428,0.4835560123329907,0.305080182775983,57447.0,0.2657396925099514,,,0.2657396925099514,0.2232322025800286,0.1410656612748476,36066.0,0.1454103468346629,,,0.1454103468346629,0.1356231464796244,0.970802270706518,0.07,0.9745685506050604,,,0.9745685506050604,0.0052950075642965,0.5282998116553705,17.3011023381,0.565061869961834,,,0.565061869961834,0.173011023381,0.5972204988211937,1.0,0.5000085573944445,,,0.5000085573944445,1.0,0.9895233034972276,54.6950518653,0.98758774182503,,,0.98758774182503,0.0324014302096176,0.9765534529502324,0.76056054321,0.9720766991953432,,,0.9720766991953432,0.1759137053158734,0.9016362174902248,0.9098084377,0.8766135935627462,,,0.8766135935627462,0.1497290027189099,0.9329441224077584,10.498270137,0.9196283911889414,,,0.9196283911889414,0.5213510451938572,0.2492010569566841,39.3676601307,0.2346340790789065,,,0.2346340790789065,0.2826912370192468,0.941127799514774,3015.87969265,0.9280004126050854,,,0.9280004126050854,0.0964083008791804,0.8815556546533155,1.81382525188,0.8555140890882322,,,0.8555140890882322,0.1062519253676046,0.7527465845056148,3.24085850684,0.6879172801040846,,,0.6879172801040846,0.0074660410167418,0.8655558708666099,0.214095348703,0.8377272571643783,,,0.8377272571643783,0.027487565893985,0.8882148073250197,0.365101735929,0.8688263024295902,,,0.8688263024295902,3.255416928678718e-06,0.8313806570181485,0.628839590444,0.7904954291779368,,,0.7904954291779368,0.628839590444,0.5164051837137336,0.0582371458552,0.4798079227582429,,,0.4798079227582429,0.1498830619032175,0.6618964608586371,0.178908709339,0.715890026363543,,,0.715890026363543,0.178908709339,0.5796575164471435,0.0245098039215686,0.5161060212798873,,,0.5161060212798873,0.0245098039215686,0.5008648531776597,0.0165289256198,0.424872462081008,,,0.424872462081008,0.0165289256198,0.6964500479723247,0.425498426023,0.6838429143698428,,,0.6838429143698428,0.425498426023,0.751664847161572,0.1742543171114599,0.7508831498439483,,,0.7508831498439483,0.1742543171114599,0.9067171316918536,0.1150121065375302,0.9060831344539256,,,0.9060831344539256,0.1150121065375302,0.0519655139795408,67800.0,0.0554747149655904,,,0.0554747149655904,0.0290456994515583,0.6434691260334525,0.0771549125979505,0.5807502400219449,,,0.5807502400219449,0.0771549125979505,0.9166162227602904,0.0008951111,0.9302158396521918,,,0.9302158396521918,0.0353246959378835,0.5755532434271079,0.0067284885,0.5614035087719298,,,0.5614035087719298,0.0122511928214689,0.558933421571466,2.3791e-06,0.6145407246401615,,,0.6145407246401615,0.0011202645354936,,,,,,,,,,,,,,,,,,,,,,0.6917513228236646,0.0804953560371517,0.6841770738494838,,,0.6841770738494838,0.0804953560371517,0.8737301229199994,0.2950894905920146,0.8632982287353754,,,0.8632982287353754,0.2950894905920146,,,,,,,,0.7501654807214959,61.666668,0.7551581487546324,,,0.7551581487546324,0.435294116816609,0.8647617479139218,0.087159691,0.8519741908983552,,,0.8519741908983552,0.087159691,0.6268497920495212,0.34900002,0.5359536815260283,,,0.5359536815260283,0.3624091475885,0.9537899773356836,93.77919,0.9454938966323262,,,0.9454938966323262,0.8355751594025679,0.6278134628440127,0.8102169783752192,,,0.8102169783752192,0.959938777375042,71.0,0.9533526317781056,,,0.9533526317781056,,,,,,,1906.0,0.7240574475669483,0.523497018864787,0.6395630962236926,0.5859863870065047,0.8438907148737418,0.8318309921361502,0.8358508997153473,0.6127747416150986,0.5121883191018196,0.1843255189540058,0.6553216288775894,False,True,True,True,True,1,1,True,1,True,1,1,True,True,9,True,False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False,False,True,False,True,True,True,True,False,False,False,True,0.0804953560371517,False,0.2950894905920146,False,False,False,False,False,False,True,True,True,1,0.7460439723787516,False,True,True,True,0.7500818777292576,True,True,True,True,0.9394564656693726,True,True,True,True,0.6605181011067418,False,False,True,True,0.7347062877528682,False,True,True,True +GEOID10_TRACT,Persistent Poverty Census Tract,Housing burden (percent),Total population,Median household income (% of state median household income),Current asthma among adults aged greater than or equal to 18 years,Coronary heart disease among adults aged greater than or equal to 18 years,Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years,Current lack of health insurance among adults aged 18-64 years,Diagnosed diabetes among adults aged greater than or equal to 18 years,Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years,Percent of individuals < 100% Federal Poverty Line,Percent of individuals < 150% Federal Poverty Line,Percent of individuals below 200% Federal Poverty Line,Area Median Income (State or metropolitan),Median household income in the past 12 months,Energy burden,FEMA Risk Index Expected Annual Loss Score,Urban Heuristic Flag,Air toxics cancer risk,Respiratory hazard index,Diesel particulate matter exposure,PM2.5 in the air,Ozone,Traffic proximity and volume,Proximity to Risk Management Plan (RMP) facilities,Proximity to hazardous waste sites,Proximity to NPL sites,Wastewater discharge,Percent pre-1960s housing (lead paint indicator),Individuals under 5 years old,Individuals over 64 years old,Linguistic isolation (percent),Percent of households in linguistic isolation,Poverty (Less than 200% of federal poverty line),Percent individuals age 25 or over with less than high school degree,Unemployment (percent),Median value ($) of owner-occupied housing units,Percent enrollment in college or graduate school,Expected building loss rate (Natural Hazards Risk Index),Expected agricultural loss rate (Natural Hazards Risk Index),Expected population loss rate (Natural Hazards Risk Index),Percent individuals age 25 or over with less than high school degree in 2009,Percentage households below 100% of federal poverty line in 2009,Unemployment (percent) in 2009,Unemployment (percent) in 2010,Percent of individuals less than 100% Federal Poverty Line in 2010,Total population in 2009,Summer days above 90F,Percent low access to healthy food,Percent impenetrable surface areas,Third grade reading proficiency,Median household income as a percent of area median income,Life expectancy (years),Median household income as a percent of territory median income in 2009,Housing burden (percent) (percentile),Housing burden (percent) (value urban only),Housing burden (percent) (percentile urban only),Housing burden (percent) (value rural only),Housing burden (percent) (percentile rural only),Housing burden (percent) (percentile urban/rural),Housing burden (percent) (min-max normalized),Total population (percentile),Total population (value urban only),Total population (percentile urban only),Total population (value rural only),Total population (percentile rural only),Total population (percentile urban/rural),Total population (min-max normalized),Median household income (% of state median household income) (percentile),Median household income (% of state median household income) (value urban only),Median household income (% of state median household income) (percentile urban only),Median household income (% of state median household income) (value rural only),Median household income (% of state median household income) (percentile rural only),Median household income (% of state median household income) (percentile urban/rural),Median household income (% of state median household income) (min-max normalized),Current asthma among adults aged greater than or equal to 18 years (percentile),Current asthma among adults aged greater than or equal to 18 years (value urban only),Current asthma among adults aged greater than or equal to 18 years (percentile urban only),Current asthma among adults aged greater than or equal to 18 years (value rural only),Current asthma among adults aged greater than or equal to 18 years (percentile rural only),Current asthma among adults aged greater than or equal to 18 years (percentile urban/rural),Current asthma among adults aged greater than or equal to 18 years (min-max normalized),Coronary heart disease among adults aged greater than or equal to 18 years (percentile),Coronary heart disease among adults aged greater than or equal to 18 years (value urban only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile urban only),Coronary heart disease among adults aged greater than or equal to 18 years (value rural only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile rural only),Coronary heart disease among adults aged greater than or equal to 18 years (percentile urban/rural),Coronary heart disease among adults aged greater than or equal to 18 years (min-max normalized),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (value urban only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile urban only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (value rural only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile rural only),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (percentile urban/rural),Cancer (excluding skin cancer) among adults aged greater than or equal to 18 years (min-max normalized),Current lack of health insurance among adults aged 18-64 years (percentile),Current lack of health insurance among adults aged 18-64 years (value urban only),Current lack of health insurance among adults aged 18-64 years (percentile urban only),Current lack of health insurance among adults aged 18-64 years (value rural only),Current lack of health insurance among adults aged 18-64 years (percentile rural only),Current lack of health insurance among adults aged 18-64 years (percentile urban/rural),Current lack of health insurance among adults aged 18-64 years (min-max normalized),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile),Diagnosed diabetes among adults aged greater than or equal to 18 years (value urban only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile urban only),Diagnosed diabetes among adults aged greater than or equal to 18 years (value rural only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile rural only),Diagnosed diabetes among adults aged greater than or equal to 18 years (percentile urban/rural),Diagnosed diabetes among adults aged greater than or equal to 18 years (min-max normalized),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (value urban only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile urban only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (value rural only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile rural only),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (percentile urban/rural),Physical health not good for greater than or equal to 14 days among adults aged greater than or equal to 18 years (min-max normalized),Percent of individuals < 100% Federal Poverty Line (percentile),Percent of individuals < 100% Federal Poverty Line (value urban only),Percent of individuals < 100% Federal Poverty Line (percentile urban only),Percent of individuals < 100% Federal Poverty Line (value rural only),Percent of individuals < 100% Federal Poverty Line (percentile rural only),Percent of individuals < 100% Federal Poverty Line (percentile urban/rural),Percent of individuals < 100% Federal Poverty Line (min-max normalized),Percent of individuals < 150% Federal Poverty Line (percentile),Percent of individuals < 150% Federal Poverty Line (value urban only),Percent of individuals < 150% Federal Poverty Line (percentile urban only),Percent of individuals < 150% Federal Poverty Line (value rural only),Percent of individuals < 150% Federal Poverty Line (percentile rural only),Percent of individuals < 150% Federal Poverty Line (percentile urban/rural),Percent of individuals < 150% Federal Poverty Line (min-max normalized),Percent of individuals below 200% Federal Poverty Line (percentile),Percent of individuals below 200% Federal Poverty Line (value urban only),Percent of individuals below 200% Federal Poverty Line (percentile urban only),Percent of individuals below 200% Federal Poverty Line (value rural only),Percent of individuals below 200% Federal Poverty Line (percentile rural only),Percent of individuals below 200% Federal Poverty Line (percentile urban/rural),Percent of individuals below 200% Federal Poverty Line (min-max normalized),Area Median Income (State or metropolitan) (percentile),Area Median Income (State or metropolitan) (value urban only),Area Median Income (State or metropolitan) (percentile urban only),Area Median Income (State or metropolitan) (value rural only),Area Median Income (State or metropolitan) (percentile rural only),Area Median Income (State or metropolitan) (percentile urban/rural),Area Median Income (State or metropolitan) (min-max normalized),Median household income in the past 12 months (percentile),Median household income in the past 12 months (value urban only),Median household income in the past 12 months (percentile urban only),Median household income in the past 12 months (value rural only),Median household income in the past 12 months (percentile rural only),Median household income in the past 12 months (percentile urban/rural),Median household income in the past 12 months (min-max normalized),Energy burden (percentile),Energy burden (value urban only),Energy burden (percentile urban only),Energy burden (value rural only),Energy burden (percentile rural only),Energy burden (percentile urban/rural),Energy burden (min-max normalized),FEMA Risk Index Expected Annual Loss Score (percentile),FEMA Risk Index Expected Annual Loss Score (value urban only),FEMA Risk Index Expected Annual Loss Score (percentile urban only),FEMA Risk Index Expected Annual Loss Score (value rural only),FEMA Risk Index Expected Annual Loss Score (percentile rural only),FEMA Risk Index Expected Annual Loss Score (percentile urban/rural),FEMA Risk Index Expected Annual Loss Score (min-max normalized),Urban Heuristic Flag (percentile),Urban Heuristic Flag (value urban only),Urban Heuristic Flag (percentile urban only),Urban Heuristic Flag (value rural only),Urban Heuristic Flag (percentile rural only),Urban Heuristic Flag (percentile urban/rural),Urban Heuristic Flag (min-max normalized),Air toxics cancer risk (percentile),Air toxics cancer risk (value urban only),Air toxics cancer risk (percentile urban only),Air toxics cancer risk (value rural only),Air toxics cancer risk (percentile rural only),Air toxics cancer risk (percentile urban/rural),Air toxics cancer risk (min-max normalized),Respiratory hazard index (percentile),Respiratory hazard index (value urban only),Respiratory hazard index (percentile urban only),Respiratory hazard index (value rural only),Respiratory hazard index (percentile rural only),Respiratory hazard index (percentile urban/rural),Respiratory hazard index (min-max normalized),Diesel particulate matter exposure (percentile),Diesel particulate matter exposure (value urban only),Diesel particulate matter exposure (percentile urban only),Diesel particulate matter exposure (value rural only),Diesel particulate matter exposure (percentile rural only),Diesel particulate matter exposure (percentile urban/rural),Diesel particulate matter exposure (min-max normalized),PM2.5 in the air (percentile),PM2.5 in the air (value urban only),PM2.5 in the air (percentile urban only),PM2.5 in the air (value rural only),PM2.5 in the air (percentile rural only),PM2.5 in the air (percentile urban/rural),PM2.5 in the air (min-max normalized),Ozone (percentile),Ozone (value urban only),Ozone (percentile urban only),Ozone (value rural only),Ozone (percentile rural only),Ozone (percentile urban/rural),Ozone (min-max normalized),Traffic proximity and volume (percentile),Traffic proximity and volume (value urban only),Traffic proximity and volume (percentile urban only),Traffic proximity and volume (value rural only),Traffic proximity and volume (percentile rural only),Traffic proximity and volume (percentile urban/rural),Traffic proximity and volume (min-max normalized),Proximity to Risk Management Plan (RMP) facilities (percentile),Proximity to Risk Management Plan (RMP) facilities (value urban only),Proximity to Risk Management Plan (RMP) facilities (percentile urban only),Proximity to Risk Management Plan (RMP) facilities (value rural only),Proximity to Risk Management Plan (RMP) facilities (percentile rural only),Proximity to Risk Management Plan (RMP) facilities (percentile urban/rural),Proximity to Risk Management Plan (RMP) facilities (min-max normalized),Proximity to hazardous waste sites (percentile),Proximity to hazardous waste sites (value urban only),Proximity to hazardous waste sites (percentile urban only),Proximity to hazardous waste sites (value rural only),Proximity to hazardous waste sites (percentile rural only),Proximity to hazardous waste sites (percentile urban/rural),Proximity to hazardous waste sites (min-max normalized),Proximity to NPL sites (percentile),Proximity to NPL sites (value urban only),Proximity to NPL sites (percentile urban only),Proximity to NPL sites (value rural only),Proximity to NPL sites (percentile rural only),Proximity to NPL sites (percentile urban/rural),Proximity to NPL sites (min-max normalized),Wastewater discharge (percentile),Wastewater discharge (value urban only),Wastewater discharge (percentile urban only),Wastewater discharge (value rural only),Wastewater discharge (percentile rural only),Wastewater discharge (percentile urban/rural),Wastewater discharge (min-max normalized),Percent pre-1960s housing (lead paint indicator) (percentile),Percent pre-1960s housing (lead paint indicator) (value urban only),Percent pre-1960s housing (lead paint indicator) (percentile urban only),Percent pre-1960s housing (lead paint indicator) (value rural only),Percent pre-1960s housing (lead paint indicator) (percentile rural only),Percent pre-1960s housing (lead paint indicator) (percentile urban/rural),Percent pre-1960s housing (lead paint indicator) (min-max normalized),Individuals under 5 years old (percentile),Individuals under 5 years old (value urban only),Individuals under 5 years old (percentile urban only),Individuals under 5 years old (value rural only),Individuals under 5 years old (percentile rural only),Individuals under 5 years old (percentile urban/rural),Individuals under 5 years old (min-max normalized),Individuals over 64 years old (percentile),Individuals over 64 years old (value urban only),Individuals over 64 years old (percentile urban only),Individuals over 64 years old (value rural only),Individuals over 64 years old (percentile rural only),Individuals over 64 years old (percentile urban/rural),Individuals over 64 years old (min-max normalized),Linguistic isolation (percent) (percentile),Linguistic isolation (percent) (value urban only),Linguistic isolation (percent) (percentile urban only),Linguistic isolation (percent) (value rural only),Linguistic isolation (percent) (percentile rural only),Linguistic isolation (percent) (percentile urban/rural),Linguistic isolation (percent) (min-max normalized),Percent of households in linguistic isolation (percentile),Percent of households in linguistic isolation (value urban only),Percent of households in linguistic isolation (percentile urban only),Percent of households in linguistic isolation (value rural only),Percent of households in linguistic isolation (percentile rural only),Percent of households in linguistic isolation (percentile urban/rural),Percent of households in linguistic isolation (min-max normalized),Poverty (Less than 200% of federal poverty line) (percentile),Poverty (Less than 200% of federal poverty line) (value urban only),Poverty (Less than 200% of federal poverty line) (percentile urban only),Poverty (Less than 200% of federal poverty line) (value rural only),Poverty (Less than 200% of federal poverty line) (percentile rural only),Poverty (Less than 200% of federal poverty line) (percentile urban/rural),Poverty (Less than 200% of federal poverty line) (min-max normalized),Percent individuals age 25 or over with less than high school degree (percentile),Percent individuals age 25 or over with less than high school degree (value urban only),Percent individuals age 25 or over with less than high school degree (percentile urban only),Percent individuals age 25 or over with less than high school degree (value rural only),Percent individuals age 25 or over with less than high school degree (percentile rural only),Percent individuals age 25 or over with less than high school degree (percentile urban/rural),Percent individuals age 25 or over with less than high school degree (min-max normalized),Unemployment (percent) (percentile),Unemployment (percent) (value urban only),Unemployment (percent) (percentile urban only),Unemployment (percent) (value rural only),Unemployment (percent) (percentile rural only),Unemployment (percent) (percentile urban/rural),Unemployment (percent) (min-max normalized),Median value ($) of owner-occupied housing units (percentile),Median value ($) of owner-occupied housing units (value urban only),Median value ($) of owner-occupied housing units (percentile urban only),Median value ($) of owner-occupied housing units (value rural only),Median value ($) of owner-occupied housing units (percentile rural only),Median value ($) of owner-occupied housing units (percentile urban/rural),Median value ($) of owner-occupied housing units (min-max normalized),Percent enrollment in college or graduate school (percentile),Percent enrollment in college or graduate school (value urban only),Percent enrollment in college or graduate school (percentile urban only),Percent enrollment in college or graduate school (value rural only),Percent enrollment in college or graduate school (percentile rural only),Percent enrollment in college or graduate school (percentile urban/rural),Percent enrollment in college or graduate school (min-max normalized),Expected building loss rate (Natural Hazards Risk Index) (percentile),Expected building loss rate (Natural Hazards Risk Index) (value urban only),Expected building loss rate (Natural Hazards Risk Index) (percentile urban only),Expected building loss rate (Natural Hazards Risk Index) (value rural only),Expected building loss rate (Natural Hazards Risk Index) (percentile rural only),Expected building loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected building loss rate (Natural Hazards Risk Index) (min-max normalized),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile),Expected agricultural loss rate (Natural Hazards Risk Index) (value urban only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile urban only),Expected agricultural loss rate (Natural Hazards Risk Index) (value rural only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile rural only),Expected agricultural loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected agricultural loss rate (Natural Hazards Risk Index) (min-max normalized),Expected population loss rate (Natural Hazards Risk Index) (percentile),Expected population loss rate (Natural Hazards Risk Index) (value urban only),Expected population loss rate (Natural Hazards Risk Index) (percentile urban only),Expected population loss rate (Natural Hazards Risk Index) (value rural only),Expected population loss rate (Natural Hazards Risk Index) (percentile rural only),Expected population loss rate (Natural Hazards Risk Index) (percentile urban/rural),Expected population loss rate (Natural Hazards Risk Index) (min-max normalized),Percent individuals age 25 or over with less than high school degree in 2009 (percentile),Percent individuals age 25 or over with less than high school degree in 2009 (value urban only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile urban only),Percent individuals age 25 or over with less than high school degree in 2009 (value rural only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile rural only),Percent individuals age 25 or over with less than high school degree in 2009 (percentile urban/rural),Percent individuals age 25 or over with less than high school degree in 2009 (min-max normalized),Percentage households below 100% of federal poverty line in 2009 (percentile),Percentage households below 100% of federal poverty line in 2009 (value urban only),Percentage households below 100% of federal poverty line in 2009 (percentile urban only),Percentage households below 100% of federal poverty line in 2009 (value rural only),Percentage households below 100% of federal poverty line in 2009 (percentile rural only),Percentage households below 100% of federal poverty line in 2009 (percentile urban/rural),Percentage households below 100% of federal poverty line in 2009 (min-max normalized),Unemployment (percent) in 2009 (percentile),Unemployment (percent) in 2009 (value urban only),Unemployment (percent) in 2009 (percentile urban only),Unemployment (percent) in 2009 (value rural only),Unemployment (percent) in 2009 (percentile rural only),Unemployment (percent) in 2009 (percentile urban/rural),Unemployment (percent) in 2009 (min-max normalized),Unemployment (percent) in 2010 (percentile),Unemployment (percent) in 2010 (value urban only),Unemployment (percent) in 2010 (percentile urban only),Unemployment (percent) in 2010 (value rural only),Unemployment (percent) in 2010 (percentile rural only),Unemployment (percent) in 2010 (percentile urban/rural),Unemployment (percent) in 2010 (min-max normalized),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile),Percent of individuals less than 100% Federal Poverty Line in 2010 (value urban only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile urban only),Percent of individuals less than 100% Federal Poverty Line in 2010 (value rural only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile rural only),Percent of individuals less than 100% Federal Poverty Line in 2010 (percentile urban/rural),Percent of individuals less than 100% Federal Poverty Line in 2010 (min-max normalized),Total population in 2009 (percentile),Total population in 2009 (value urban only),Total population in 2009 (percentile urban only),Total population in 2009 (value rural only),Total population in 2009 (percentile rural only),Total population in 2009 (percentile urban/rural),Total population in 2009 (min-max normalized),Summer days above 90F (percentile),Summer days above 90F (value urban only),Summer days above 90F (percentile urban only),Summer days above 90F (value rural only),Summer days above 90F (percentile rural only),Summer days above 90F (percentile urban/rural),Summer days above 90F (min-max normalized),Percent low access to healthy food (percentile),Percent low access to healthy food (value urban only),Percent low access to healthy food (percentile urban only),Percent low access to healthy food (value rural only),Percent low access to healthy food (percentile rural only),Percent low access to healthy food (percentile urban/rural),Percent low access to healthy food (min-max normalized),Percent impenetrable surface areas (percentile),Percent impenetrable surface areas (value urban only),Percent impenetrable surface areas (percentile urban only),Percent impenetrable surface areas (value rural only),Percent impenetrable surface areas (percentile rural only),Percent impenetrable surface areas (percentile urban/rural),Percent impenetrable surface areas (min-max normalized),Low third grade reading proficiency (percentile),Third grade reading proficiency (value urban only),Low third grade reading proficiency (percentile urban only),Third grade reading proficiency (value rural only),Low third grade reading proficiency (percentile rural only),Low third grade reading proficiency (percentile urban/rural),Low median household income as a percent of area median income (percentile),Median household income as a percent of area median income (value urban only),Low median household income as a percent of area median income (percentile urban only),Median household income as a percent of area median income (value rural only),Low median household income as a percent of area median income (percentile rural only),Low median household income as a percent of area median income (percentile urban/rural),Low life expectancy (percentile),Life expectancy (years) (value urban only),Low life expectancy (percentile urban only),Life expectancy (years) (value rural only),Low life expectancy (percentile rural only),Low life expectancy (percentile urban/rural),Low median household income as a percent of territory median income in 2009 (percentile),Median household income as a percent of territory median income in 2009 (value urban only),Low median household income as a percent of territory median income in 2009 (percentile urban only),Median household income as a percent of territory median income in 2009 (value rural only),Low median household income as a percent of territory median income in 2009 (percentile rural only),Low median household income as a percent of territory median income in 2009 (percentile urban/rural),Total population in 2009 (island areas) and 2019 (states and PR),Score A,Score B,Socioeconomic Factors,Sensitive populations,Environmental effects,Exposures,Pollution Burden,Population Characteristics,Score C,Score D,Score E,"Low AMI, Low HS graduation",Meets socioeconomic criteria,Meets burden criteria,Score F (communities),Score G (communities),Score G,Score G (percentile),Score H (communities),Score H,Score I (communities),Score I,Score I (percentile),NMTC (communities),Score K (communities),Total threshold criteria exceeded,Is low income?,Greater than or equal to the 90th percentile for expected population loss rate and is low income?,Greater than or equal to the 90th percentile for expected agriculture loss rate and is low income?,Greater than or equal to the 90th percentile for expected building loss rate and is low income?,Climate Factor (Definition L),Greater than or equal to the 90th percentile for PM2.5 exposure and is low income?,Greater than or equal to the 90th percentile for energy burden and is low income?,Energy Factor (Definition L),Greater than or equal to the 90th percentile for diesel particulate matter and is low income?,Greater than or equal to the 90th percentile for traffic proximity and is low income?,Transportation Factor (Definition L),Greater than or equal to the 90th percentile for lead paint and the median house value is less than 90th percentile and is low income?,Greater than or equal to the 90th percentile for housing burden and is low income?,Housing Factor (Definition L),Greater than or equal to the 90th percentile for proximity to RMP sites and is low income?,Greater than or equal to the 90th percentile for proximity to superfund sites and is low income?,Greater than or equal to the 90th percentile for proximity to hazardous waste facilities and is low income?,Pollution Factor (Definition L),Greater than or equal to the 90th percentile for wastewater discharge and is low income?,Water Factor (Definition L),Greater than or equal to the 90th percentile for diabetes and is low income?,Greater than or equal to the 90th percentile for asthma and is low income?,Greater than or equal to the 90th percentile for heart disease and is low income?,Greater than or equal to the 90th percentile for low life expectancy and is low income?,Health Factor (Definition L),Low high school education,Greater than or equal to the 90th percentile for households in linguistic isolation and has low HS education,Greater than or equal to the 90th percentile for households at or below 100% federal poverty level and has low HS education,Greater than or equal to the 90th percentile for low median household income as a percent of area median income and has low HS education,Greater than or equal to the 90th percentile for unemployment and has low HS education,Unemployment (percent) in 2009 (island areas) and 2010 (states and PR),Unemployment (percent) in 2009 exceeds 90th percentile,Percentage households below 100% of federal poverty line in 2009 (island areas) and 2010 (states and PR),Percentage households below 100% of federal poverty line in 2009 exceeds 90th percentile,Low median household income as a percent of territory median income in 2009 exceeds 90th percentile,Low high school education in 2009 (island areas),Greater than or equal to the 90th percentile for unemployment and has low HS education in 2009 (island areas),Greater than or equal to the 90th percentile for households at or below 100% federal poverty level and has low HS education in 2009 (island areas),Greater than or equal to the 90th percentile for low median household income as a percent of area median income and has low HS education in 2009 (island areas),Workforce Factor (Definition L),Definition L (communities),Any Non-Workforce Factor (Definition L),Definition L (percentile),Is low income and low college attendance?,Greater than or equal to the 90th percentile for summer days above 90F and the median house value is less than 90th percentile and is low income?,Climate Factor (Definition M),Energy Factor (Definition M),Transportation Factor (Definition M),Housing Factor (Definition M),Pollution Factor (Definition M),Water Factor (Definition M),Greater than or equal to the 90th percentile for low access to healthy food and is low income?,Health Factor (Definition M),Low high school education and low college attendance,Workforce Factor (Definition M),Definition M (communities),Any Non-Workforce Factor (Definition M),Definition M (percentile),Score A (percentile),Score A (top 25th percentile),Score A (top 30th percentile),Score A (top 35th percentile),Score A (top 40th percentile),Score B (percentile),Score B (top 25th percentile),Score B (top 30th percentile),Score B (top 35th percentile),Score B (top 40th percentile),Score C (percentile),Score C (top 25th percentile),Score C (top 30th percentile),Score C (top 35th percentile),Score C (top 40th percentile),Score D (percentile),Score D (top 25th percentile),Score D (top 30th percentile),Score D (top 35th percentile),Score D (top 40th percentile),Score E (percentile),Score E (top 25th percentile),Score E (top 30th percentile),Score E (top 35th percentile),Score E (top 40th percentile) +01073001100,True,0.2752043596730245,4897.0,0.7327449738800064,11.2,7.2,6.7,16.6,19.3,15.1,0.150375939849624,0.318796992481203,0.3744360902255639,57447.0,37030.0,0.049,18.7674524286,1.0,51.1530304943,0.735568574566,0.63998588,10.3951975342,39.404630719,253.995131498,2.03499777769,0.708723792992,0.134193041308,1.0556674669,0.205868653936,0.0308352052277,0.185011231366,0.0,0.0,0.407205697528,0.0821917808219178,0.0092071611253196,85500.0,0.0890751899397432,0.0004047858,0.0052243632,2.8039e-06,,,,0.1536983669548511,0.3189099613330878,,62.666668,0.068036923,0.171,58.143433,0.6445941476491375,70.3,,0.6466760729305078,0.2752043596730245,0.5700318443928049,,,0.5700318443928049,0.2752043596730245,0.6512411994432508,4897.0,0.6248587667340021,,,0.6248587667340021,0.0696873532467162,0.2608335861859708,0.7327449738800064,0.2830143458759886,,,0.2830143458759886,0.1567394572745385,0.8509696039125366,11.2,0.835724928163468,,,0.835724928163468,0.3795180722891565,0.7264920810941454,7.2,0.7844637979353648,,,0.7844637979353648,0.1875,0.4789587420739856,6.7,0.5678012699989358,,,0.5678012699989358,0.303921568627451,0.6191105803406409,16.6,0.6018127638440527,,,0.6018127638440527,0.2094488188976378,0.965388552418323,19.3,0.9599666536592288,,,0.9599666536592288,0.4275862068965517,0.697012994398476,15.1,0.7279967363155841,,,0.7279967363155841,0.3440233236151603,0.62043226838371,0.150375939849624,0.6145691950863328,,,0.6145691950863328,0.150375939849624,0.7319580582099551,0.318796992481203,0.7209861695730607,,,0.7209861695730607,0.318796992481203,0.6304939233619051,0.3744360902255639,0.6277982991151962,,,0.6277982991151962,0.3744360902255639,0.305080182775983,57447.0,0.2657396925099514,,,0.2657396925099514,0.2232322025800286,0.1531195524384805,37030.0,0.1572054644434553,,,0.1572054644434553,0.1395180645004889,0.864954517474865,0.049,0.9005173954895489,,,0.9005173954895489,0.0037065052950075,0.6038301323911519,18.7674524286,0.6383816255626487,,,0.6383816255626487,0.1876745242859999,0.5972204988211937,1.0,0.5000085573944445,,,0.5000085573944445,1.0,0.9847958474680182,51.1530304943,0.9819551446670092,,,0.9819551446670092,0.0300384933188293,0.968365553602812,0.735568574566,0.962352336928608,,,0.962352336928608,0.1696726613313424,0.7632321085543794,0.63998588,0.70386920047937,,,0.70386920047937,0.1053235274194042,0.928945948563286,10.3951975342,0.914819538763832,,,0.914819538763832,0.5130755332417333,0.2507228532296667,39.404630719,0.2360646695853011,,,0.2360646695853011,0.2834163202031902,0.4608804184722397,253.995131498,0.3487028727629068,,,0.3487028727629068,0.0081194347824311,0.9022445642626452,2.03499777769,0.8805423357414318,,,0.8805423357414318,0.1192079731904979,0.4244672369292306,0.708723792992,0.2870715924264731,,,0.2870715924264731,0.0016327034632494,0.753733057661383,0.134193041308,0.7050707022289178,,,0.7050707022289178,0.0172289593763426,0.9223869977156124,1.0556674669,0.9078447963253958,,,0.9078447963253958,9.412822248180045e-06,0.4454669531492817,0.205868653936,0.4334577327353032,,,0.4334577327353032,0.205868653936,0.1202416183565086,0.0308352052277,0.108484267470127,,,0.108484267470127,0.0793595720750642,0.695774381427278,0.185011231366,0.7452494265073442,,,0.7452494265073442,0.185011231366,0.1272208772721677,0.0,0.0997988895955446,,,0.0997988895955446,0.0,0.1284712368751773,0.0,0.0986150580340329,,,0.0986150580340329,0.0,0.668247726382076,0.407205697528,0.6576848015886603,,,0.6576848015886603,0.407205697528,0.4189274017467249,0.0821917808219178,0.4443872826422471,,,0.4443872826422471,0.0821917808219178,0.0297871177547618,0.0092071611253196,0.0285699569046924,,,0.0285699569046924,0.0092071611253196,0.1124511830921203,85500.0,0.1074913548122025,,,0.1074913548122025,0.0379401628742081,0.7459685121012851,0.0890751899397432,0.6989610478672336,,,0.6989610478672336,0.0890751899397432,0.7846412062513758,0.0004047858,0.82138883658833,,,0.82138883658833,0.01597287904858,0.5120452999319701,0.0052243632,0.5028314457028648,,,0.5028314457028648,0.0095124530398832,0.6143028498159407,2.8039e-06,0.6689315237296548,,,0.6689315237296548,0.0013204531501148,,,,,,,,,,,,,,,,,,,,,,0.9349594607528132,0.1536983669548511,0.9315960352498582,,,0.9315960352498582,0.1536983669548511,0.8950599559730369,0.3189099613330878,0.8870754376621368,,,0.8870754376621368,0.3189099613330878,,,,,,,,0.7537922665342821,62.666668,0.7585193484443679,,,0.7585193484443679,0.4423529401799308,0.8019598155467721,0.068036923,0.7905320987865615,,,0.7905320987865615,0.068036923,0.4126953421856217,0.171,0.2701910981682835,,,0.2701910981682835,0.1775700879261655,0.990724418702258,58.143433,0.9890918535191758,,,0.9890918535191758,0.8209741753282674,0.6445941476491375,0.7947837521917007,,,0.7947837521917007,0.97046998263836,70.3,0.9652438793658,,,0.9652438793658,,,,,,,4897.0,0.5435875640644005,0.2799472837363994,0.3784219111378495,0.3144122923519848,0.6896597619436307,0.7261571216484003,0.7139913350801438,0.3464171017449171,0.2473388089694474,0.1547617998296523,0.3781718392172476,False,True,True,True,True,1,1,True,1,True,1,1,True,True,0,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,0.1536983669548511,False,0.3189099613330878,False,False,False,False,False,False,False,False,False,0,False,False,False,False,False,False,False,False,False,False,False,False,False,False,0,0.5532898204078324,False,False,False,False,0.5490856986899564,False,False,False,False,0.5480683083104825,False,False,False,False,0.5438440021080796,False,False,False,False,0.3320495668977446,False,False,False,False +01073001400,True,0.1823529411764705,1906.0,0.7136694633528574,11.1,9.1,7.3,21.4,22.4,17.4,0.2816032887975334,0.3679342240493319,0.4835560123329907,57447.0,36066.0,0.07,17.3011023381,1.0,54.6950518653,0.76056054321,0.9098084377,10.498270137,39.3676601307,3015.87969265,1.81382525188,3.24085850684,0.214095348703,0.365101735929,0.628839590444,0.0582371458552,0.178908709339,0.0245098039215686,0.0165289256198,0.425498426023,0.1742543171114599,0.1150121065375302,67800.0,0.0771549125979505,0.0008951111,0.0067284885,2.3791e-06,,,,0.0804953560371517,0.2950894905920146,,61.666668,0.087159691,0.34900002,93.77919,0.6278134628440127,71.0,,0.3421186011150532,0.1823529411764705,0.2730613650055943,,,0.2730613650055943,0.1823529411764705,0.0867961243766976,1906.0,0.0702656897319135,,,0.0702656897319135,0.0271235644860611,0.2409731608418613,0.7136694633528574,0.263412880473859,,,0.263412880473859,0.1524802086740484,0.8385794307486707,11.1,0.8242488204618823,,,0.8242488204618823,0.3734939759036144,0.9217563763541756,9.1,0.934238532761006,,,0.934238532761006,0.2391304347826086,0.6048579715089994,7.3,0.6840345524850119,,,0.6840345524850119,0.3333333333333333,0.7894025988796952,21.4,0.765821774451027,,,0.765821774451027,0.2850393700787401,0.9878088657624612,22.4,0.9854641881585016,,,0.9854641881585016,0.4988505747126436,0.8447283118655634,17.4,0.8547216999538827,,,0.8547216999538827,0.411078717201166,0.8689250707460116,0.2816032887975334,0.8593419809294734,,,0.8593419809294734,0.2816032887975334,0.8013233263612626,0.3679342240493319,0.7879907224465252,,,0.7879907224465252,0.3679342240493319,0.7892247330790578,0.4835560123329907,0.7755862898376428,,,0.7755862898376428,0.4835560123329907,0.305080182775983,57447.0,0.2657396925099514,,,0.2657396925099514,0.2232322025800286,0.1410656612748476,36066.0,0.1454103468346629,,,0.1454103468346629,0.1356231464796244,0.970802270706518,0.07,0.9745685506050604,,,0.9745685506050604,0.0052950075642965,0.5282998116553705,17.3011023381,0.565061869961834,,,0.565061869961834,0.173011023381,0.5972204988211937,1.0,0.5000085573944445,,,0.5000085573944445,1.0,0.9895233034972276,54.6950518653,0.98758774182503,,,0.98758774182503,0.0324014302096176,0.9765534529502324,0.76056054321,0.9720766991953432,,,0.9720766991953432,0.1759137053158734,0.9016362174902248,0.9098084377,0.8766135935627462,,,0.8766135935627462,0.1497290027189099,0.9329441224077584,10.498270137,0.9196283911889414,,,0.9196283911889414,0.5213510451938572,0.2492010569566841,39.3676601307,0.2346340790789065,,,0.2346340790789065,0.2826912370192468,0.941127799514774,3015.87969265,0.9280004126050854,,,0.9280004126050854,0.0964083008791804,0.8815556546533155,1.81382525188,0.8555140890882322,,,0.8555140890882322,0.1062519253676046,0.7527465845056148,3.24085850684,0.6879172801040846,,,0.6879172801040846,0.0074660410167418,0.8655558708666099,0.214095348703,0.8377272571643783,,,0.8377272571643783,0.027487565893985,0.8882148073250197,0.365101735929,0.8688263024295902,,,0.8688263024295902,3.255416928678718e-06,0.8313806570181485,0.628839590444,0.7904954291779368,,,0.7904954291779368,0.628839590444,0.5164051837137336,0.0582371458552,0.4798079227582429,,,0.4798079227582429,0.1498830619032175,0.6618964608586371,0.178908709339,0.715890026363543,,,0.715890026363543,0.178908709339,0.5796575164471435,0.0245098039215686,0.5161060212798873,,,0.5161060212798873,0.0245098039215686,0.5008648531776597,0.0165289256198,0.424872462081008,,,0.424872462081008,0.0165289256198,0.6964500479723247,0.425498426023,0.6838429143698428,,,0.6838429143698428,0.425498426023,0.751664847161572,0.1742543171114599,0.7508831498439483,,,0.7508831498439483,0.1742543171114599,0.9067171316918536,0.1150121065375302,0.9060831344539256,,,0.9060831344539256,0.1150121065375302,0.0519655139795408,67800.0,0.0554747149655904,,,0.0554747149655904,0.0290456994515583,0.6434691260334525,0.0771549125979505,0.5807502400219449,,,0.5807502400219449,0.0771549125979505,0.9166162227602904,0.0008951111,0.9302158396521918,,,0.9302158396521918,0.0353246959378835,0.5755532434271079,0.0067284885,0.5614035087719298,,,0.5614035087719298,0.0122511928214689,0.558933421571466,2.3791e-06,0.6145407246401615,,,0.6145407246401615,0.0011202645354936,,,,,,,,,,,,,,,,,,,,,,0.6917513228236646,0.0804953560371517,0.6841770738494838,,,0.6841770738494838,0.0804953560371517,0.8737301229199994,0.2950894905920146,0.8632982287353754,,,0.8632982287353754,0.2950894905920146,,,,,,,,0.7501654807214959,61.666668,0.7551581487546324,,,0.7551581487546324,0.435294116816609,0.8647617479139218,0.087159691,0.8519741908983552,,,0.8519741908983552,0.087159691,0.6268497920495212,0.34900002,0.5359536815260283,,,0.5359536815260283,0.3624091475885,0.9537899773356836,93.77919,0.9454938966323262,,,0.9454938966323262,0.8355751594025679,0.6278134628440127,0.8102169783752192,,,0.8102169783752192,0.959938777375042,71.0,0.9533526317781056,,,0.9533526317781056,,,,,,,1906.0,0.7240574475669483,0.523497018864787,0.6395630962236926,0.5859863870065047,0.8438907148737418,0.8318309921361502,0.8358508997153473,0.6127747416150986,0.5121883191018196,0.1843255189540058,0.6553216288775894,False,True,True,True,True,1,1,True,1,True,1,1,True,True,9,True,False,False,True,True,True,True,True,True,True,True,False,False,False,False,False,False,False,False,False,True,False,True,True,True,True,False,False,False,True,0.0804953560371517,False,0.2950894905920146,False,False,False,False,False,False,True,True,True,1,True,False,True,True,True,False,False,False,False,True,True,True,True,True,1,0.7460439723787516,False,True,True,True,0.7500818777292576,True,True,True,True,0.9394564656693726,True,True,True,True,0.6605181011067418,False,False,True,True,0.7347062877528682,False,True,True,True diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl index 741590217e6a2fbe7225f49eaafd4d5885d691b4..5608343f42a9ba3290dcecdc7dc2a7020a3241ce 100644 GIT binary patch delta 78 zcmcbW^)-v7fn{peMwYkojJ}gU$t&w>dKN3>S(Qmjy#3rh0?m0B=zPF`rB#W-Q|8H0w&I))sRBiHjx4loqr;B1|eF}2g# zV{(?E1Jf_Y$(aV`lW!XuvxqVIN=+6rN@A4UTx#T4sjKN(tdNsmu8^6RoS&PjkeHVO z<|gOos+1F3B%a z&~Qmj%goCx$;{7F0LjLIY?{1blJw+_^F=1lT`J8A5;d8;cd4W_9yd!%lw~sGl$h?HcXB%Y?%DQP>h44bxOw6PG^V7 pY(@@~{ftsr*qMB}CvP)KV&vK^Y3x|JS!VqPW~Pr!lh18R0su67I~@Q3 diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_transformed_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_transformed_expected.pkl index cfef631b59d86bcf34847a17d9fdb5e86f894957..1e812d3b9484320f77f5ec5442a89b5eb9453d2e 100644 GIT binary patch delta 539 zcmX?hhiT1YCe{X)sS7u5WDQ|r44E9oq{X;maw}7+C?f*{10xs$8DIe9O@7Se0#v2J zti`xsb1?H{M#eXj@3W{gew_RtNPe3v&niFJjnyHNjR~TK9ZGXRX-+834W)UYG%u9q zgVF*}S`bPLL22R5^{hpjioZdQ0|BToE0pGf()^R_S}4>6MTE&$bn-KUBu3HA zo`#N`|3YG?Lljkh(ojh}%43n?sHw delta 197 zcmZ4UnCaLZCe{X)sn+W@vW74*x=oH^(qinH+{%N$ai7ZVl>#C&perNG8e1D zWFuAu$?uE|VDJM<|Af-NCTFv{PhP5Tu-S>tT2t{2RQMy5{syIgLurP|^Yksa*u9zB zreuV6Iu}fSpkFXK!9a|Iy%j8AF}cpb0%)A!CSy-8T*(P@xCNZ*YerxDhx%tCd N8)nA6lXW-N0|0llHWUB= diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl index d066a170c285542f993355c2d18925d057ef3394..fa01effefb1335f004675d0f9156490a57da48e1 100644 GIT binary patch delta 88 zcmeB`=#|*;nA6)gK0G97N)H>5_I7ig(!=T-@9Yx-rd|Ca!E{KFADH$Cb_de|K0rQD YgNILu$CMtHV4w~lKiGG(9@l+F0AO$)bpQYW delta 88 zcmeB`=#|*;nA6)QK0G97N)H>5_I7ig(!=T#@9Yx-rd|Ca!E{KFADH$Cb_de|K0rQD YgNILu$CMtHV4w~lKiFrp9@l+F0A9l$YXATM diff --git a/data/data-pipeline/data_pipeline/etl/sources/cdc_svi_index/etl.py b/data/data-pipeline/data_pipeline/etl/sources/cdc_svi_index/etl.py index 4c46263a..47a3720c 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/cdc_svi_index/etl.py +++ b/data/data-pipeline/data_pipeline/etl/sources/cdc_svi_index/etl.py @@ -42,7 +42,7 @@ class CDCSVIIndex(ExtractTransformLoad): self.df: pd.DataFrame def extract(self) -> None: - logger.info("Extracting 43 MB CDC SVI INDEX") + logger.info("Downloading 43 MB CDC SVI INDEX") self.df = pd.read_csv( filepath_or_buffer=self.CDC_SVI_INDEX_URL, dtype={self.CDC_SVI_INDEX_TRACTS_FIPS_CODE: "string"}, diff --git a/data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/README.md b/data/data-pipeline/data_pipeline/etl/sources/epa_rsei/README.md similarity index 100% rename from data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/README.md rename to data/data-pipeline/data_pipeline/etl/sources/epa_rsei/README.md diff --git a/data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/__init__.py b/data/data-pipeline/data_pipeline/etl/sources/epa_rsei/__init__.py similarity index 100% rename from data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/__init__.py rename to data/data-pipeline/data_pipeline/etl/sources/epa_rsei/__init__.py diff --git a/data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/etl.py b/data/data-pipeline/data_pipeline/etl/sources/epa_rsei/etl.py similarity index 96% rename from data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/etl.py rename to data/data-pipeline/data_pipeline/etl/sources/epa_rsei/etl.py index 9afb67b4..f6a77ef6 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/epa_rsei_aggregate/etl.py +++ b/data/data-pipeline/data_pipeline/etl/sources/epa_rsei/etl.py @@ -22,9 +22,7 @@ class EPARiskScreeningEnvironmentalIndicatorsETL(ExtractTransformLoad): def __init__(self): self.AGGREGATED_RSEI_SCORE_FILE_URL = "http://abt-rsei.s3.amazonaws.com/microdata2019/census_agg/CensusMicroTracts2019_2019_aggregated.zip" - self.OUTPUT_PATH: Path = ( - self.DATA_PATH / "dataset" / "epa_rsei_aggregated" - ) + self.OUTPUT_PATH: Path = self.DATA_PATH / "dataset" / "epa_rsei" self.EPA_RSEI_SCORE_THRESHOLD_CUTOFF = 0.75 self.TRACT_INPUT_COLUMN_NAME = "GEOID10" self.NUMBER_FACILITIES_INPUT_FIELD = "NUMFACS" @@ -74,12 +72,12 @@ class EPARiskScreeningEnvironmentalIndicatorsETL(ExtractTransformLoad): unzip_file_from_url( file_url=self.AGGREGATED_RSEI_SCORE_FILE_URL, download_path=self.TMP_PATH, - unzipped_file_path=self.TMP_PATH / "epa_rsei_aggregated", + unzipped_file_path=self.TMP_PATH / "epa_rsei", ) self.df = pd.read_csv( filepath_or_buffer=self.TMP_PATH - / "epa_rsei_aggregated" + / "epa_rsei" / "CensusMicroTracts2019_2019_aggregated.csv", # The following need to remain as strings for all of their digits, not get # converted to numbers. diff --git a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py index b59e3209..3755b0d1 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py +++ b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py @@ -33,7 +33,7 @@ class MarylandEJScreenETL(ExtractTransformLoad): self.df: pd.DataFrame def extract(self) -> None: - logger.info("Downloading Maryland EJSCREEN Data") + logger.info("Downloading 207MB Maryland EJSCREEN Data") super().extract( self.MARYLAND_EJSCREEN_URL, self.TMP_PATH, diff --git a/data/data-pipeline/data_pipeline/ipython/scoring_comparison.ipynb b/data/data-pipeline/data_pipeline/ipython/scoring_comparison.ipynb index 912b2527..4f143e8d 100644 --- a/data/data-pipeline/data_pipeline/ipython/scoring_comparison.ipynb +++ b/data/data-pipeline/data_pipeline/ipython/scoring_comparison.ipynb @@ -21,6 +21,7 @@ "import requests\n", "import string\n", "import sys\n", + "import time\n", "import typing\n", "import us\n", "import zipfile\n", @@ -61,7 +62,10 @@ "# Set some global parameters\n", "DATA_DIR = pathlib.Path.cwd().parent / \"data\"\n", "TEMP_DATA_DIR = DATA_DIR / \"tmp\"\n", - "COMPARISON_OUTPUTS_DIR = DATA_DIR / \"comparison_outputs\"\n", + "\n", + "time_str = time.strftime(\"%Y%m%d-%H%M%S\")\n", + "\n", + "COMPARISON_OUTPUTS_DIR = DATA_DIR / \"comparison_outputs\" / time_str\n", "\n", "# Make the dirs if they don't exist\n", "TEMP_DATA_DIR.mkdir(parents=True, exist_ok=True)\n", @@ -109,7 +113,9 @@ "cell_type": "code", "execution_count": null, "id": "a251a0fb", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Load EJSCREEN Areas of Concern data.\n", @@ -143,7 +149,9 @@ "cell_type": "code", "execution_count": null, "id": "e43a9e23", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Merge EJSCREEN AoCs into CEJST data.\n", @@ -173,10 +181,13 @@ "source": [ "# Analyze one field at a time (useful for setting thresholds)\n", "\n", - "quantile = 0.9\n", + "quantile = 0.95\n", "\n", "for field in [\n", - " field_names.MEDIAN_HOUSE_VALUE_FIELD,\n", + " field_names.COLLEGE_ATTENDANCE_FIELD,\n", + " field_names.HIGH_SCHOOL_ED_FIELD,\n", + " field_names.MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD,\n", + " field_names.POVERTY_LESS_THAN_200_FPL_FIELD,\n", "]:\n", " print(f\"\\n~~~~Analysis for field `{field}`~~~~\")\n", " print(cejst_df[field].describe())\n", @@ -223,7 +234,9 @@ "cell_type": "code", "execution_count": null, "id": "d8ec43dc", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Load persistent poverty data\n", @@ -256,7 +269,9 @@ "cell_type": "code", "execution_count": null, "id": "81826d29", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Load mapping inequality data\n", @@ -314,7 +329,9 @@ "cell_type": "code", "execution_count": null, "id": "605af1ff", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Load alternative energy-related definition\n", @@ -333,7 +350,9 @@ "cell_type": "code", "execution_count": null, "id": "fe4a2939", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Load Michigan EJSCREEN\n", @@ -356,15 +375,13 @@ "outputs": [], "source": [ "# Load EPA RSEI EJSCREEN\n", - "epa_rsei_aggregate_data_path = (\n", - " DATA_DIR / \"dataset\" / \"epa_rsei_aggregated\" / \"usa.csv\"\n", - ")\n", - "epa_rsei_aggregate_df = pd.read_csv(\n", - " epa_rsei_aggregate_data_path,\n", + "epa_rsei_data_path = DATA_DIR / \"dataset\" / \"epa_rsei\" / \"usa.csv\"\n", + "epa_rsei_df = pd.read_csv(\n", + " epa_rsei_data_path,\n", " dtype={ExtractTransformLoad.GEOID_TRACT_FIELD_NAME: \"string\"},\n", ")\n", "\n", - "epa_rsei_aggregate_df.head()" + "epa_rsei_df.head()" ] }, { @@ -382,7 +399,7 @@ " calenviroscreen_df,\n", " persistent_poverty_df,\n", " mapping_inequality_df,\n", - " epa_rsei_aggregate_df,\n", + " epa_rsei_df,\n", " maryland_ejscreen_df,\n", " energy_definition_alternative_draft_df,\n", " michigan_ejscreen_df,\n", @@ -416,7 +433,9 @@ "cell_type": "code", "execution_count": null, "id": "2de78f71", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Special handling for HOLC.\n", @@ -461,13 +480,41 @@ " field_names.L_NON_WORKFORCE,\n", "]\n", "\n", + "definition_m_factors = [\n", + " field_names.M_CLIMATE,\n", + " field_names.M_ENERGY,\n", + " field_names.M_TRANSPORTATION,\n", + " field_names.M_HOUSING,\n", + " field_names.M_POLLUTION,\n", + " field_names.M_WATER,\n", + " field_names.M_HEALTH,\n", + " field_names.M_WORKFORCE,\n", + " # Also include a combined factor for all the non-workforce elements.\n", + " field_names.M_NON_WORKFORCE,\n", + "]\n", + "\n", "census_tract_indices = (\n", " [\n", " Index(\n", + " method_name=\"Definition M\",\n", + " priority_communities_field=field_names.SCORE_M_COMMUNITIES,\n", + " ),\n", + " ]\n", + " + [\n", + " Index(\n", " method_name=\"Definition L\",\n", " priority_communities_field=field_names.SCORE_L_COMMUNITIES,\n", " ),\n", " ]\n", + " # Insert indices for each of the factors from Definition M.\n", + " # Note: since these involve no renaming, we write them using list comprehension.\n", + " + [\n", + " Index(\n", + " method_name=factor,\n", + " priority_communities_field=factor,\n", + " )\n", + " for factor in definition_m_factors\n", + " ]\n", " # Insert indices for each of the factors from Definition L.\n", " # Note: since these involve no renaming, we write them using list comprehension.\n", " + [\n", @@ -575,6 +622,7 @@ "comparison_fields = [\n", " field_names.POVERTY_LESS_THAN_100_FPL_FIELD,\n", " field_names.POVERTY_LESS_THAN_200_FPL_FIELD,\n", + " field_names.COLLEGE_ATTENDANCE_FIELD,\n", " field_names.MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD,\n", " field_names.LINGUISTIC_ISO_FIELD,\n", " field_names.UNEMPLOYMENT_FIELD,\n", @@ -584,6 +632,8 @@ " field_names.LIFE_EXPECTANCY_FIELD,\n", " field_names.HEALTH_INSURANCE_FIELD,\n", " field_names.PHYS_HEALTH_NOT_GOOD_FIELD,\n", + " field_names.DIABETES_FIELD,\n", + " field_names.LOW_READING_FIELD + field_names.PERCENTILE_FIELD_SUFFIX,\n", "]" ] }, @@ -874,7 +924,9 @@ "cell_type": "code", "execution_count": null, "id": "2bcbcabf", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "directory = COMPARISON_OUTPUTS_DIR / \"tracts_basic_stats\"\n", @@ -1001,24 +1053,28 @@ " E.g., it might show that tracts prioritized by A but not B have a higher average income,\n", " or that tracts prioritized by B but not A have a lower percent of unemployed people.\n", " \"\"\"\n", - " df_subset = df[\n", - " [\n", - " method_a_priority_census_tracts_field,\n", - " method_b_priority_census_tracts_field,\n", - " ]\n", - " + comparison_fields\n", + " fields_to_group_by = [\n", + " method_a_priority_census_tracts_field,\n", + " method_b_priority_census_tracts_field,\n", " ]\n", "\n", + " df_subset = df[fields_to_group_by + comparison_fields]\n", + "\n", " grouped_df = df_subset.groupby(\n", - " [\n", - " method_a_priority_census_tracts_field,\n", - " method_b_priority_census_tracts_field,\n", - " ],\n", + " fields_to_group_by,\n", " dropna=False,\n", " )\n", "\n", - " # Run the comparison function on the groups.\n", - " comparison_df = grouped_df.mean().reset_index()\n", + " # Take the mean of all fields.\n", + " comparison_df = grouped_df.mean()\n", + "\n", + " # Also add in the count of census tracts.\n", + " count_field_name = \"Count of census tracts\"\n", + " comparison_df[count_field_name] = grouped_df.size().to_frame(\n", + " count_field_name\n", + " )\n", + "\n", + " comparison_df = comparison_df.reset_index()\n", "\n", " criteria_description_field_name = \"Description of criteria\"\n", " comparison_df[criteria_description_field_name] = comparison_df.apply(\n", @@ -1030,10 +1086,13 @@ " )\n", "\n", " # Put criteria description column first.\n", - " new_column_order = [criteria_description_field_name] + [\n", - " col\n", - " for col in comparison_df.columns\n", - " if col != criteria_description_field_name\n", + " columns_to_put_first = (\n", + " [criteria_description_field_name]\n", + " + fields_to_group_by\n", + " + [count_field_name]\n", + " )\n", + " new_column_order = columns_to_put_first + [\n", + " col for col in comparison_df.columns if col not in columns_to_put_first\n", " ]\n", "\n", " comparison_df = comparison_df[new_column_order]\n", @@ -1356,7 +1415,9 @@ "cell_type": "code", "execution_count": null, "id": "7d095ebd", - "metadata": {}, + "metadata": { + "scrolled": false + }, "outputs": [], "source": [ "# Note: this is helpful because this file is long-running, so it alerts the user when the\n", @@ -1369,7 +1430,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -1383,7 +1444,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.9.6" } }, "nbformat": 4, diff --git a/data/data-pipeline/data_pipeline/score/field_names.py b/data/data-pipeline/data_pipeline/score/field_names.py index 7c7c514f..6af2877e 100644 --- a/data/data-pipeline/data_pipeline/score/field_names.py +++ b/data/data-pipeline/data_pipeline/score/field_names.py @@ -28,6 +28,8 @@ SCORE_I = "Score I" SCORE_I_COMMUNITIES = "Score I (communities)" SCORE_K = "NMTC (communities)" SCORE_K_COMMUNITIES = "Score K (communities)" + +# Definition L fields SCORE_L = "Definition L" SCORE_L_COMMUNITIES = "Definition L (communities)" L_CLIMATE = "Climate Factor (Definition L)" @@ -39,6 +41,20 @@ L_WATER = "Water Factor (Definition L)" L_HEALTH = "Health Factor (Definition L)" L_WORKFORCE = "Workforce Factor (Definition L)" L_NON_WORKFORCE = "Any Non-Workforce Factor (Definition L)" + +# Definition M fields +SCORE_M = "Definition M" +SCORE_M_COMMUNITIES = "Definition M (communities)" +M_CLIMATE = "Climate Factor (Definition M)" +M_ENERGY = "Energy Factor (Definition M)" +M_TRANSPORTATION = "Transportation Factor (Definition M)" +M_HOUSING = "Housing Factor (Definition M)" +M_POLLUTION = "Pollution Factor (Definition M)" +M_WATER = "Water Factor (Definition M)" +M_HEALTH = "Health Factor (Definition M)" +M_WORKFORCE = "Workforce Factor (Definition M)" +M_NON_WORKFORCE = "Any Non-Workforce Factor (Definition M)" + PERCENTILE = 90 MEDIAN_HOUSE_VALUE_PERCENTILE = 90 @@ -297,6 +313,8 @@ TRANSPORTATION_COSTS = "Transportation Costs" ##### # Names for individual factors being exceeded +# TODO: for Definition M, create new output field names (different than those used by +# Definition L) and change all output fields to say low income and low college # Climate Change EXPECTED_POPULATION_LOSS_RATE_LOW_INCOME_FIELD = ( f"Greater than or equal to the {PERCENTILE}th percentile" @@ -352,6 +370,8 @@ LOW_LIFE_EXPECTANCY_LOW_INCOME_FIELD = ( ) # Workforce +# TODO: for Definition M, create new output field names (different than those used by +# Definition L) and change all output fields to say low HS and low college UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD = ( f"Greater than or equal to the {PERCENTILE}th percentile for unemployment" " and has low HS education" @@ -373,6 +393,9 @@ LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD = ( ) LOW_HS_EDUCATION_FIELD = "Low high school education" +LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD = ( + "Low high school education and low college attendance" +) # Workforce for island areas ISLAND_AREAS_SUFFIX = " in 2009 (island areas)" @@ -420,5 +443,8 @@ LOW_READING_LOW_HS_EDUCATION_FIELD = ( THRESHOLD_COUNT = "Total threshold criteria exceeded" FPL_200_SERIES = "Is low income?" +FPL_200_AND_COLLEGE_ATTENDANCE_SERIES = ( + "Is low income and low college attendance?" +) # End of names for individual factors being exceeded #### diff --git a/data/data-pipeline/data_pipeline/score/score_l.py b/data/data-pipeline/data_pipeline/score/score_l.py index cd04c5f8..ca22aef9 100644 --- a/data/data-pipeline/data_pipeline/score/score_l.py +++ b/data/data-pipeline/data_pipeline/score/score_l.py @@ -120,54 +120,6 @@ class ScoreL(Score): axis=1, skipna=True ) - def add_columns(self) -> pd.DataFrame: - logger.info("Adding Score L") - - self.df[field_names.THRESHOLD_COUNT] = 0 - self.df[field_names.FPL_200_SERIES] = self._create_low_income_threshold( - self.df - ) - self.df[field_names.L_CLIMATE] = self._climate_factor() - self.df[field_names.L_ENERGY] = self._energy_factor() - self.df[field_names.L_TRANSPORTATION] = self._transportation_factor() - self.df[field_names.L_HOUSING] = self._housing_factor() - self.df[field_names.L_POLLUTION] = self._pollution_factor() - self.df[field_names.L_WATER] = self._water_factor() - self.df[field_names.L_HEALTH] = self._health_factor() - self.df[field_names.L_WORKFORCE] = self._workforce_factor() - - factors = [ - field_names.L_CLIMATE, - field_names.L_ENERGY, - field_names.L_TRANSPORTATION, - field_names.L_HOUSING, - field_names.L_POLLUTION, - field_names.L_WATER, - field_names.L_HEALTH, - field_names.L_WORKFORCE, - ] - self.df[field_names.SCORE_L_COMMUNITIES] = self.df[factors].any(axis=1) - - # Note: this is purely used for comparison tool analysis, and can be removed at a later date. - LMB. - non_workforce_factors = [ - field_names.L_CLIMATE, - field_names.L_ENERGY, - field_names.L_TRANSPORTATION, - field_names.L_HOUSING, - field_names.L_POLLUTION, - field_names.L_WATER, - field_names.L_HEALTH, - ] - self.df[field_names.L_NON_WORKFORCE] = self.df[ - non_workforce_factors - ].any(axis=1) - - self.df[ - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX - ] = self.df[field_names.SCORE_L_COMMUNITIES].astype(int) - - return self.df - def _climate_factor(self) -> bool: # In Xth percentile or above for FEMA’s Risk Index (Source: FEMA # AND @@ -689,3 +641,51 @@ class ScoreL(Score): workforce_combined_criteria_for_states | workforce_combined_criteria_for_island_areas ) + + def add_columns(self) -> pd.DataFrame: + logger.info("Adding Score L") + + self.df[field_names.THRESHOLD_COUNT] = 0 + self.df[field_names.FPL_200_SERIES] = self._create_low_income_threshold( + self.df + ) + self.df[field_names.L_CLIMATE] = self._climate_factor() + self.df[field_names.L_ENERGY] = self._energy_factor() + self.df[field_names.L_TRANSPORTATION] = self._transportation_factor() + self.df[field_names.L_HOUSING] = self._housing_factor() + self.df[field_names.L_POLLUTION] = self._pollution_factor() + self.df[field_names.L_WATER] = self._water_factor() + self.df[field_names.L_HEALTH] = self._health_factor() + self.df[field_names.L_WORKFORCE] = self._workforce_factor() + + factors = [ + field_names.L_CLIMATE, + field_names.L_ENERGY, + field_names.L_TRANSPORTATION, + field_names.L_HOUSING, + field_names.L_POLLUTION, + field_names.L_WATER, + field_names.L_HEALTH, + field_names.L_WORKFORCE, + ] + self.df[field_names.SCORE_L_COMMUNITIES] = self.df[factors].any(axis=1) + + # Note: this is purely used for comparison tool analysis, and can be removed at a later date. - LMB. + non_workforce_factors = [ + field_names.L_CLIMATE, + field_names.L_ENERGY, + field_names.L_TRANSPORTATION, + field_names.L_HOUSING, + field_names.L_POLLUTION, + field_names.L_WATER, + field_names.L_HEALTH, + ] + self.df[field_names.L_NON_WORKFORCE] = self.df[ + non_workforce_factors + ].any(axis=1) + + self.df[ + field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX + ] = self.df[field_names.SCORE_L_COMMUNITIES].astype(int) + + return self.df diff --git a/data/data-pipeline/data_pipeline/score/score_m.py b/data/data-pipeline/data_pipeline/score/score_m.py new file mode 100644 index 00000000..7ee94645 --- /dev/null +++ b/data/data-pipeline/data_pipeline/score/score_m.py @@ -0,0 +1,770 @@ +import numpy as np +import pandas as pd + +from data_pipeline.score.score import Score +import data_pipeline.score.field_names as field_names +from data_pipeline.utils import get_module_logger + +logger = get_module_logger(__name__) + + +class ScoreM(Score): + """Very similar to Score L, with a few minor modifications.""" + + def __init__(self, df: pd.DataFrame) -> None: + self.LOW_INCOME_THRESHOLD: float = 0.65 + self.MAX_COLLEGE_ATTENDANCE_THRESHOLD: float = 0.20 + self.ENVIRONMENTAL_BURDEN_THRESHOLD: float = 0.90 + self.MEDIAN_HOUSE_VALUE_THRESHOLD: float = 0.90 + self.LACK_OF_HIGH_SCHOOL_MINIMUM_THRESHOLD: float = 0.10 + + super().__init__(df) + + def _combine_island_areas_with_states_and_set_thresholds( + self, + df: pd.DataFrame, + column_from_island_areas: str, + column_from_decennial_census: str, + combined_column_name: str, + threshold_cutoff_for_island_areas: float, + ) -> (pd.DataFrame, str): + """Steps to set thresholds for island areas. + + This function is fairly logically complicated. It takes the following steps: + + 1. Combine the two different fields into a single field. + 2. Calculate the 90th percentile cutoff raw value for the combined field. + 3. Create a boolean series that is true for any census tract in the island + areas (and only the island areas) that exceeds this cutoff. + + For step one, it combines data that is either the island area's Decennial Census + value in 2009 or the state's value in 5-year ACS ending in 2010. + + This will be used to generate the percentile cutoff for the 90th percentile. + + The stateside decennial census stopped asking economic comparisons, + so this is as close to apples-to-apples as we get. We use 5-year ACS for data + robustness over 1-year ACS. + """ + # Create the combined field. + # TODO: move this combined field percentile calculation to `etl_score`, + # since most other percentile logic is there. + # There should only be one entry in either 2009 or 2019 fields, not one in both. + # But just to be safe, we take the mean and ignore null values so if there + # *were* entries in both, this result would make sense. + df[combined_column_name] = df[ + [column_from_island_areas, column_from_decennial_census] + ].mean(axis=1, skipna=True) + + logger.info( + f"Combined field `{combined_column_name}` has " + f"{df[combined_column_name].isnull().sum()} " + f"({df[combined_column_name].isnull().sum() * 100 / len(df):.2f}%) " + f"missing values for census tracts. " + ) + + # Calculate the percentile threshold raw value. + raw_threshold = np.nanquantile( + a=df[combined_column_name], q=threshold_cutoff_for_island_areas + ) + + logger.info( + f"For combined field `{combined_column_name}`, " + f"the {threshold_cutoff_for_island_areas*100:.0f} percentile cutoff is a " + f"raw value of {raw_threshold:.3f}." + ) + + threshold_column_name = ( + f"{column_from_island_areas} exceeds " + f"{threshold_cutoff_for_island_areas*100:.0f}th percentile" + ) + + df[threshold_column_name] = ( + df[column_from_island_areas] >= raw_threshold + ) + + percent_of_tracts_highlighted = ( + 100 + * df[threshold_column_name].sum() + / df[column_from_island_areas].notnull().sum() + ) + + logger.info( + f"For `{threshold_column_name}`, " + f"{df[threshold_column_name].sum()} (" + f"{percent_of_tracts_highlighted:.2f}% of tracts that have non-null data " + f"in the column) have a value of TRUE." + ) + + return df, threshold_column_name + + def _create_low_income_and_low_college_attendance_threshold( + self, df: pd.DataFrame + ) -> pd.Series: + """ + Returns a pandas series (really a numpy array) + of booleans based on the condition of the FPL at 200% + is at or more than some established threshold + """ + return ( + ( + df[ + field_names.POVERTY_LESS_THAN_200_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.LOW_INCOME_THRESHOLD + ) + ) & ( + ( + df[field_names.COLLEGE_ATTENDANCE_FIELD] + <= self.MAX_COLLEGE_ATTENDANCE_THRESHOLD + ) + | ( + # If college attendance data is null for this tract, just rely on the + # poverty data + df[field_names.COLLEGE_ATTENDANCE_FIELD].isna() + ) + ) + + def _increment_total_eligibility_exceeded( + self, columns_for_subset: list + ) -> None: + """ + Increments the total eligible factors for a given tract + """ + + self.df[field_names.THRESHOLD_COUNT] += self.df[columns_for_subset].sum( + axis=1, skipna=True + ) + + def _climate_factor(self) -> bool: + # In Xth percentile or above for FEMA’s Risk Index (Source: FEMA + # 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 + # poverty level. Source: Census's American Community Survey] + + climate_eligibility_columns = [ + field_names.EXPECTED_POPULATION_LOSS_RATE_LOW_INCOME_FIELD, + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_LOW_INCOME_FIELD, + field_names.EXPECTED_BUILDING_LOSS_RATE_LOW_INCOME_FIELD, + # field_names.EXTREME_HEAT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD, + ] + + expected_population_loss_threshold = ( + self.df[ + field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + expected_agriculture_loss_threshold = ( + self.df[ + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + expected_building_loss_threshold = ( + self.df[ + field_names.EXPECTED_BUILDING_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + extreme_heat_and_median_house_value_threshold = ( + self.df[ + field_names.EXTREME_HEAT_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) & ( + self.df[ + field_names.MEDIAN_HOUSE_VALUE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + <= self.MEDIAN_HOUSE_VALUE_THRESHOLD + ) + + self.df[field_names.EXPECTED_POPULATION_LOSS_RATE_LOW_INCOME_FIELD] = ( + expected_population_loss_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[field_names.EXPECTED_AGRICULTURE_LOSS_RATE_LOW_INCOME_FIELD] = ( + expected_agriculture_loss_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[field_names.EXPECTED_BUILDING_LOSS_RATE_LOW_INCOME_FIELD] = ( + expected_building_loss_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[ + field_names.EXTREME_HEAT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD + ] = ( + extreme_heat_and_median_house_value_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded(climate_eligibility_columns) + + return self.df[climate_eligibility_columns].any(axis="columns") + + def _energy_factor(self) -> bool: + # In Xth percentile or above for DOE’s energy cost burden score (Source: LEAD Score) + # 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 + # poverty level. Source: Census's American Community Survey] + + energy_eligibility_columns = [ + field_names.PM25_EXPOSURE_LOW_INCOME_FIELD, + field_names.ENERGY_BURDEN_LOW_INCOME_FIELD, + ] + + energy_burden_threshold = ( + self.df[ + field_names.ENERGY_BURDEN_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + pm25_threshold = ( + self.df[ + field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.PM25_EXPOSURE_LOW_INCOME_FIELD] = ( + pm25_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[field_names.ENERGY_BURDEN_LOW_INCOME_FIELD] = ( + energy_burden_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded(energy_eligibility_columns) + + return self.df[energy_eligibility_columns].any(axis="columns") + + def _transportation_factor(self) -> bool: + # In Xth percentile or above for diesel particulate matter (Source: EPA National Air Toxics Assessment (NATA) + # or + # 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 + # 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 + # poverty level. Source: Census's American Community Survey] + + transportion_eligibility_columns = [ + field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD, + field_names.TRAFFIC_PROXIMITY_LOW_INCOME_FIELD, + ] + + diesel_threshold = ( + self.df[ + field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + traffic_threshold = ( + self.df[ + field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD] = ( + diesel_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[field_names.TRAFFIC_PROXIMITY_LOW_INCOME_FIELD] = ( + traffic_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded( + transportion_eligibility_columns + ) + + return self.df[transportion_eligibility_columns].any(axis="columns") + + def _housing_factor(self) -> bool: + # ( + # In Xth percentile or above for lead paint (Source: Census's American Community Survey’s + # percent of housing units built pre-1960, used as an indicator of potential lead paint exposure in homes) + # AND + # In Yth percentile or below for Median House Value (Source: Census's American Community Survey) + # ) + # or + # In Xth percentile or above for housing cost burden (Source: HUD's Comprehensive Housing Affordability Strategy dataset + # 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 + # poverty level. Source: Census's American Community Survey] + + housing_eligibility_columns = [ + field_names.LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD, + field_names.HOUSING_BURDEN_LOW_INCOME_FIELD, + ] + + lead_paint_median_home_value_threshold = ( + self.df[ + field_names.LEAD_PAINT_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) & ( + self.df[ + field_names.MEDIAN_HOUSE_VALUE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + <= self.MEDIAN_HOUSE_VALUE_THRESHOLD + ) + + housing_burden_threshold = ( + self.df[ + field_names.HOUSING_BURDEN_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + # series by series indicators + self.df[field_names.LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD] = ( + lead_paint_median_home_value_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self.df[field_names.HOUSING_BURDEN_LOW_INCOME_FIELD] = ( + housing_burden_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded(housing_eligibility_columns) + + return self.df[housing_eligibility_columns].any(axis="columns") + + def _pollution_factor(self) -> bool: + # Proximity to Risk Management Plan sites is > X + # 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 + # poverty level. Source: Census's American Community Survey] + + pollution_eligibility_columns = [ + field_names.RMP_LOW_INCOME_FIELD, + field_names.SUPERFUND_LOW_INCOME_FIELD, + field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD, + ] + + rmp_sites_threshold = ( + self.df[field_names.RMP_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + npl_sites_threshold = ( + self.df[field_names.NPL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + tsdf_sites_threshold = ( + self.df[ + field_names.TSDF_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_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.SUPERFUND_LOW_INCOME_FIELD] = ( + npl_sites_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD] = ( + tsdf_sites_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded( + pollution_eligibility_columns + ) + + return self.df[pollution_eligibility_columns].any(axis="columns") + + def _water_factor(self) -> bool: + # In Xth percentile or above for wastewater discharge (Source: EPA Risk-Screening Environmental Indicators (RSEI) Model) + # 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 + # poverty level. Source: Census's American Community Survey] + + wastewater_threshold = ( + self.df[ + field_names.WASTEWATER_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.WASTEWATER_DISCHARGE_LOW_INCOME_FIELD] = ( + wastewater_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded( + [field_names.WASTEWATER_DISCHARGE_LOW_INCOME_FIELD] + ) + + return self.df[field_names.WASTEWATER_DISCHARGE_LOW_INCOME_FIELD] + + def _health_factor(self) -> bool: + # In Xth percentile or above for diabetes (Source: CDC Places) + # or + # In Xth percentile or above for asthma (Source: CDC Places) + # or + # In Xth percentile or above for heart disease + # or + # In Xth percentile or above for low life expectancy (Source: CDC Places) + # 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 + # poverty level. Source: Census's American Community Survey] + + health_eligibility_columns = [ + field_names.DIABETES_LOW_INCOME_FIELD, + field_names.ASTHMA_LOW_INCOME_FIELD, + field_names.HEART_DISEASE_LOW_INCOME_FIELD, + field_names.LOW_LIFE_EXPECTANCY_LOW_INCOME_FIELD, + # field_names.HEALTHY_FOOD_LOW_INCOME_FIELD, + ] + + diabetes_threshold = ( + self.df[ + field_names.DIABETES_FIELD + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + asthma_threshold = ( + self.df[ + field_names.ASTHMA_FIELD + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + heart_disease_threshold = ( + self.df[ + field_names.HEART_DISEASE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + low_life_expectancy_threshold = ( + self.df[ + field_names.LOW_LIFE_EXPECTANCY_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + healthy_food_threshold = ( + self.df[ + field_names.HEALTHY_FOOD_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.DIABETES_LOW_INCOME_FIELD] = ( + diabetes_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.ASTHMA_LOW_INCOME_FIELD] = ( + asthma_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.HEART_DISEASE_LOW_INCOME_FIELD] = ( + heart_disease_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.LOW_LIFE_EXPECTANCY_LOW_INCOME_FIELD] = ( + low_life_expectancy_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + self.df[field_names.HEALTHY_FOOD_LOW_INCOME_FIELD] = ( + healthy_food_threshold + & self.df[field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES] + ) + + self._increment_total_eligibility_exceeded(health_eligibility_columns) + + return self.df[health_eligibility_columns].any(axis="columns") + + def _workforce_factor(self) -> bool: + # Where unemployment is above Xth percentile + # or + # Where median income as a percent of area median income is above Xth percentile + # or + # Where the percent of households at or below 100% of the federal poverty level + # is above Xth percentile + # or + # Where linguistic isolation is above Xth percentile + # AND + # Where the high school degree achievement rates for adults 25 years and older + # is less than Y% + # (necessary to screen out university tracts) + + # Workforce criteria for states fields. + workforce_eligibility_columns = [ + field_names.UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD, + field_names.POVERTY_LOW_HS_EDUCATION_FIELD, + field_names.LINGUISTIC_ISOLATION_LOW_HS_EDUCATION_FIELD, + field_names.LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD, + ] + + self.df[field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD] = ( + self.df[field_names.HIGH_SCHOOL_ED_FIELD] + >= self.LACK_OF_HIGH_SCHOOL_MINIMUM_THRESHOLD + ) & ( + ( + self.df[field_names.COLLEGE_ATTENDANCE_FIELD] + <= self.MAX_COLLEGE_ATTENDANCE_THRESHOLD + ) + | ( + # If college attendance data is null for this tract, just rely on the + # poverty/AMI data + self.df[field_names.COLLEGE_ATTENDANCE_FIELD].isna() + ) + ) + + unemployment_threshold = ( + self.df[ + field_names.UNEMPLOYMENT_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + low_median_income_threshold = ( + self.df[ + field_names.LOW_MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + linguistic_isolation_threshold = ( + self.df[ + field_names.LINGUISTIC_ISO_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + poverty_threshold = ( + self.df[ + field_names.POVERTY_LESS_THAN_100_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.LINGUISTIC_ISOLATION_LOW_HS_EDUCATION_FIELD] = ( + linguistic_isolation_threshold + & self.df[field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD] + ) + + self.df[field_names.POVERTY_LOW_HS_EDUCATION_FIELD] = ( + poverty_threshold + & self.df[field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD] + ) + + self.df[field_names.LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD] = ( + low_median_income_threshold + & self.df[field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD] + ) + + self.df[field_names.UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD] = ( + unemployment_threshold + & self.df[field_names.LOW_HS_EDUCATION_LOW_COLLEGE_ATTENDANCE_FIELD] + ) + + workforce_combined_criteria_for_states = self.df[ + workforce_eligibility_columns + ].any(axis="columns") + + self._increment_total_eligibility_exceeded( + workforce_eligibility_columns + ) + + # Now, calculate workforce criteria for island territories. + island_areas_workforce_eligibility_columns = [ + field_names.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD, + field_names.ISLAND_AREAS_POVERTY_LOW_HS_EDUCATION_FIELD, + field_names.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD, + ] + + # First, combine unemployment. + ( + self.df, + island_areas_unemployment_criteria_field_name, + ) = self._combine_island_areas_with_states_and_set_thresholds( + df=self.df, + column_from_island_areas=field_names.CENSUS_DECENNIAL_UNEMPLOYMENT_FIELD_2009, + column_from_decennial_census=field_names.CENSUS_UNEMPLOYMENT_FIELD_2010, + combined_column_name=field_names.COMBINED_UNEMPLOYMENT_2010, + threshold_cutoff_for_island_areas=self.ENVIRONMENTAL_BURDEN_THRESHOLD, + ) + + # Next, combine poverty. + ( + self.df, + island_areas_poverty_criteria_field_name, + ) = self._combine_island_areas_with_states_and_set_thresholds( + df=self.df, + column_from_island_areas=field_names.CENSUS_DECENNIAL_POVERTY_LESS_THAN_100_FPL_FIELD_2009, + column_from_decennial_census=field_names.CENSUS_POVERTY_LESS_THAN_100_FPL_FIELD_2010, + combined_column_name=field_names.COMBINED_POVERTY_LESS_THAN_100_FPL_FIELD_2010, + threshold_cutoff_for_island_areas=self.ENVIRONMENTAL_BURDEN_THRESHOLD, + ) + + # Also check whether low area median income is 90th percentile or higher + # within the islands. + island_areas_low_median_income_as_a_percent_of_ami_criteria_field_name = ( + f"{field_names.LOW_CENSUS_DECENNIAL_AREA_MEDIAN_INCOME_PERCENT_FIELD_2009} exceeds " + f"{field_names.PERCENTILE}th percentile" + ) + self.df[ + island_areas_low_median_income_as_a_percent_of_ami_criteria_field_name + ] = ( + self.df[ + field_names.LOW_CENSUS_DECENNIAL_AREA_MEDIAN_INCOME_PERCENT_FIELD_2009 + + field_names.PERCENTILE_FIELD_SUFFIX + ] + >= self.ENVIRONMENTAL_BURDEN_THRESHOLD + ) + + self.df[field_names.ISLAND_AREAS_LOW_HS_EDUCATION_FIELD] = ( + self.df[field_names.CENSUS_DECENNIAL_HIGH_SCHOOL_ED_FIELD_2009] + >= self.LACK_OF_HIGH_SCHOOL_MINIMUM_THRESHOLD + ) + + self.df[ + field_names.ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD + ] = ( + self.df[island_areas_unemployment_criteria_field_name] + & self.df[field_names.ISLAND_AREAS_LOW_HS_EDUCATION_FIELD] + ) + + self.df[field_names.ISLAND_AREAS_POVERTY_LOW_HS_EDUCATION_FIELD] = ( + self.df[island_areas_poverty_criteria_field_name] + & self.df[field_names.ISLAND_AREAS_LOW_HS_EDUCATION_FIELD] + ) + + self.df[ + field_names.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD + ] = ( + self.df[ + island_areas_low_median_income_as_a_percent_of_ami_criteria_field_name + ] + & self.df[field_names.ISLAND_AREAS_LOW_HS_EDUCATION_FIELD] + ) + + workforce_combined_criteria_for_island_areas = self.df[ + island_areas_workforce_eligibility_columns + ].any(axis="columns") + + self._increment_total_eligibility_exceeded( + island_areas_workforce_eligibility_columns + ) + + percent_of_island_tracts_highlighted = ( + 100 + * workforce_combined_criteria_for_island_areas.sum() + # Choosing a random column from island areas to calculate the denominator. + / self.df[field_names.CENSUS_DECENNIAL_UNEMPLOYMENT_FIELD_2009] + .notnull() + .sum() + ) + + logger.info( + f"For workforce criteria in island areas, " + f"{workforce_combined_criteria_for_island_areas.sum()} (" + f"{percent_of_island_tracts_highlighted:.2f}% of tracts that have non-null data " + f"in the column) have a value of TRUE." + ) + + # A tract is included if it meets either the states tract criteria or the + # island areas tract criteria. + return ( + workforce_combined_criteria_for_states + | workforce_combined_criteria_for_island_areas + ) + + def add_columns(self) -> pd.DataFrame: + logger.info("Adding Score M") + + self.df[field_names.THRESHOLD_COUNT] = 0 + self.df[ + field_names.FPL_200_AND_COLLEGE_ATTENDANCE_SERIES + ] = self._create_low_income_and_low_college_attendance_threshold( + self.df + ) + self.df[field_names.M_CLIMATE] = self._climate_factor() + self.df[field_names.M_ENERGY] = self._energy_factor() + self.df[field_names.M_TRANSPORTATION] = self._transportation_factor() + self.df[field_names.M_HOUSING] = self._housing_factor() + self.df[field_names.M_POLLUTION] = self._pollution_factor() + self.df[field_names.M_WATER] = self._water_factor() + self.df[field_names.M_HEALTH] = self._health_factor() + self.df[field_names.M_WORKFORCE] = self._workforce_factor() + + factors = [ + field_names.M_CLIMATE, + field_names.M_ENERGY, + field_names.M_TRANSPORTATION, + field_names.M_HOUSING, + field_names.M_POLLUTION, + field_names.M_WATER, + field_names.M_HEALTH, + field_names.M_WORKFORCE, + ] + self.df[field_names.SCORE_M_COMMUNITIES] = self.df[factors].any(axis=1) + + # Note: this is purely used for comparison tool analysis, and can be removed at a later date. - LMB. + non_workforce_factors = [ + field_names.M_CLIMATE, + field_names.M_ENERGY, + field_names.M_TRANSPORTATION, + field_names.M_HOUSING, + field_names.M_POLLUTION, + field_names.M_WATER, + field_names.M_HEALTH, + ] + self.df[field_names.M_NON_WORKFORCE] = self.df[ + non_workforce_factors + ].any(axis=1) + + self.df[ + field_names.SCORE_M + field_names.PERCENTILE_FIELD_SUFFIX + ] = self.df[field_names.SCORE_M_COMMUNITIES].astype(int) + + return self.df diff --git a/data/data-pipeline/data_pipeline/score/score_runner.py b/data/data-pipeline/data_pipeline/score/score_runner.py index 2eac192b..b22e2d51 100644 --- a/data/data-pipeline/data_pipeline/score/score_runner.py +++ b/data/data-pipeline/data_pipeline/score/score_runner.py @@ -9,6 +9,7 @@ from data_pipeline.score.score_h import ScoreH from data_pipeline.score.score_i import ScoreI from data_pipeline.score.score_k import ScoreK from data_pipeline.score.score_l import ScoreL +from data_pipeline.score.score_m import ScoreM from data_pipeline.score import field_names from data_pipeline.utils import get_module_logger @@ -33,6 +34,7 @@ class ScoreRunner: self.df = ScoreI(df=self.df).add_columns() self.df = ScoreK(df=self.df).add_columns() self.df = ScoreL(df=self.df).add_columns() + self.df = ScoreM(df=self.df).add_columns() # TODO do this with each score instead of in a bundle # Create percentiles for these index scores