This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make WIC Participation Data Available to Frontend (#44)
* Start changing the wic participation data into using multiple dataframes * Clean up some code that isn't needed * -Write four CSV files instead of one confusing one. -Pass the participation data back in so it can be merged in with the census data * Cover the new WIC code in tests * Fix flake8 errors * Fix missing returns * Set Up Test for Merging WIC Participation Data into Census Data Changed the WIC participation dataframes to actually have the fips column as the index. This changed the json format of a lot of the fixtures. Add new test to test merging. This test currently fails because the code isn't implemented yet * Get merging tests passing * Change the data type of the wic participation numbers to ints * Get the main path working * Fix flake8 and mypy errors I'm silencing a mypy error on appending lists of different types: error: Unsupported operand types for + ("List[str]" and "List[int]") It looks like the fixes to correct the overzealous type error wouldn't be worth implementing: python/mypy#720 * add main test (#45) * added test_run * set fail fast to false, allows determination of os/version specific errors * replaced .loc[] with reindex(), due to key error * Fix Error in Test test_run() ValueError: invalid literal for int() with base 10: '1,044' * Fix flake8 error Co-authored-by: michaelpkuhn <mickuhn95@gmail.com>
- Loading branch information
1 parent
c019cb3
commit df6a25b
Showing
17 changed files
with
411 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{ | ||
"county_data": { | ||
"17001": { | ||
"NAME": "Adams County, Illinois", | ||
"poverty_data": { | ||
"poverty_percentages": { | ||
"poverty_population_poverty": 0.12143, | ||
"poverty_population_poverty_child": 0.036781 | ||
}, | ||
"poverty_population_poverty": 7874, | ||
"poverty_population_poverty_child": 2385, | ||
"poverty_population_total": 64844 | ||
}, | ||
"race_data": { | ||
"race_asian": 540, | ||
"race_black": 2676, | ||
"race_hispaniclatino_total": 1021, | ||
"race_majority": "race_white", | ||
"race_native": 178, | ||
"race_other": 72, | ||
"race_pacific": 42, | ||
"race_percentages": { | ||
"race_asian": 0.008129, | ||
"race_black": 0.040285, | ||
"race_hispaniclatino_total": 0.01537, | ||
"race_native": 0.00268, | ||
"race_other": 0.001084, | ||
"race_pacific": 0.000632, | ||
"race_twoplus_total": 0.013383, | ||
"race_white": 0.918437 | ||
}, | ||
"race_total": 66427, | ||
"race_twoplus_total": 889, | ||
"race_white": 61009 | ||
}, | ||
"wic_participation_children_data": { | ||
"hispanic_or_latino": 15, | ||
"race_amer_indian_or_alaskan_native": 0, | ||
"race_asian": 1, | ||
"race_black": 7, | ||
"race_multiracial": 0, | ||
"race_native_hawaii_or_pacific_islander": 0, | ||
"race_white": 85, | ||
"total": 92 | ||
}, | ||
"wic_participation_infants_data": { | ||
"hispanic_or_latino": 9, | ||
"race_amer_indian_or_alaskan_native": 0, | ||
"race_asian": 0, | ||
"race_black": 2, | ||
"race_multiracial": 1, | ||
"race_native_hawaii_or_pacific_islander": 1, | ||
"race_white": 36, | ||
"total": 38 | ||
}, | ||
"wic_participation_total_data": { | ||
"hispanic_or_latino": 33, | ||
"race_amer_indian_or_alaskan_native": 0, | ||
"race_asian": 1, | ||
"race_black": 10, | ||
"race_multiracial": 1, | ||
"race_native_hawaii_or_pacific_islander": 1, | ||
"race_white": 157, | ||
"total": 167 | ||
}, | ||
"wic_participation_women_data": { | ||
"hispanic_or_latino": 9, | ||
"race_amer_indian_or_alaskan_native": 0, | ||
"race_asian": 0, | ||
"race_black": 1, | ||
"race_multiracial": 0, | ||
"race_native_hawaii_or_pacific_islander": 0, | ||
"race_white": 36, | ||
"total": 37 | ||
} | ||
} | ||
}, | ||
"meta": { | ||
"data_bins": {}, | ||
"data_metrics": {} | ||
}, | ||
"zip_data": {} | ||
} |
Oops, something went wrong.