mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-02 23:14:18 -07:00
Fast flag update (#1844)
Added additional flags for the front end based on our conversation in stand up this morning.
This commit is contained in:
parent
1ee26bf30d
commit
d892bce6cf
14 changed files with 63 additions and 31 deletions
|
@ -227,6 +227,7 @@ class CensusACSETL(ExtractTransformLoad):
|
|||
self.COLLEGE_ATTENDANCE_FIELD,
|
||||
self.COLLEGE_NON_ATTENDANCE_FIELD,
|
||||
self.IMPUTED_COLLEGE_ATTENDANCE_FIELD,
|
||||
field_names.IMPUTED_INCOME_FLAG_FIELD_NAME,
|
||||
]
|
||||
+ self.RE_OUTPUT_FIELDS
|
||||
+ [self.PERCENT_PREFIX + field for field in self.RE_OUTPUT_FIELDS]
|
||||
|
@ -503,6 +504,13 @@ class CensusACSETL(ExtractTransformLoad):
|
|||
}
|
||||
)
|
||||
|
||||
# We generate a boolean that is TRUE when there is an imputed income but not a baseline income, and FALSE otherwise.
|
||||
# This allows us to see which tracts have an imputed income.
|
||||
df[field_names.IMPUTED_INCOME_FLAG_FIELD_NAME] = (
|
||||
df[field_names.POVERTY_LESS_THAN_200_FPL_IMPUTED_FIELD].notna()
|
||||
& df[field_names.POVERTY_LESS_THAN_200_FPL_FIELD].isna()
|
||||
)
|
||||
|
||||
# Strip columns and save results to self.
|
||||
self.df = df[self.COLUMNS_TO_KEEP]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue