mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 12:31:18 -07:00
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:
parent
2279a04c94
commit
e7c7c0abeb
12 changed files with 30 additions and 5 deletions
|
@ -136,6 +136,8 @@ class CensusACSETL(ExtractTransformLoad):
|
|||
"Percent enrollment in college or graduate school"
|
||||
)
|
||||
|
||||
self.COLLEGE_NON_ATTENDANCE_FIELD = "Percent of population not currently enrolled in college or graduate school"
|
||||
|
||||
self.RE_FIELDS = [
|
||||
"B02001_001E",
|
||||
"B02001_002E",
|
||||
|
@ -190,6 +192,7 @@ class CensusACSETL(ExtractTransformLoad):
|
|||
self.MEDIAN_HOUSE_VALUE_FIELD_NAME,
|
||||
self.HIGH_SCHOOL_ED_FIELD,
|
||||
self.COLLEGE_ATTENDANCE_FIELD,
|
||||
self.COLLEGE_NON_ATTENDANCE_FIELD,
|
||||
]
|
||||
+ self.RE_OUTPUT_FIELDS
|
||||
+ [self.PERCENT_PREFIX + field for field in self.RE_OUTPUT_FIELDS]
|
||||
|
@ -354,6 +357,10 @@ class CensusACSETL(ExtractTransformLoad):
|
|||
+ df[self.COLLEGE_ATTENDANCE_FEMALE_ENROLLED_PRIVATE]
|
||||
) / df[self.COLLEGE_ATTENDANCE_TOTAL_POPULATION_ASKED]
|
||||
|
||||
df[self.COLLEGE_NON_ATTENDANCE_FIELD] = (
|
||||
1 - df[self.COLLEGE_ATTENDANCE_FIELD]
|
||||
)
|
||||
|
||||
# strip columns
|
||||
df = df[self.COLUMNS_TO_KEEP]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue