mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-04 01:34:18 -07:00
Add median house value to Definition L (#882)
* Added house value to ETL * Adding house value to score formula and comp tool
This commit is contained in:
parent
54bdda0f02
commit
05ebf9b48c
7 changed files with 90 additions and 48 deletions
|
@ -114,6 +114,8 @@ OVER_64_FIELD = "Individuals over 64 years old"
|
|||
# Urban Rural Map
|
||||
URBAN_HERUISTIC_FIELD = "Urban Heuristic Flag"
|
||||
|
||||
# Housing value
|
||||
MEDIAN_HOUSE_VALUE_FIELD = "Median value ($) of owner-occupied housing units"
|
||||
|
||||
# EJSCREEN Areas of Concern
|
||||
EJSCREEN_AREAS_OF_CONCERN_NATIONAL_70TH_PERCENTILE_COMMUNITIES_FIELD_NAME = (
|
||||
|
|
|
@ -11,6 +11,7 @@ class ScoreL(Score):
|
|||
def __init__(self, df: pd.DataFrame) -> None:
|
||||
self.LOW_INCOME_THRESHOLD: float = 0.65
|
||||
self.ENVIRONMENTAL_BURDEN_THRESHOLD: float = 0.90
|
||||
self.MEDIAN_HOUSE_VALUE_THRESHOLD: float = 0.90
|
||||
super().__init__(df)
|
||||
|
||||
def add_columns(self) -> pd.DataFrame:
|
||||
|
@ -135,8 +136,12 @@ class ScoreL(Score):
|
|||
) & transportation_criteria
|
||||
|
||||
def _housing_factor(self) -> bool:
|
||||
# (
|
||||
# In Xth percentile or above for lead paint (Source: Census's American Community Survey’s
|
||||
# percent of housing units built pre-1960, used as an indicator of potential lead paint exposure in homes)
|
||||
# AND
|
||||
# In Yth percentile or below for Median House Value (Source: Census's American Community Survey)
|
||||
# )
|
||||
# or
|
||||
# In Xth percentile or above for housing cost burden (Source: HUD's Comprehensive Housing Affordability Strategy dataset
|
||||
# AND
|
||||
|
@ -144,11 +149,20 @@ class ScoreL(Score):
|
|||
# of households where household income is less than or equal to twice the federal
|
||||
# poverty level. Source: Census's American Community Survey]
|
||||
housing_criteria = (
|
||||
self.df[
|
||||
field_names.LEAD_PAINT_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
> self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
(
|
||||
self.df[
|
||||
field_names.LEAD_PAINT_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
> self.ENVIRONMENTAL_BURDEN_THRESHOLD
|
||||
)
|
||||
& (
|
||||
self.df[
|
||||
field_names.MEDIAN_HOUSE_VALUE_FIELD
|
||||
+ field_names.PERCENTILE_FIELD_SUFFIX
|
||||
]
|
||||
< self.MEDIAN_HOUSE_VALUE_THRESHOLD
|
||||
)
|
||||
) | (
|
||||
self.df[
|
||||
field_names.HOUSING_BURDEN_FIELD
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue