mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 22:01:16 -07:00
Adding HOLC indicator (#1579)
Added HOLC indicator (Historic Redlining Score) from NCRC work; included 3.25 cutoff and low income as part of the housing burden category.
This commit is contained in:
parent
f047ca9d83
commit
1782d022a9
10 changed files with 202 additions and 40 deletions
|
@ -57,7 +57,7 @@ M_WORKFORCE = "Workforce Factor (Definition M)"
|
|||
M_NON_WORKFORCE = "Any Non-Workforce Factor (Definition M)"
|
||||
|
||||
# Definition Narwhal fields
|
||||
SCORE_N = "Definition N"
|
||||
SCORE_N = "Definition N (communities)"
|
||||
SCORE_N_COMMUNITIES = "Definition N (communities)"
|
||||
N_CLIMATE = "Climate Factor (Definition N)"
|
||||
N_ENERGY = "Energy Factor (Definition N)"
|
||||
|
@ -303,7 +303,17 @@ EJSCREEN_AREAS_OF_CONCERN_STATE_95TH_PERCENTILE_COMMUNITIES_FIELD = (
|
|||
"EJSCREEN Areas of Concern, State, 95th percentile (communities)"
|
||||
)
|
||||
# Mapping inequality data.
|
||||
REDLINED_SHARE: str = (
|
||||
"Redlined share: tract had redlining and was more than 50% Grade C or D"
|
||||
)
|
||||
HOLC_GRADE_D_TRACT_PERCENT_FIELD: str = "Percent of tract that is HOLC Grade D"
|
||||
HOLC_GRADE_C_TRACT_PERCENT_FIELD: str = "Percent of tract that is HOLC Grade C"
|
||||
HOLC_GRADE_C_OR_D_TRACT_PERCENT_FIELD: str = (
|
||||
"Percent of tract that is HOLC Grade C or HOLC Grade D"
|
||||
)
|
||||
HOLC_GRADE_C_OR_D_TRACT_50_PERCENT_FIELD: str = (
|
||||
"Tract is more than 50% Grade C or D"
|
||||
)
|
||||
HOLC_GRADE_D_TRACT_20_PERCENT_FIELD: str = "Tract is >20% HOLC Grade D"
|
||||
HOLC_GRADE_D_TRACT_50_PERCENT_FIELD: str = "Tract is >50% HOLC Grade D"
|
||||
HOLC_GRADE_D_TRACT_75_PERCENT_FIELD: str = "Tract is >75% HOLC Grade D"
|
||||
|
@ -316,7 +326,7 @@ MICHIGAN_EJSCREEN_PRIORITY_COMMUNITY_FIELD: str = (
|
|||
)
|
||||
|
||||
# CDC SVI INDEX percentile fields
|
||||
CDC_SVI_INDEX_SE_THEME_FIELD: str = "SVI - Socioeconomic Index"
|
||||
CDC_SVI_INDEX_SE_THEME_FIELD: str = "SVI - Social Vulnerability Index"
|
||||
CDC_SVI_INDEX_HOUSEHOLD_THEME_COMPOSITION_FIELD: str = (
|
||||
"SVI - Household Composition Index"
|
||||
)
|
||||
|
@ -691,5 +701,14 @@ MAPPING_FOR_EJ_PRIORITY_COMMUNITY_FIELD = (
|
|||
"Mapping for Environmental Justice Priority Community"
|
||||
)
|
||||
|
||||
# Historic Redlining Score
|
||||
HISTORIC_REDLINING_SCORE_EXCEEDED = (
|
||||
"Tract-level redlining score meets or exceeds 3.25"
|
||||
)
|
||||
|
||||
HISTORIC_REDLINING_SCORE_EXCEEDED_LOW_INCOME_FIELD = (
|
||||
"Tract-level redlining score meets or exceeds 3.25 and is low income"
|
||||
)
|
||||
|
||||
# End of names for individual factors being exceeded
|
||||
####
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
from typing import Tuple
|
||||
from attr import field
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
|
@ -308,11 +309,22 @@ class ScoreNarwhal(Score):
|
|||
# poverty level and has a low percent of higher ed students.
|
||||
# Source: Census's American Community Survey
|
||||
|
||||
## Additionally, we look to see if HISTORIC_REDLINING_SCORE_EXCEEDED is True and the tract is also low income
|
||||
|
||||
housing_eligibility_columns = [
|
||||
field_names.LEAD_PAINT_MEDIAN_HOUSE_VALUE_LOW_INCOME_FIELD,
|
||||
field_names.HOUSING_BURDEN_LOW_INCOME_FIELD,
|
||||
field_names.HISTORIC_REDLINING_SCORE_EXCEEDED_LOW_INCOME_FIELD,
|
||||
]
|
||||
|
||||
# design question -- should read in scalar with threshold here instead?
|
||||
self.df[
|
||||
field_names.HISTORIC_REDLINING_SCORE_EXCEEDED_LOW_INCOME_FIELD
|
||||
] = (
|
||||
self.df[field_names.HISTORIC_REDLINING_SCORE_EXCEEDED]
|
||||
& self.df[field_names.FPL_200_SERIES_IMPUTED_AND_ADJUSTED]
|
||||
)
|
||||
|
||||
self.df[field_names.LEAD_PAINT_PROXY_PCTILE_THRESHOLD] = (
|
||||
self.df[
|
||||
field_names.LEAD_PAINT_FIELD
|
||||
|
@ -804,5 +816,8 @@ class ScoreNarwhal(Score):
|
|||
]
|
||||
self.df[field_names.CATEGORY_COUNT] = self.df[factors].sum(axis=1)
|
||||
self.df[field_names.SCORE_N_COMMUNITIES] = self.df[factors].any(axis=1)
|
||||
self.df[
|
||||
field_names.SCORE_N_COMMUNITIES + field_names.PERCENTILE_FIELD_SUFFIX
|
||||
] = self.df[field_names.SCORE_N_COMMUNITIES].astype(int)
|
||||
|
||||
return self.df
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue