-
Couldn't load subscription status.
- Fork 67
Switch to new flusurv API endpoint
#1278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
- rename input arg to `update` to avoid reassignment later - comment and reuse args_insert - spelling - comment magic constant used in output format - rename location-network/catchmentid map
Previously, age strata were numbered sequentially which allowed us to store rate values by position in a list. With the introduction of the new strata, this system is not robust enough to track all the different groups (e.g. ageids are no longer sequential and there are now race and sex groupings with separate numbering systems).
734dca9 to
f8a6706
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! i really appreciate the thorough commenting!
youll wanna pull in the changes from the dev branch, PR #1241 added tests for the flusurv endpoint.
|
These will need to be updated with new fields: |
|
|
Things to check before putting into prod:
|
I did a quick skim of the DB migration script and some of the acquisition code dealing with column names and ids. The former passed a sanity check and didn't seem like a risky operation anyway. The latter seems to have been written with a good deal of care (e.g., the changes to the overall age group column id and the new age group column ids). I don't have an environment to mock stuff but if you need a set of eyes to sanity-check the acquisition result after deployment, feel free to ping me and I can double-check API vs. upstream values. |
|
Okay, verified that this works locally in a fresh environment, so it is ready for another review @melange396 . @brookslogan , thanks for your offer for additional checks! I am working on cleaning up our test environment instructions to make this repo easier to run locally. |
|
Source data is here. |
|
We warn about new demographic breakdowns here. Expected breakdowns are defined here. |
On my (old) computer this takes 54 s, so this shouldn't be a problem. This source doesn't have version history, so when patching all the new data will be added under "today"'s issue date. I believe we have a connection at the source who can share their internal versioned data with us.
Based on the code, we apparently keep the newer value. However, the unique key is |
#1426 can't be reverted for some reason. I merged the ndefries/flusurv-new-columns branch in directly in f544328 |
|



Summary:
Pull
flusurvdata from new CDC API endpoint. Ingest previously unlabelled age groupings. Ingest new race/ethnicity and sex breakdowns. Testflusurv.pyfunctions. Add more comments, messaging, and assertions.Closes #1247
Closes #242
Note:
Prerequisites:
devbranchdev