-
Notifications
You must be signed in to change notification settings - Fork 17
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
Nhsn indicator #2080
Nhsn indicator #2080
Conversation
Waiting on decisions from tooling team on what smoothing and geo aggregations we should do, and if we should include any other metrics (currently generates total flu and covid hospital admissions. Source data also includes metrics by age group, but we aren't ingesting those). RE geo aggregation, the previous @dshemetov @brookslogan @dsweber2 for input. |
Due to production issues, will aim to release this early next week. |
context from david:
Currently have it such that they're seperate signals similar to nssp secondary source to differienate them as a place holder |
Working through this. I tried a couple of smoothings (3 & 4 weeks, both trailing and centered) to see if that would help tame some of the more extreme data issues, but it didn't really help. I had a use-case where hhs_regions would've been handy, so that's probably worth adding eventually (probably more important to get this live first though). |
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.
Looks good to me! A few things I'm a bit confused about, and some minor notes, but I would be glad to see what this does on staging.
Dataframe as described above. | ||
""" | ||
# Pull data from Socrata API | ||
df = pull_data(socrata_token, dataset_id="ua7e-t2fy") |
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.
It's easier to test transform logic if you separate the Extract and Transform steps. Probably fine in this case though, since we're not really transforming it.
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.
I believe this is holdover from my nssp and nchs dirty code practice. If we aren't doing a full rewrite soon, I would refactor them at some point. For now, they all work (ugly).
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.
I think I was bouncing back and forth, part of it being what if the other data source has different transformations down the line? maybe better to have a method defined? something along those lines. I did refactor the pull_data, since that doesn't seem like it would change
nhsn/tests/test_pull.py
Outdated
@@ -0,0 +1,149 @@ | |||
import glob | |||
import json |
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.
apparently json is unused
import json |
nhsn/tests/test_run.py
Outdated
|
||
|
||
class TestRun: | ||
# the 14th was a Monday |
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.
I'm sure this comment made sense at one point >.<
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.
Just need these and I think we can go to staging:
covidcast-indicators/_template_python/INDICATOR_DEV_GUIDE.md
Lines 473 to 483 in feea58d
* Add module name to the `build` job in `.github/workflows/python-ci.yml`. | |
This allows github actions to run on this indicator code, which includes unit tests and linting. | |
* Add module name to the ["Copy version to indicator directory" step](https://github.com/cmu-delphi/covidcast-indicators/blob/f01185767a9847d8082baf4f1e17be50a39047c2/.github/workflows/create-release.yml#L64) in `.github/workflows/create-release.yml`. | |
* Add top-level directory name to [`indicator_list` in `Jenkinsfile`](https://github.com/cmu-delphi/covidcast-indicators/blob/f01185767a9847d8082baf4f1e17be50a39047c2/Jenkinsfile#L13). | |
This allows your code to be automatically deployed to staging after your branch is merged to main, and deployed to prod after `covidcast-indicators` is released. | |
* Create `ansible/templates/{top_level_directory_name}-params-prod.json.j2` based on your `params.json.template` with some adjustment: | |
* "export_dir": "/common/covidcast/receiving/{data-source-name}" | |
* "log_filename": "/var/log/indicators/{top_level_directory_name}.log" | |
* Define any sensitive variables as "secrets" in the [Ansible `vars.yaml`](https://github.com/cmu-delphi/covidcast-indicators/blob/main/ansible/vars.yaml) and [vault](https://github.com/cmu-delphi/covidcast-indicators/blob/main/ansible/vault.yaml). | |
Refer to [this guide](https://docs.google.com/document/d/1Bbuvtoxowt7x2_8USx_JY-yTo-Av3oAFlhyG-vXGG-c/edit#heading=h.8kkoy8sx3t7f) for more vault info. | |
* Add configs for Sir Complains-a-Lot ("sirCAL") alerting in sirCAL's [local](https://github.com/cmu-delphi/covidcast-indicators/blob/main/sir_complainsalot/params.json.template) and [Ansible](https://github.com/cmu-delphi/covidcast-indicators/blob/main/ansible/templates/sir_complainsalot-params-prod.json.j2) params templates. |
Co-authored-by: minhkhul <[email protected]>
Co-authored-by: minhkhul <[email protected]>
Co-authored-by: minhkhul <[email protected]>
Co-authored-by: minhkhul <[email protected]>
Plots for statistical review have been approved |
Waiting for signal name approval |
new signal name approved |
Description
Adding new indicator NHSN
Associated Issue(s)