mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-07-28 01:41:16 -07:00
New Create indicators for all thresholds exceeded by a community in Definition L (#980)
* added fieldnames * todo pollution, water, health & workforce * workforce * work in progress * add utility function to replace duplicate summation logic * move fpl series into add columns - run black . * added revisions - still a wip * added fieldnames * todo pollution, water, health & workforce * workforce * work in progress * add utility function to replace duplicate summation logic * move fpl series into add columns - run black . * added revisions - still a wip * revise workforce and water * revise housing and add incremental counter for workforce * last PR nit * revise workforce * more PR feedback in score l * more PR feedback in score l * more PR feedback in score l * addd FPL_SERIES and update references in score 1 * fix bugs * reparameterize function * final revisions in fieldnames * make computations all consistent so we assing with FPL_200_SERIES * fieldnames refactor after clarification and PR review * finalize * finalize with no typos * fix length * added median income var * swap thresholds * remove iteration * remove stray ' * address flake 8 * added f string formatting and fixed typos * added f string formatting and fixed typos * move up * remove dupes * reformat * fix bugs * fix bugs * initialize Co-authored-by: Saran Ahluwalia <sarahluw@cisco.com>
This commit is contained in:
parent
d705a8244c
commit
07ee4165b4
3 changed files with 390 additions and 173 deletions
|
@ -26,7 +26,7 @@ class DOEEnergyBurden(ExtractTransformLoad):
|
|||
# Constants for output
|
||||
self.COLUMNS_TO_KEEP = [
|
||||
self.GEOID_TRACT_FIELD_NAME,
|
||||
self.REVISED_ENERGY_BURDEN_FIELD_NAME
|
||||
self.REVISED_ENERGY_BURDEN_FIELD_NAME,
|
||||
]
|
||||
|
||||
self.raw_df: pd.DataFrame
|
||||
|
@ -57,7 +57,7 @@ class DOEEnergyBurden(ExtractTransformLoad):
|
|||
|
||||
output_df = self.raw_df.rename(
|
||||
columns={
|
||||
self.INPUT_ENERGY_BURDEN_FIELD_NAME : self.REVISED_ENERGY_BURDEN_FIELD_NAME,
|
||||
self.INPUT_ENERGY_BURDEN_FIELD_NAME: self.REVISED_ENERGY_BURDEN_FIELD_NAME,
|
||||
self.TRACT_INPUT_COLUMN_NAME: self.GEOID_TRACT_FIELD_NAME,
|
||||
}
|
||||
)
|
||||
|
@ -79,7 +79,7 @@ class DOEEnergyBurden(ExtractTransformLoad):
|
|||
|
||||
def load(self) -> None:
|
||||
logger.info("Saving DOE Energy Burden CSV")
|
||||
|
||||
|
||||
self.OUTPUT_PATH.mkdir(parents=True, exist_ok=True)
|
||||
self.output_df[self.COLUMNS_TO_KEEP].to_csv(
|
||||
path_or_buf=self.OUTPUT_PATH / "usa.csv", index=False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue