Updating higher education to be reversed (#1387)

Summary In this PR, we create a new variable so that the % college students is expressed as % not college students. This means that the front end can display % not college students.

Includes old variables so that this will not break fe.
This commit is contained in:
Emma Nechamkin 2022-03-15 16:43:32 -04:00 committed by GitHub
commit e7c7c0abeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 30 additions and 5 deletions

View file

@ -112,6 +112,9 @@ MEDIAN_INCOME_AS_PERCENT_OF_STATE_FIELD = (
PERSISTENT_POVERTY_FIELD = "Persistent Poverty Census Tract"
AMI_FIELD = "Area Median Income (State or metropolitan)"
COLLEGE_ATTENDANCE_FIELD = "Percent enrollment in college or graduate school"
COLLEGE_NON_ATTENDANCE_FIELD = (
"Percent of population not currently enrolled in college or graduate school"
)
MEDIAN_INCOME_AS_PERCENT_OF_AMI_FIELD = (
"Median household income as a percent of area median income"
)

View file

@ -797,9 +797,15 @@ class ScoreM(Score):
>= self.LOW_INCOME_THRESHOLD
)
# Because we are moving this variable to be in the same direction as all
# other variables, we change this to be < rather than <=. This translates
# to "80% or more of residents are not college students", rather than
# "Strictly greater than 80% of residents are not college students."
# There are two tracts that are impacted by this (that is, they have exactly)
# 20% college students -- neither of these has been a DAC under any score.
self.df[field_names.COLLEGE_ATTENDANCE_LESS_THAN_20_FIELD] = (
self.df[field_names.COLLEGE_ATTENDANCE_FIELD]
<= self.MAX_COLLEGE_ATTENDANCE_THRESHOLD
< self.MAX_COLLEGE_ATTENDANCE_THRESHOLD
)
self.df[