mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 12:11:17 -07:00
updates
This commit is contained in:
parent
f990c98275
commit
a8e94ef8de
2 changed files with 12 additions and 8 deletions
|
@ -32,7 +32,8 @@ class MarylandEJScreenETL(ExtractTransformLoad):
|
||||||
field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_FIELD,
|
field_names.MARYLAND_EJSCREEN_TRACT_90_PERCENTILE_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
|
field_names.MARYLAND_EJSCREEN_SCORE_FIELD
|
||||||
|
+ field_names.PERCENTILE_FIELD_SUFFIX,
|
||||||
]
|
]
|
||||||
|
|
||||||
self.df: pd.DataFrame
|
self.df: pd.DataFrame
|
||||||
|
@ -94,13 +95,20 @@ 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_SCORE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] = self.df[
|
self.df[
|
||||||
field_names.MARYLAND_EJSCREEN_SCORE_FIELD
|
field_names.MARYLAND_EJSCREEN_SCORE_FIELD
|
||||||
].rank(pct=True, ascending=True)
|
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||||
|
] = self.df[field_names.MARYLAND_EJSCREEN_SCORE_FIELD].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_SCORE_FIELD + field_names.PERCENTILE_FIELD_SUFFIX] > 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
|
||||||
|
|
|
@ -233,10 +233,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
Add a link
Reference in a new issue