diff --git a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/README.md b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/README.md index 2fc797a6..071f222b 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/README.md +++ b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/README.md @@ -14,7 +14,7 @@ The two "Pollution Burden" average scores are then averaged together and the res For each indicator, the percentile is given. For example, the indicator value for "Asthma Emergency Discharges" with 0.9 is therefore in the 90th percentile, which means only 10% of tracts in Maryland have higher values. EJ Scores near 1 represent areas of the greatest environmental justice concern. -A study of Bladensburg, MD - located in Prince George’s County - demonstrated the application of the MD EJSCREEN (Driver et al., 2019). According to the study, The Bladensburg population is primarily Black (62.7%) and Latinx (33.0%), with 20.1% of the community members living below the federal poverty line. Through an analysis, leveraging the Maryland EJSCREEN, Bladensburg with MD EJSCREEN, the researchers found that Bladensburg has an EJ score higher than 99% of the census tracts in Prince George’s County, indicating a higher prevalence of environmental hazards in the region. +A study of Bladensburg, MD - located in Prince George’s County - demonstrated the application of the MD EJSCREEN (Driver et al., 2019). According to the study, The Bladensburg population is composed of 20.1% of the community members living below the federal poverty line. Through an analysis, leveraging the Maryland EJSCREEN, Bladensburg with MD EJSCREEN, the researchers found that Bladensburg has an EJ score higher than 99% of the census tracts in Prince George’s County, indicating a higher prevalence of environmental hazards in the region. Furthermore, it was determined that Bladensburg residents are at a higher risk of developing cancer due to air pollution than 90–100% of the census tracts in the state or county. diff --git a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py index eed10ad1..0ce86f43 100644 --- a/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py +++ b/data/data-pipeline/data_pipeline/etl/sources/maryland_ejscreen/etl.py @@ -26,11 +26,11 @@ class MarylandEJScreenETL(ExtractTransformLoad): self.COLUMNS_TO_KEEP = [ self.GEOID_TRACT_FIELD_NAME, - field_names.MARYLAND_EJSCREEN_TRACT_25_PERCENT_FIELD, - field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENT_FIELD, - field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENT_FIELD, - field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENT_FIELD, - field_names.MARYLAND_EJSCREEN_PERCENTILE_FIELD, + field_names.MARYLAND_EJSCREEN_TRACT_25_PERCENTILE_FIELD, + field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD, + field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD, + field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD, + field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD, field_names.MARYLAND_EJSCREEN_SCORE_FIELD, field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD, ] @@ -94,27 +94,27 @@ class MarylandEJScreenETL(ExtractTransformLoad): # Interpretation: An EJ score (reported as a percentile) # has a percentile rank of N for some N between 0 - 100" - self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_FIELD] = self.df[ + self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD] = self.df[ field_names.MARYLAND_EJSCREEN_SCORE_FIELD ].rank(pct=True, ascending=True) # An arbitrarily chosen threshold is used in the comparison tool output self.df[field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD] = ( - self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_FIELD] > 0.75 + self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD] > 0.75 ) # Baseline Comparisons with some quartiles and the 90th percent OF EJ Score # Interpretation: The score is greater than or equal to N% of the tracts in the state. - self.df[field_names.MARYLAND_EJSCREEN_TRACT_25_PERCENT_FIELD] = ( + self.df[field_names.MARYLAND_EJSCREEN_TRACT_25_PERCENTILE_FIELD] = ( self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD] >= 0.25 ) - self.df[field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENT_FIELD] = ( + self.df[field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD] = ( self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD] >= 0.50 ) - self.df[field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENT_FIELD] = ( + self.df[field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD] = ( self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD] >= 0.75 ) - self.df[field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENT_FIELD] = ( + self.df[field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD] = ( self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD] >= 0.90 ) @@ -123,5 +123,5 @@ class MarylandEJScreenETL(ExtractTransformLoad): # write maryland tracts to csv self.OUTPUT_CSV_PATH.mkdir(parents=True, exist_ok=True) self.df[self.COLUMNS_TO_KEEP].to_csv( - self.OUTPUT_CSV_PATH / "maryland_ejscreen.csv", index=False + self.OUTPUT_CSV_PATH / "maryland.csv", index=False ) diff --git a/data/data-pipeline/data_pipeline/score/field_names.py b/data/data-pipeline/data_pipeline/score/field_names.py index 3ec67b89..9ea159e3 100644 --- a/data/data-pipeline/data_pipeline/score/field_names.py +++ b/data/data-pipeline/data_pipeline/score/field_names.py @@ -220,20 +220,20 @@ MICHIGAN_EJSCREEN_PRIORITY_COMMUNITY_FIELD: str = ( ) # Maryland EJSCREEN Data. -MARYLAND_EJSCREEN_TRACT_25_PERCENT_FIELD: str = ( +MARYLAND_EJSCREEN_TRACT_25_PERCENTILE_FIELD: str = ( "Tract is >=25% all other Maryland Tracts" ) -MARYLAND_EJSCREEN_TRACT_50_PERCENT_FIELD: str = ( +MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD: str = ( "Tract is >=50% all other Maryland Tracts" ) -MARYLAND_EJSCREEN_TRACT_75_PERCENT_FIELD: str = ( +MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD: str = ( "Tract is >=75% all other Maryland Tracts" ) -MARYLAND_EJSCREEN_TRACT_90_PERCENT_FIELD: str = ( +MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD: str = ( "Tract is >=90% all other Maryland Tracts" ) -MARYLAND_EJSCREEN_PERCENTILE_FIELD: str = ( +MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD: str = ( "Maryland EJSCREEN Percentile Rank for EJ Score" )