mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 18:14:19 -08:00
added PR fixes
This commit is contained in:
parent
38990a1449
commit
159516df80
3 changed files with 5 additions and 17 deletions
|
@ -30,9 +30,9 @@ class MarylandEJScreenETL(ExtractTransformLoad):
|
||||||
field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD,
|
field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD,
|
||||||
field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD,
|
field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD,
|
||||||
field_names.MARYLAND_EJSCREEN_TRACT_90_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_SCORE_FIELD,
|
||||||
field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD,
|
field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD,
|
||||||
|
field_names.MARYLAND_EJSCREEN_SCORE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX
|
||||||
]
|
]
|
||||||
|
|
||||||
self.df: pd.DataFrame
|
self.df: pd.DataFrame
|
||||||
|
@ -94,13 +94,13 @@ class MarylandEJScreenETL(ExtractTransformLoad):
|
||||||
|
|
||||||
# Interpretation: An EJ score (reported as a percentile)
|
# Interpretation: An EJ score (reported as a percentile)
|
||||||
# has a percentile rank of N for some N between 0 - 100"
|
# has a percentile rank of N for some N between 0 - 100"
|
||||||
self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD] = self.df[
|
self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] = self.df[
|
||||||
field_names.MARYLAND_EJSCREEN_SCORE_FIELD
|
field_names.MARYLAND_EJSCREEN_SCORE_FIELD
|
||||||
].rank(pct=True, ascending=True)
|
].rank(pct=True, ascending=True)
|
||||||
|
|
||||||
# An arbitrarily chosen threshold is used in the comparison tool output
|
# 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_BURDENED_THRESHOLD_FIELD] = (
|
||||||
self.df[field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD] > 0.75
|
self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] > 0.75
|
||||||
)
|
)
|
||||||
|
|
||||||
# Baseline Comparisons with some quartiles and the 90th percent OF EJ Score
|
# Baseline Comparisons with some quartiles and the 90th percent OF EJ Score
|
||||||
|
|
|
@ -478,14 +478,6 @@
|
||||||
" Index(\n",
|
" Index(\n",
|
||||||
" method_name=\"Maryland EJSCREEN\",\n",
|
" method_name=\"Maryland EJSCREEN\",\n",
|
||||||
" priority_communities_field=field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD,\n",
|
" priority_communities_field=field_names.MARYLAND_EJSCREEN_BURDENED_THRESHOLD_FIELD,\n",
|
||||||
" other_census_tract_fields_to_keep=[\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_SCORE_FIELD,\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_TRACT_25_PERCENTILE_FIELD,\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_TRACT_50_PERCENTILE_FIELD,\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_TRACT_75_PERCENTILE_FIELD,\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD,\n",
|
|
||||||
" field_names.MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD \n",
|
|
||||||
" ]\n",
|
|
||||||
" ), \n",
|
" ), \n",
|
||||||
" Index(\n",
|
" Index(\n",
|
||||||
" method_name=field_names.ENERGY_RELATED_COMMUNITIES_DEFINITION_ALTERNATIVE,\n",
|
" method_name=field_names.ENERGY_RELATED_COMMUNITIES_DEFINITION_ALTERNATIVE,\n",
|
||||||
|
@ -1333,7 +1325,7 @@
|
||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3 (ipykernel)",
|
"display_name": "Python 3",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
|
@ -1347,7 +1339,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.6"
|
"version": "3.6.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -237,10 +237,6 @@ MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD: str = (
|
||||||
"Tract is >=90% all other Maryland Tracts"
|
"Tract is >=90% all other Maryland Tracts"
|
||||||
)
|
)
|
||||||
|
|
||||||
MARYLAND_EJSCREEN_PERCENTILE_RANK_FIELD: str = (
|
|
||||||
"Maryland EJSCREEN Percentile Rank for EJ Score"
|
|
||||||
)
|
|
||||||
|
|
||||||
MARYLAND_EJSCREEN_SCORE_FIELD: str = "Maryland Environmental Justice Score"
|
MARYLAND_EJSCREEN_SCORE_FIELD: str = "Maryland Environmental Justice Score"
|
||||||
|
|
||||||
# this references percentile ranks
|
# this references percentile ranks
|
||||||
|
|
Loading…
Add table
Reference in a new issue