Skip to content

Commit

Permalink
running black linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmbrown-usds committed Aug 17, 2022
1 parent cfea97b commit 47d81d0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
25 changes: 15 additions & 10 deletions data/data-pipeline/data_pipeline/etl/sources/census_acs/etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ def __init__(self):
self.IMPUTED_COLLEGE_ATTENDANCE_FIELD,
]
+ self.RE_OUTPUT_FIELDS
+ [field_names.PERCENT_PREFIX + field for field in self.RE_OUTPUT_FIELDS]
+ [
field_names.PERCENT_PREFIX + field
for field in self.RE_OUTPUT_FIELDS
]
+ [
field_names.POVERTY_LESS_THAN_200_FPL_FIELD,
field_names.POVERTY_LESS_THAN_200_FPL_IMPUTED_FIELD,
Expand Down Expand Up @@ -409,21 +412,23 @@ def transform(self) -> None:
df[field_names.PERCENT_PREFIX + field_names.BLACK_FIELD_NAME] = (
df["B02001_003E"] / df["B02001_001E"]
)
df[field_names.PERCENT_PREFIX + field_names.AMERICAN_INDIAN_FIELD_NAME] = (
df["B02001_004E"] / df["B02001_001E"]
)
df[
field_names.PERCENT_PREFIX + field_names.AMERICAN_INDIAN_FIELD_NAME
] = (df["B02001_004E"] / df["B02001_001E"])
df[field_names.PERCENT_PREFIX + field_names.ASIAN_FIELD_NAME] = (
df["B02001_005E"] / df["B02001_001E"]
)
df[field_names.PERCENT_PREFIX + field_names.HAWAIIAN_FIELD_NAME] = (
df["B02001_006E"] / df["B02001_001E"]
)
df[field_names.PERCENT_PREFIX + field_names.TWO_OR_MORE_RACES_FIELD_NAME] = (
df["B02001_008E"] / df["B02001_001E"]
)
df[field_names.PERCENT_PREFIX + field_names.NON_HISPANIC_WHITE_FIELD_NAME] = (
df["B03002_003E"] / df["B03002_001E"]
)
df[
field_names.PERCENT_PREFIX
+ field_names.TWO_OR_MORE_RACES_FIELD_NAME
] = (df["B02001_008E"] / df["B02001_001E"])
df[
field_names.PERCENT_PREFIX
+ field_names.NON_HISPANIC_WHITE_FIELD_NAME
] = (df["B03002_003E"] / df["B03002_001E"])
df[field_names.PERCENT_PREFIX + field_names.HISPANIC_FIELD_NAME] = (
df["B03003_003E"] / df["B03003_001E"]
)
Expand Down
8 changes: 6 additions & 2 deletions data/data-pipeline/data_pipeline/score/field_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@
PERCENT_AMERICAN_INDIAN_FIELD_NAME = PERCENT_PREFIX + AMERICAN_INDIAN_FIELD_NAME
PERCENT_ASIAN_FIELD_NAME = PERCENT_PREFIX + ASIAN_FIELD_NAME
PERCENT_HAWAIIAN_FIELD_NAME = PERCENT_PREFIX + HAWAIIAN_FIELD_NAME
PERCENT_TWO_OR_MORE_RACES_FIELD_NAME = PERCENT_PREFIX + TWO_OR_MORE_RACES_FIELD_NAME
PERCENT_NON_HISPANIC_WHITE_FIELD_NAME = PERCENT_PREFIX + NON_HISPANIC_WHITE_FIELD_NAME
PERCENT_TWO_OR_MORE_RACES_FIELD_NAME = (
PERCENT_PREFIX + TWO_OR_MORE_RACES_FIELD_NAME
)
PERCENT_NON_HISPANIC_WHITE_FIELD_NAME = (
PERCENT_PREFIX + NON_HISPANIC_WHITE_FIELD_NAME
)
PERCENT_HISPANIC_FIELD_NAME = PERCENT_PREFIX + HISPANIC_FIELD_NAME
PERCENT_OTHER_RACE_FIELD_NAME = PERCENT_PREFIX + OTHER_RACE_FIELD_NAME

Expand Down

0 comments on commit 47d81d0

Please sign in to comment.