diff --git a/data/data-pipeline/README.md b/data/data-pipeline/README.md index 15c1a959..46b7f14d 100644 --- a/data/data-pipeline/README.md +++ b/data/data-pipeline/README.md @@ -159,7 +159,7 @@ We use Docker to install the necessary libraries in a container that can be run To build the docker container the first time, make sure you're in the root directory of the repository and run `docker-compose build --no-cache`. -Once completed, run `docker-compose up`. Docker will spin up 3 containers: the client container, the static server container and the data container. Once all data is generated, you can see the application using a browser and navigating to `htto://localhost:8000`. +Once completed, run `docker-compose up`. Docker will spin up 3 containers: the client container, the static server container and the data container. Once all data is generated, you can see the application using a browser and navigating to `http://localhost:8000`. If you want to run specific data tasks, you can open a terminal window, navigate to the root folder for this repository and then execute any command for the application using this format: @@ -322,7 +322,7 @@ score_initial_df = pd.read_csv(score_csv_path, dtype={"GEOID10_TRACT": "string"} score_initial_df.to_csv(data_path / "data_pipeline" / "etl" / "score" / "tests" / "sample_data" /"score_data_initial.csv", index=False) ``` -Now you can move on to updating inidvidual pickles for the tests. Note that it is helpful to do them in this order: +Now you can move on to updating individual pickles for the tests. Note that it is helpful to do them in this order: We have four pickle files that correspond to expected files: - `score_data_expected.pkl`: Initial score without counties diff --git a/data/data-pipeline/data_pipeline/etl/score/constants.py b/data/data-pipeline/data_pipeline/etl/score/constants.py index 17b218d2..8341ffbb 100644 --- a/data/data-pipeline/data_pipeline/etl/score/constants.py +++ b/data/data-pipeline/data_pipeline/etl/score/constants.py @@ -1,7 +1,6 @@ from pathlib import Path import datetime -import pandas as pd from data_pipeline.config import settings from data_pipeline.score import field_names @@ -38,6 +37,9 @@ FULL_SCORE_CSV_FULL_PLUS_COUNTIES_FILE_PATH = ( # Score Tile CSV source path DATA_SCORE_CSV_TILES_PATH = DATA_SCORE_CSV_DIR / "tiles" DATA_SCORE_CSV_TILES_FILE_PATH = DATA_SCORE_CSV_TILES_PATH / "usa.csv" +DATA_SCORE_JSON_INDEX_FILE_PATH = ( + DATA_SCORE_CSV_TILES_PATH / "tile_indexes.json" +) ## Tile path DATA_SCORE_TILES_DIR = DATA_SCORE_DIR / "tiles" @@ -60,119 +62,214 @@ SCORE_DOWNLOADABLE_ZIP_FILE_PATH = ( # Column subsets CENSUS_COUNTIES_COLUMNS = ["USPS", "GEOID", "NAME"] -TILES_SCORE_COLUMNS = [ - field_names.GEOID_TRACT_FIELD, - field_names.STATE_FIELD, - field_names.COUNTY_FIELD, - field_names.TOTAL_POP_FIELD, - field_names.SCORE_D + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.SCORE_D + field_names.TOP_25_PERCENTILE_SUFFIX, - field_names.SCORE_E + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.SCORE_E + field_names.TOP_25_PERCENTILE_SUFFIX, - field_names.SCORE_G_COMMUNITIES, - field_names.SCORE_G, - field_names.SCORE_L_COMMUNITIES, - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.POVERTY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.HIGH_SCHOOL_ED_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LINGUISTIC_ISO_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.UNEMPLOYMENT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.HOUSING_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.DIABETES_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.ASTHMA_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.HEART_DISEASE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LOW_LIFE_EXPECTANCY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.FEMA_RISK_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.ENERGY_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LEAD_PAINT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + +TILES_ROUND_NUM_DECIMALS = 2 +# Tiles data: full field name, tile index name +TILES_SCORE_COLUMNS = { + field_names.GEOID_TRACT_FIELD: "GTF", + field_names.STATE_FIELD: "SF", + field_names.COUNTY_FIELD: "CF", + field_names.DIABETES_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "DF_PFS", + field_names.ASTHMA_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "AF_PFS", + field_names.HEART_DISEASE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "HDF_PFS", + field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "DSF_PFS", + field_names.ENERGY_BURDEN_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "EBF_PFS", + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "EALR_PFS", + field_names.EXPECTED_BUILDING_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "EBLR_PFS", + field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "EPLR_PFS", + field_names.HOUSING_BURDEN_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "HBF_PFS", + field_names.LOW_LIFE_EXPECTANCY_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "LLEF_PFS", + field_names.LINGUISTIC_ISO_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "LIF_PFS", field_names.LOW_MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD - + field_names.PERCENTILE_FIELD_SUFFIX, + + field_names.PERCENTILE_FIELD_SUFFIX: "LMI_PFS", + field_names.MEDIAN_HOUSE_VALUE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "MHVF_PFS", + field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "PM25F_PFS", + field_names.HIGH_SCHOOL_ED_FIELD: "HSEF", + field_names.POVERTY_LESS_THAN_100_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "P100_PFS", field_names.POVERTY_LESS_THAN_200_FPL_FIELD - + field_names.PERCENTILE_FIELD_SUFFIX, -] + + field_names.PERCENTILE_FIELD_SUFFIX: "P200_PFS", + field_names.LEAD_PAINT_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX: "LPF_PFS", + field_names.NPL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "NPL_PFS", + field_names.RMP_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "RMP_PFS", + field_names.TSDF_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "TSDF_PFS", + field_names.TOTAL_POP_FIELD: "TPF", + field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX: "TF_PFS", + field_names.UNEMPLOYMENT_FIELD + + 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.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", + field_names.PM25_EXPOSURE_LOW_INCOME_FIELD: "PM25LI", + field_names.ENERGY_BURDEN_LOW_INCOME_FIELD: "EBLI", + field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD: "DPMLI", + field_names.TRAFFIC_PROXIMITY_LOW_INCOME_FIELD: "TPLI", + field_names.LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD: "LPMHVLI", + field_names.HOUSING_BURDEN_LOW_INCOME_FIELD: "HBLI", + field_names.RMP_LOW_INCOME_FIELD: "RMPLI", + field_names.SUPERFUND_LOW_INCOME_FIELD: "SFLI", + field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD: "HWLI", + field_names.WASTEWATER_DISCHARGE_LOW_INCOME_FIELD: "WDLI", + field_names.DIABETES_LOW_INCOME_FIELD: "DLI", + field_names.ASTHMA_LOW_INCOME_FIELD: "ALI", + field_names.HEART_DISEASE_LOW_INCOME_FIELD: "HDLI", + field_names.LOW_LIFE_EXPECTANCY_LOW_INCOME_FIELD: "LLELI", + field_names.LINGUISTIC_ISOLATION_LOW_HS_EDUCATION_FIELD: "LILHSE", + 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.FPL_200_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", + field_names.ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD: "IALMILHSE", +} # columns to round floats to 2 decimals +# TODO refactor to use much smaller subset of fields we DON'T want to round TILES_SCORE_FLOAT_COLUMNS = [ - field_names.SCORE_D + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.SCORE_D + field_names.TOP_25_PERCENTILE_SUFFIX, - field_names.SCORE_E + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.SCORE_E + field_names.TOP_25_PERCENTILE_SUFFIX, - field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.POVERTY_FIELD, - field_names.HIGH_SCHOOL_ED_FIELD, - field_names.LINGUISTIC_ISO_FIELD, - field_names.UNEMPLOYMENT_FIELD, - field_names.HOUSING_BURDEN_FIELD, - field_names.POVERTY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.HIGH_SCHOOL_ED_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LINGUISTIC_ISO_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.UNEMPLOYMENT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.HOUSING_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.DIABETES_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.ASTHMA_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.HEART_DISEASE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LOW_LIFE_EXPECTANCY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.FEMA_RISK_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.ENERGY_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LEAD_PAINT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.ENERGY_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_BUILDING_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.HOUSING_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LOW_LIFE_EXPECTANCY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LINGUISTIC_ISO_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, field_names.LOW_MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.MEDIAN_HOUSE_VALUE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.POVERTY_LESS_THAN_100_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, field_names.POVERTY_LESS_THAN_200_FPL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LEAD_PAINT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.NPL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.RMP_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + 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.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX, ] -TILES_ROUND_NUM_DECIMALS = 2 - -DOWNLOADABLE_SCORE_INDICATOR_COLUMNS_BASIC = [ - field_names.AMI_FIELD, - field_names.POVERTY_LESS_THAN_100_FPL_FIELD, - field_names.HIGH_SCHOOL_ED_FIELD, - field_names.DIABETES_FIELD, - field_names.ASTHMA_FIELD, - field_names.HEART_DISEASE_FIELD, - field_names.TRAFFIC_FIELD, - field_names.FEMA_RISK_FIELD, - field_names.ENERGY_BURDEN_FIELD, - field_names.HOUSING_BURDEN_FIELD, - field_names.WASTEWATER_FIELD, - field_names.LEAD_PAINT_FIELD, - field_names.DIESEL_FIELD, - field_names.PM25_FIELD, - field_names.TOTAL_POP_FIELD, -] - -# For every indicator above, we want to include percentile also. -DOWNLOADABLE_SCORE_INDICATOR_COLUMNS_FULL = list( - pd.core.common.flatten( - [ - [p, f"{p}{field_names.PERCENTILE_FIELD_SUFFIX}"] - for p in DOWNLOADABLE_SCORE_INDICATOR_COLUMNS_BASIC - ] - ) -) # Finally we augment with the GEOID10, county, and state DOWNLOADABLE_SCORE_COLUMNS = [ field_names.GEOID_TRACT_FIELD, field_names.COUNTY_FIELD, field_names.STATE_FIELD, - field_names.SCORE_G_COMMUNITIES, - # Note: the reverse percentile fields get moved down here because - # we put the raw value in the download along with the *reversed* percentile. - # All other fields we put in f"{field_name}" and - # f"{field_name}{field_names.PERCENTILE_FIELD_SUFFIX}", which doesn't work for the - # reversed percentile fields. + field_names.SCORE_L_COMMUNITIES, + field_names.TOTAL_POP_FIELD, + field_names.FPL_200_SERIES, + field_names.POVERTY_LESS_THAN_200_FPL_FIELD, + field_names.POVERTY_LESS_THAN_200_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD, + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_AGRICULTURE_LOSS_RATE_LOW_INCOME_FIELD, + field_names.EXPECTED_BUILDING_LOSS_RATE_FIELD, + field_names.EXPECTED_BUILDING_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_BUILDING_LOSS_RATE_LOW_INCOME_FIELD, + field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD, + field_names.EXPECTED_POPULATION_LOSS_RATE_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.EXPECTED_POPULATION_LOSS_RATE_LOW_INCOME_FIELD, + field_names.ENERGY_BURDEN_FIELD, + field_names.ENERGY_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.ENERGY_BURDEN_LOW_INCOME_FIELD, + field_names.PM25_FIELD, + field_names.PM25_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.PM25_EXPOSURE_LOW_INCOME_FIELD, + field_names.DIESEL_FIELD, + field_names.DIESEL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.DIESEL_PARTICULATE_MATTER_LOW_INCOME_FIELD, + field_names.TRAFFIC_FIELD, + field_names.TRAFFIC_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.TRAFFIC_PROXIMITY_LOW_INCOME_FIELD, + field_names.HOUSING_BURDEN_FIELD, + field_names.HOUSING_BURDEN_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.HOUSING_BURDEN_LOW_INCOME_FIELD, + field_names.LEAD_PAINT_FIELD, + field_names.LEAD_PAINT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD, + field_names.MEDIAN_HOUSE_VALUE_FIELD, + field_names.MEDIAN_HOUSE_VALUE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.TSDF_FIELD, + field_names.TSDF_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.HAZARDOUS_WASTE_LOW_INCOME_FIELD, + field_names.NPL_FIELD, + field_names.NPL_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.SUPERFUND_LOW_INCOME_FIELD, + field_names.RMP_FIELD, + field_names.RMP_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.RMP_LOW_INCOME_FIELD, + field_names.WASTEWATER_FIELD, + field_names.WASTEWATER_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.WASTEWATER_DISCHARGE_LOW_INCOME_FIELD, + field_names.ASTHMA_FIELD, + field_names.ASTHMA_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.ASTHMA_LOW_INCOME_FIELD, + field_names.DIABETES_FIELD, + field_names.DIABETES_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.DIABETES_LOW_INCOME_FIELD, + field_names.HEART_DISEASE_FIELD, + field_names.HEART_DISEASE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.HEART_DISEASE_LOW_INCOME_FIELD, + field_names.LIFE_EXPECTANCY_FIELD, + field_names.LOW_LIFE_EXPECTANCY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LOW_LIFE_EXPECTANCY_LOW_INCOME_FIELD, field_names.MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD, field_names.LOW_MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - field_names.LIFE_EXPECTANCY_FIELD, - field_names.LOW_LIFE_EXPECTANCY_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, - *DOWNLOADABLE_SCORE_INDICATOR_COLUMNS_FULL, + field_names.LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD, + field_names.LINGUISTIC_ISO_FIELD, + field_names.LINGUISTIC_ISOLATION_LOW_HS_EDUCATION_FIELD, + field_names.UNEMPLOYMENT_FIELD, + field_names.UNEMPLOYMENT_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.LINGUISTIC_ISO_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.POVERTY_LESS_THAN_100_FPL_FIELD, + field_names.POVERTY_LESS_THAN_100_FPL_FIELD + + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.POVERTY_LOW_HS_EDUCATION_FIELD, + field_names.HIGH_SCHOOL_ED_FIELD, + field_names.HIGH_SCHOOL_ED_FIELD + field_names.PERCENTILE_FIELD_SUFFIX, + field_names.THRESHOLD_COUNT, + field_names.UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD, + field_names.COMBINED_UNEMPLOYMENT_2010, + field_names.CENSUS_DECENNIAL_UNEMPLOYMENT_FIELD_2009, + field_names.COMBINED_POVERTY_LESS_THAN_100_FPL_FIELD_2010, + 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, ] 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 edb11e68..ba728040 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 @@ -3,10 +3,12 @@ import pandas as pd import geopandas as gpd from data_pipeline.etl.base import ExtractTransformLoad +from data_pipeline.etl.score import constants from data_pipeline.etl.sources.census.etl_utils import ( check_census_data_source, ) from data_pipeline.etl.score.etl_utils import check_score_data_source +from data_pipeline.score import field_names from data_pipeline.utils import get_module_logger logger = get_module_logger(__name__) @@ -31,9 +33,19 @@ class GeoScoreETL(ExtractTransformLoad): self.DATA_PATH / "census" / "geojson" / "us.json" ) - self.TARGET_SCORE_NAME = "Definition L (percentile)" + # Import the shortened name for Score L percentile ("SL_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 + ] self.TARGET_SCORE_RENAME_TO = "L_SCORE" + # Import the shortened name for tract ("GTF") that's used on the tiles. + self.TRACT_SHORT_FIELD = constants.TILES_SCORE_COLUMNS[ + field_names.GEOID_TRACT_FIELD + ] + self.GEOMETRY_FIELD_NAME = "geometry" + self.NUMBER_OF_BUCKETS = 10 self.geojson_usa_df: gpd.GeoDataFrame @@ -57,45 +69,52 @@ class GeoScoreETL(ExtractTransformLoad): logger.info("Reading US GeoJSON (~6 minutes)") self.geojson_usa_df = gpd.read_file( self.CENSUS_USA_GEOJSON, - dtype={"GEOID10": "string"}, - usecols=["GEOID10", "geometry"], + dtype={self.GEOID_FIELD_NAME: "string"}, + usecols=[self.GEOID_FIELD_NAME, self.GEOMETRY_FIELD_NAME], low_memory=False, ) - self.geojson_usa_df.head() logger.info("Reading score CSV") self.score_usa_df = pd.read_csv( self.TILE_SCORE_CSV, - dtype={self.GEOID_TRACT_FIELD_NAME: "string"}, + dtype={self.TRACT_SHORT_FIELD: "string"}, low_memory=False, ) def transform(self) -> None: - # rename GEOID10_TRACT to GEOID10 on score to allow merging with Census GeoJSON + # Rename GEOID10_TRACT to GEOID10 on score to allow merging with Census GeoJSON self.score_usa_df.rename( - columns={self.GEOID_TRACT_FIELD_NAME: "GEOID10"}, + columns={self.TRACT_SHORT_FIELD: self.GEOID_FIELD_NAME}, inplace=True, ) logger.info("Pruning Census GeoJSON") - fields = ["GEOID10", "geometry"] + fields = [self.GEOID_FIELD_NAME, self.GEOMETRY_FIELD_NAME] self.geojson_usa_df = self.geojson_usa_df[fields] logger.info("Merging and compressing score CSV with USA GeoJSON") self.geojson_score_usa_high = self.score_usa_df.merge( - self.geojson_usa_df, on="GEOID10", how="left" + self.geojson_usa_df, on=self.GEOID_FIELD_NAME, how="left" ) self.geojson_score_usa_high = gpd.GeoDataFrame( self.geojson_score_usa_high, crs="EPSG:4326" ) + logger.info(f"Columns: {self.geojson_score_usa_high.columns}") + usa_simplified = self.geojson_score_usa_high[ - ["GEOID10", self.TARGET_SCORE_NAME, "geometry"] + [ + self.GEOID_FIELD_NAME, + self.TARGET_SCORE_SHORT_FIELD, + self.GEOMETRY_FIELD_NAME, + ] ].reset_index(drop=True) usa_simplified.rename( - columns={self.TARGET_SCORE_NAME: self.TARGET_SCORE_RENAME_TO}, + columns={ + self.TARGET_SCORE_SHORT_FIELD: self.TARGET_SCORE_RENAME_TO + }, inplace=True, ) @@ -104,7 +123,7 @@ class GeoScoreETL(ExtractTransformLoad): usa_tracts = gpd.GeoDataFrame( usa_tracts, - columns=[self.TARGET_SCORE_RENAME_TO, "geometry"], + columns=[self.TARGET_SCORE_RENAME_TO, self.GEOMETRY_FIELD_NAME], crs="EPSG:4326", ) @@ -122,7 +141,7 @@ class GeoScoreETL(ExtractTransformLoad): self.geojson_score_usa_low = gpd.GeoDataFrame( compressed, - columns=[self.TARGET_SCORE_RENAME_TO, "geometry"], + columns=[self.TARGET_SCORE_RENAME_TO, self.GEOMETRY_FIELD_NAME], crs="EPSG:4326", ) @@ -135,7 +154,7 @@ class GeoScoreETL(ExtractTransformLoad): ) -> gpd.GeoDataFrame: # The tract identifier is the first 11 digits of the GEOID block_group_df["tract"] = block_group_df.apply( - lambda row: row["GEOID10"][0:11], axis=1 + lambda row: row[self.GEOID_FIELD_NAME][0:11], axis=1 ) state_tracts = block_group_df.dissolve(by="tract", aggfunc="mean") return state_tracts @@ -160,7 +179,7 @@ class GeoScoreETL(ExtractTransformLoad): [ self.TARGET_SCORE_RENAME_TO, f"{self.TARGET_SCORE_RENAME_TO}_bucket", - "geometry", + self.GEOMETRY_FIELD_NAME, ] ].reset_index(drop=True) state_dissolve = state_attr.dissolve( @@ -173,11 +192,13 @@ class GeoScoreETL(ExtractTransformLoad): ) -> gpd.GeoDataFrame: compressed = [] for i in range(num_buckets): - for j in range(len(state_bucketed_df["geometry"][i].geoms)): + for j in range( + len(state_bucketed_df[self.GEOMETRY_FIELD_NAME][i].geoms) + ): compressed.append( [ state_bucketed_df[self.TARGET_SCORE_RENAME_TO][i], - state_bucketed_df["geometry"][i].geoms[j], + state_bucketed_df[self.GEOMETRY_FIELD_NAME][i].geoms[j], ] ) return compressed 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 4723296c..8f527c7a 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 @@ -1,5 +1,7 @@ from pathlib import Path +import json import pandas as pd + from data_pipeline.etl.base import ExtractTransformLoad from data_pipeline.utils import get_module_logger, zip_files from data_pipeline.score import field_names @@ -198,16 +200,37 @@ class PostScoreETL(ExtractTransformLoad): self, score_county_state_merged_df: pd.DataFrame ) -> pd.DataFrame: logger.info("Rounding Decimals") - score_tiles = score_county_state_merged_df[ - constants.TILES_SCORE_COLUMNS - ] + + # grab all the keys from tiles score columns + tiles_score_column_titles = list(constants.TILES_SCORE_COLUMNS.keys()) + + # filter the columns on full score + score_tiles = score_county_state_merged_df[tiles_score_column_titles] + + # round decimals decimals = pd.Series( [constants.TILES_ROUND_NUM_DECIMALS] * len(constants.TILES_SCORE_FLOAT_COLUMNS), index=constants.TILES_SCORE_FLOAT_COLUMNS, ) + score_tiles = score_tiles.round(decimals) - return score_tiles.round(decimals) + # create indexes + score_tiles = score_tiles.rename( + columns=constants.TILES_SCORE_COLUMNS, + inplace=False, + ) + + # write the json map to disk + inverse_tiles_columns = { + v: k for k, v in constants.TILES_SCORE_COLUMNS.items() + } # reverse dict + index_file_path = constants.DATA_SCORE_JSON_INDEX_FILE_PATH + index_file_path.parent.mkdir(parents=True, exist_ok=True) + with open(index_file_path, "w", encoding="utf-8") as fp: + json.dump(inverse_tiles_columns, fp) + + return score_tiles def _create_downloadable_data( self, score_county_state_merged_df: pd.DataFrame 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 c986e88d..6b6ab712 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 >=18 years,Coronary heart disease among adults aged >=18 years,Cancer (excluding skin cancer) among adults aged >=18 years,Current lack of health insurance among adults aged 18-64 years,Diagnosed diabetes among adults aged >=18 years,Physical health not good for >=14 days among adults aged >=18 years,Percent of individuals < 100% Federal Poverty Line,Percent of individuals < 150% Federal Poverty Line,Percent of individuals < 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,Particulate matter (PM2.5),Ozone,Traffic proximity and volume,Proximity to Risk Management Plan (RMP) facilities,Proximity to TSDF 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,Unemployed civilians (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,Unemployed civilians (percent) in 2009,Unemployed civilians (percent) in 2010,Percent of individuals < 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 >=18 years (percentile),Current asthma among adults aged >=18 years (value urban only),Current asthma among adults aged >=18 years (percentile urban only),Current asthma among adults aged >=18 years (value rural only),Current asthma among adults aged >=18 years (percentile rural only),Current asthma among adults aged >=18 years (percentile urban/rural),Current asthma among adults aged >=18 years (min-max normalized),Coronary heart disease among adults aged >=18 years (percentile),Coronary heart disease among adults aged >=18 years (value urban only),Coronary heart disease among adults aged >=18 years (percentile urban only),Coronary heart disease among adults aged >=18 years (value rural only),Coronary heart disease among adults aged >=18 years (percentile rural only),Coronary heart disease among adults aged >=18 years (percentile urban/rural),Coronary heart disease among adults aged >=18 years (min-max normalized),Cancer (excluding skin cancer) among adults aged >=18 years (percentile),Cancer (excluding skin cancer) among adults aged >=18 years (value urban only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile urban only),Cancer (excluding skin cancer) among adults aged >=18 years (value rural only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile rural only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile urban/rural),Cancer (excluding skin cancer) among adults aged >=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 >=18 years (percentile),Diagnosed diabetes among adults aged >=18 years (value urban only),Diagnosed diabetes among adults aged >=18 years (percentile urban only),Diagnosed diabetes among adults aged >=18 years (value rural only),Diagnosed diabetes among adults aged >=18 years (percentile rural only),Diagnosed diabetes among adults aged >=18 years (percentile urban/rural),Diagnosed diabetes among adults aged >=18 years (min-max normalized),Physical health not good for >=14 days among adults aged >=18 years (percentile),Physical health not good for >=14 days among adults aged >=18 years (value urban only),Physical health not good for >=14 days among adults aged >=18 years (percentile urban only),Physical health not good for >=14 days among adults aged >=18 years (value rural only),Physical health not good for >=14 days among adults aged >=18 years (percentile rural only),Physical health not good for >=14 days among adults aged >=18 years (percentile urban/rural),Physical health not good for >=14 days among adults aged >=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 < 200% Federal Poverty Line (percentile),Percent of individuals < 200% Federal Poverty Line (value urban only),Percent of individuals < 200% Federal Poverty Line (percentile urban only),Percent of individuals < 200% Federal Poverty Line (value rural only),Percent of individuals < 200% Federal Poverty Line (percentile rural only),Percent of individuals < 200% Federal Poverty Line (percentile urban/rural),Percent of individuals < 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 (percentile),Diesel particulate matter (value urban only),Diesel particulate matter (percentile urban only),Diesel particulate matter (value rural only),Diesel particulate matter (percentile rural only),Diesel particulate matter (percentile urban/rural),Diesel particulate matter (min-max normalized),Particulate matter (PM2.5) (percentile),Particulate matter (PM2.5) (value urban only),Particulate matter (PM2.5) (percentile urban only),Particulate matter (PM2.5) (value rural only),Particulate matter (PM2.5) (percentile rural only),Particulate matter (PM2.5) (percentile urban/rural),Particulate matter (PM2.5) (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 TSDF sites (percentile),Proximity to TSDF sites (value urban only),Proximity to TSDF sites (percentile urban only),Proximity to TSDF sites (value rural only),Proximity to TSDF sites (percentile rural only),Proximity to TSDF sites (percentile urban/rural),Proximity to TSDF 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),Unemployed civilians (percent) (percentile),Unemployed civilians (percent) (value urban only),Unemployed civilians (percent) (percentile urban only),Unemployed civilians (percent) (value rural only),Unemployed civilians (percent) (percentile rural only),Unemployed civilians (percent) (percentile urban/rural),Unemployed civilians (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),Unemployed civilians (percent) in 2009 (percentile),Unemployed civilians (percent) in 2009 (value urban only),Unemployed civilians (percent) in 2009 (percentile urban only),Unemployed civilians (percent) in 2009 (value rural only),Unemployed civilians (percent) in 2009 (percentile rural only),Unemployed civilians (percent) in 2009 (percentile urban/rural),Unemployed civilians (percent) in 2009 (min-max normalized),Unemployed civilians (percent) in 2010 (percentile),Unemployed civilians (percent) in 2010 (value urban only),Unemployed civilians (percent) in 2010 (percentile urban only),Unemployed civilians (percent) in 2010 (value rural only),Unemployed civilians (percent) in 2010 (percentile rural only),Unemployed civilians (percent) in 2010 (percentile urban/rural),Unemployed civilians (percent) in 2010 (min-max normalized),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile),Percent of individuals < 100% Federal Poverty Line in 2010 (value urban only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile urban only),Percent of individuals < 100% Federal Poverty Line in 2010 (value rural only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile rural only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile urban/rural),Percent of individuals < 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,At or above the 90th percentile for expected population loss rate and is low income,At or above the 90th percentile for expected agriculture loss rate and is low income,At or above the 90th percentile for expected building loss rate and is low income,Climate Factor (Definition L),At or above the 90th percentile for PM2.5 exposure and is low income,At or above the 90th percentile for energy burden and is low income,Energy Factor (Definition L),At or above the 90th percentile for diesel particulate matter and is low income,At or above the 90th percentile for traffic proximity and is low income,Transportation Factor (Definition L),At or above the 90th percentile for lead paint and the median house value is less than 90th percentile and is low income,At or above the 90th percentile for housing burden and is low income,Housing Factor (Definition L),At or above the 90th percentile for proximity to RMP sites and is low income,At or above the 90th percentile for proximity to superfund sites and is low income,At or above the 90th percentile for proximity to hazardous waste facilities and is low income,Pollution Factor (Definition L),At or above the 90th percentile for wastewater discharge and is low income,Water Factor (Definition L),At or above the 90th percentile for diabetes and is low income,At or above the 90th percentile for asthma and is low income,At or above the 90th percentile for heart disease and is low income,At or above the 90th percentile for low life expectancy and is low income,Health Factor (Definition L),At or above the 90th percentile for households in linguistic isolation and has low HS education,At or above the 90th percentile for households at or below 100% federal poverty level and has low HS education,At or below the 90th percentile for low median household income as a percent of area median income and has low HS education,At or above the 90th percentile for unemployment and has low HS education,Unemployed civilians (percent) in 2009 (island areas) and 2010 (states and PR),Unemployed civilians (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,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,0.1536983669548511,False,0.3189099613330878,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,False,False,False,True,0.0804953560371517,False,0.2950894905920146,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 >=18 years,Coronary heart disease among adults aged >=18 years,Cancer (excluding skin cancer) among adults aged >=18 years,Current lack of health insurance among adults aged 18-64 years,Diagnosed diabetes among adults aged >=18 years,Physical health not good for >=14 days among adults aged >=18 years,Percent of individuals < 100% Federal Poverty Line,Percent of individuals < 150% Federal Poverty Line,Percent of individuals < 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,Particulate matter (PM2.5),Ozone,Traffic proximity and volume,Proximity to Risk Management Plan (RMP) facilities,Proximity to TSDF 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,Unemployed civilians (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,Unemployed civilians (percent) in 2009,Unemployed civilians (percent) in 2010,Percent of individuals < 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 >=18 years (percentile),Current asthma among adults aged >=18 years (value urban only),Current asthma among adults aged >=18 years (percentile urban only),Current asthma among adults aged >=18 years (value rural only),Current asthma among adults aged >=18 years (percentile rural only),Current asthma among adults aged >=18 years (percentile urban/rural),Current asthma among adults aged >=18 years (min-max normalized),Coronary heart disease among adults aged >=18 years (percentile),Coronary heart disease among adults aged >=18 years (value urban only),Coronary heart disease among adults aged >=18 years (percentile urban only),Coronary heart disease among adults aged >=18 years (value rural only),Coronary heart disease among adults aged >=18 years (percentile rural only),Coronary heart disease among adults aged >=18 years (percentile urban/rural),Coronary heart disease among adults aged >=18 years (min-max normalized),Cancer (excluding skin cancer) among adults aged >=18 years (percentile),Cancer (excluding skin cancer) among adults aged >=18 years (value urban only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile urban only),Cancer (excluding skin cancer) among adults aged >=18 years (value rural only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile rural only),Cancer (excluding skin cancer) among adults aged >=18 years (percentile urban/rural),Cancer (excluding skin cancer) among adults aged >=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 >=18 years (percentile),Diagnosed diabetes among adults aged >=18 years (value urban only),Diagnosed diabetes among adults aged >=18 years (percentile urban only),Diagnosed diabetes among adults aged >=18 years (value rural only),Diagnosed diabetes among adults aged >=18 years (percentile rural only),Diagnosed diabetes among adults aged >=18 years (percentile urban/rural),Diagnosed diabetes among adults aged >=18 years (min-max normalized),Physical health not good for >=14 days among adults aged >=18 years (percentile),Physical health not good for >=14 days among adults aged >=18 years (value urban only),Physical health not good for >=14 days among adults aged >=18 years (percentile urban only),Physical health not good for >=14 days among adults aged >=18 years (value rural only),Physical health not good for >=14 days among adults aged >=18 years (percentile rural only),Physical health not good for >=14 days among adults aged >=18 years (percentile urban/rural),Physical health not good for >=14 days among adults aged >=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 < 200% Federal Poverty Line (percentile),Percent of individuals < 200% Federal Poverty Line (value urban only),Percent of individuals < 200% Federal Poverty Line (percentile urban only),Percent of individuals < 200% Federal Poverty Line (value rural only),Percent of individuals < 200% Federal Poverty Line (percentile rural only),Percent of individuals < 200% Federal Poverty Line (percentile urban/rural),Percent of individuals < 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 (percentile),Diesel particulate matter (value urban only),Diesel particulate matter (percentile urban only),Diesel particulate matter (value rural only),Diesel particulate matter (percentile rural only),Diesel particulate matter (percentile urban/rural),Diesel particulate matter (min-max normalized),Particulate matter (PM2.5) (percentile),Particulate matter (PM2.5) (value urban only),Particulate matter (PM2.5) (percentile urban only),Particulate matter (PM2.5) (value rural only),Particulate matter (PM2.5) (percentile rural only),Particulate matter (PM2.5) (percentile urban/rural),Particulate matter (PM2.5) (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 TSDF sites (percentile),Proximity to TSDF sites (value urban only),Proximity to TSDF sites (percentile urban only),Proximity to TSDF sites (value rural only),Proximity to TSDF sites (percentile rural only),Proximity to TSDF sites (percentile urban/rural),Proximity to TSDF 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),Unemployed civilians (percent) (percentile),Unemployed civilians (percent) (value urban only),Unemployed civilians (percent) (percentile urban only),Unemployed civilians (percent) (value rural only),Unemployed civilians (percent) (percentile rural only),Unemployed civilians (percent) (percentile urban/rural),Unemployed civilians (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),Unemployed civilians (percent) in 2009 (percentile),Unemployed civilians (percent) in 2009 (value urban only),Unemployed civilians (percent) in 2009 (percentile urban only),Unemployed civilians (percent) in 2009 (value rural only),Unemployed civilians (percent) in 2009 (percentile rural only),Unemployed civilians (percent) in 2009 (percentile urban/rural),Unemployed civilians (percent) in 2009 (min-max normalized),Unemployed civilians (percent) in 2010 (percentile),Unemployed civilians (percent) in 2010 (value urban only),Unemployed civilians (percent) in 2010 (percentile urban only),Unemployed civilians (percent) in 2010 (value rural only),Unemployed civilians (percent) in 2010 (percentile rural only),Unemployed civilians (percent) in 2010 (percentile urban/rural),Unemployed civilians (percent) in 2010 (min-max normalized),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile),Percent of individuals < 100% Federal Poverty Line in 2010 (value urban only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile urban only),Percent of individuals < 100% Federal Poverty Line in 2010 (value rural only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile rural only),Percent of individuals < 100% Federal Poverty Line in 2010 (percentile urban/rural),Percent of individuals < 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,At or above the 90th percentile for expected population loss rate and is low income,At or above the 90th percentile for expected agriculture loss rate and is low income,At or above the 90th percentile for expected building loss rate and is low income,Climate Factor (Definition L),At or above the 90th percentile for PM2.5 exposure and is low income,At or above the 90th percentile for energy burden and is low income,Energy Factor (Definition L),At or above the 90th percentile for diesel particulate matter and is low income,At or above the 90th percentile for traffic proximity and is low income,Transportation Factor (Definition L),At or above the 90th percentile for lead paint and the median house value is less than 90th percentile and is low income,At or above the 90th percentile for housing burden and is low income,Housing Factor (Definition L),At or above the 90th percentile for proximity to RMP sites and is low income,At or above the 90th percentile for proximity to superfund sites and is low income,At or above the 90th percentile for proximity to hazardous waste facilities and is low income,Pollution Factor (Definition L),At or above the 90th percentile for wastewater discharge and is low income,Water Factor (Definition L),At or above the 90th percentile for diabetes and is low income,At or above the 90th percentile for asthma and is low income,At or above the 90th percentile for heart disease and is low income,At or above the 90th percentile for low life expectancy and is low income,Health Factor (Definition L),At or above the 90th percentile for households in linguistic isolation and has low HS education,At or above the 90th percentile for households at or below 100% federal poverty level and has low HS education,At or above the 90th percentile for low median household income as a percent of area median income and has low HS education,At or above the 90th percentile for unemployment and has low HS education,Unemployed civilians (percent) in 2009 (island areas) and 2010 (states and PR),Unemployed civilians (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,At or above the 90th percentile for unemployment and has low HS education in 2009 (island areas),At or above the 90th percentile for households at or below 100% federal poverty level and has low HS education in 2009 (island areas),At or above 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,0.1536983669548511,False,0.3189099613330878,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,False,False,False,True,0.0804953560371517,False,0.2950894905920146,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 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 1aa07d41..1250013a 100644 Binary files a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl and b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/downloadable_data_expected.pkl differ diff --git a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_data_expected.pkl b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_data_expected.pkl index 30ce7217..349152bb 100644 Binary files a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_data_expected.pkl and b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_data_expected.pkl differ 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 7cf90e94..0f414b74 100644 Binary files a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_transformed_expected.pkl and b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/score_transformed_expected.pkl differ 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 23802eee..1b206828 100644 Binary files a/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl and b/data/data-pipeline/data_pipeline/etl/score/tests/snapshots/tile_data_expected.pkl differ diff --git a/data/data-pipeline/data_pipeline/etl/sources/census/etl.py b/data/data-pipeline/data_pipeline/etl/sources/census/etl.py index 83baf445..5f1398b6 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/census/etl.py +++ b/data/data-pipeline/data_pipeline/etl/sources/census/etl.py @@ -136,7 +136,7 @@ class CensusETL(ExtractTransformLoad): def transform(self) -> None: """Download all census shape files from the Census FTP and extract the geojson - to generate national and by state Census Block Group CSVs and GeoJSONs + to generate national and by state Census tract CSVs and GeoJSONs Returns: None @@ -225,7 +225,7 @@ class CensusETL(ExtractTransformLoad): logger.info("Writing national geojson file") usa_df.to_file(self.NATIONAL_TRACT_JSON_PATH, driver="GeoJSON") - logger.info("Census block groups downloading complete") + logger.info("Census tract downloading complete") def load(self) -> None: """Create state CSVs, National CSV, and National GeoJSON diff --git a/data/data-pipeline/data_pipeline/score/field_names.py b/data/data-pipeline/data_pipeline/score/field_names.py index 76d11038..be0353cd 100644 --- a/data/data-pipeline/data_pipeline/score/field_names.py +++ b/data/data-pipeline/data_pipeline/score/field_names.py @@ -291,14 +291,27 @@ POVERTY_LOW_HS_EDUCATION_FIELD = ( " and has low HS education" ) -LOW_READING_LOW_HS_EDUCATION_FIELD = ( - f"At or above the {PERCENTILE}th percentile for low 3rd grade reading proficiency" - " and has low HS education" +LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD = ( + f"At or above the {PERCENTILE}th percentile for low median household income as a " + f"percent of area median income and has low HS education" ) -LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD = ( - f"At or below the {PERCENTILE}th percentile for low median household income as a " - f"percent of area median income and has low HS education" +# Workforce for island areas +ISLAND_AREAS_SUFFIX = " in 2009 (island areas)" +ISLAND_AREAS_UNEMPLOYMENT_LOW_HS_EDUCATION_FIELD = ( + f"At or above the {PERCENTILE}th percentile for unemployment" + f" and has low HS education{ISLAND_AREAS_SUFFIX}" +) + +ISLAND_AREAS_POVERTY_LOW_HS_EDUCATION_FIELD = ( + f"At or above the {PERCENTILE}th percentile for households at or below 100% federal poverty level" + f" and has low HS education{ISLAND_AREAS_SUFFIX}" +) + +ISLAND_AREAS_LOW_MEDIAN_INCOME_LOW_HS_EDUCATION_FIELD = ( + f"At or above the {PERCENTILE}th percentile for low median household income as a " + f"percent of area median income" + f" and has low HS education{ISLAND_AREAS_SUFFIX}" ) # Not currently used in a factor @@ -317,6 +330,10 @@ HEALTHY_FOOD_LOW_INCOME_FIELD = ( f"At or above the {PERCENTILE}th percentile for low " f"access to healthy food and is low income" ) +LOW_READING_LOW_HS_EDUCATION_FIELD = ( + f"At or above the {PERCENTILE}th percentile for low 3rd grade reading proficiency" + " and has low HS education" +) THRESHOLD_COUNT = "Total threshold criteria exceeded" diff --git a/data/data-pipeline/data_pipeline/score/score_l.py b/data/data-pipeline/data_pipeline/score/score_l.py index d11267bf..d3607d54 100644 --- a/data/data-pipeline/data_pipeline/score/score_l.py +++ b/data/data-pipeline/data_pipeline/score/score_l.py @@ -117,7 +117,7 @@ class ScoreL(Score): """ self.df[field_names.THRESHOLD_COUNT] += self.df[columns_for_subset].sum( - axis=1 + axis=1, skipna=True ) def add_columns(self) -> pd.DataFrame: @@ -162,7 +162,7 @@ class ScoreL(Score): non_workforce_factors ].any(axis=1) - self.df["Definition L (percentile)"] = self.df[ + self.df[field_names.SCORE_L + field_names.PERCENTILE_FIELD_SUFFIX] = self.df[ field_names.SCORE_L_COMMUNITIES ].astype(int) @@ -586,12 +586,16 @@ class ScoreL(Score): ) # 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, + ] - # F a couple of values, create a combined field and criteria field. # First, combine unemployment. ( self.df, - unemployment_island_areas_criteria_field_name, + 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, @@ -603,7 +607,7 @@ class ScoreL(Score): # Next, combine poverty. ( self.df, - poverty_island_areas_criteria_field_name, + 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, @@ -614,12 +618,12 @@ class ScoreL(Score): # Also check whether low area median income is 90th percentile or higher # within the islands. - low_median_income_as_a_percent_of_ami_island_areas_criteria_field_name = ( + 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[ - low_median_income_as_a_percent_of_ami_island_areas_criteria_field_name + 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 @@ -628,17 +632,40 @@ class ScoreL(Score): >= self.ENVIRONMENTAL_BURDEN_THRESHOLD ) - workforce_combined_criteria_for_island_areas = ( - self.df[unemployment_island_areas_criteria_field_name] - | self.df[poverty_island_areas_criteria_field_name] - | self.df[ - low_median_income_as_a_percent_of_ami_island_areas_criteria_field_name - ] - ) & ( + island_areas_high_scool_achievement_rate_threshold = ( 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] + & island_areas_high_scool_achievement_rate_threshold + ) + + self.df[field_names.ISLAND_AREAS_POVERTY_LOW_HS_EDUCATION_FIELD] = ( + self.df[island_areas_poverty_criteria_field_name] + & island_areas_high_scool_achievement_rate_threshold + ) + + 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 + ] + & island_areas_high_scool_achievement_rate_threshold + ) + + 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() diff --git a/data/data-pipeline/pytest.ini b/data/data-pipeline/pytest.ini new file mode 100644 index 00000000..7022c5f7 --- /dev/null +++ b/data/data-pipeline/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +norecursedirs = .git data