Skip to content

Signals dash generator: store a longer time series by using covidcast/coverage endpoint #665

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

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

krivard
Copy link
Contributor

@krivard krivard commented Aug 2, 2021

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

Summary

Most of this PR is for switching the signals dashboard data generator over to the covidcast/coverage endpoint instead of pulling the regional data and counting sizes in a massive groupby. Since coverage isn't available natively in the covidcast library (and won't be; that's all going into the new delphi_epidata library/ies) we have to do this by constructing the URL, calling pandas.read_csv, and parsing the time_value column.

With that change, it makes it less of a big deal to double the length of the coverage time series -- the true goal of this PR.

@krivard krivard requested a review from melange396 August 2, 2021 20:46
melange396
melange396 previously approved these changes Aug 4, 2021
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.

LGTM

@@ -17,7 +18,9 @@
from delphi.epidata.acquisition.covidcast.logger import get_structured_logger


LOOKBACK_DAYS_FOR_COVERAGE = 28
LOOKBACK_DAYS_FOR_COVERAGE = 52
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of curiousity, why 52?

Copy link
Contributor Author

@krivard krivard Aug 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhhh because I can't multiply 28 by 2, apparently

@krivard krivard merged commit 44ee8b2 into dev Aug 4, 2021
@krivard krivard deleted the krivard/sigsdash-coverage branch August 4, 2021 18:26
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.

2 participants