Skip to content
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

Switch to new flusurv API endpoint #1278

Open
wants to merge 43 commits into
base: dev
Choose a base branch
from

Conversation

nmdefries
Copy link
Contributor

@nmdefries nmdefries commented Aug 23, 2023

Summary:

Pull flusurv data from new CDC API endpoint. Ingest previously unlabelled age groupings. Ingest new race/ethnicity and sex breakdowns. Test flusurv.py functions. Add more comments, messaging, and assertions.

Closes #1247
Closes #242

Note:

  • Some of our CDC contacts are able to provide us with past versions of data from the API. We will want to patch those in. Many of the "new" strata are actually available back to 2009. We'll probably want to patch those in as well.
  • This also requires updates to the database table, the API server, and the API docs that will be made separately.

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

- 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).
@nmdefries nmdefries marked this pull request as ready for review September 15, 2023 16:25
Copy link
Collaborator

@melange396 melange396 left a 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.

src/acquisition/flusurv/flusurv.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv_update.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv_update.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv_update.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv_update.py Outdated Show resolved Hide resolved
src/acquisition/flusurv/flusurv_update.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

sonarcloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

nmdefries and others added 2 commits May 7, 2024 20:15
)

* add new columns to flusurv endpoint spec

* add new age, sex, race strata, and season to schema

* list new signals in documentation

* move new season column to end of table

* add migration script to add new fields to flusurv table

* add field descriptions; reformat table so don't need to match line lengths

* point from acquisition script to docs and schema def to deduplicate
Copy link

sonarcloud bot commented May 8, 2024

Quality Gate Passed Quality Gate passed

Issues
7 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@melange396
Copy link
Collaborator

I wasnt paying attention and accidentally merged #1287 into this PR. I then reverted #1287 in #1426. This is a reminder that #1287 will eventually need to be re-merged into here (which is now probably best done by reverting the revert in #1426). Sorry for the confusion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flusurv data is stale flusurv acquisition is broken
3 participants