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

feat: update population data based on indicator data #558

Merged
merged 2 commits into from Oct 21, 2020
Merged

Conversation

sgratzl
Copy link
Member

@sgratzl sgratzl commented Oct 9, 2020

closes #553

Prerequisites:

  • Unless it is a 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

updates the population with the latest file as mentioned in the issue when processing the raw data:

image

@sgratzl sgratzl added this to Up Next in COVIDCast Ongoing Development via automation Oct 9, 2020
@sgratzl sgratzl moved this from Up Next to In Review/Testing in COVIDCast Ongoing Development Oct 9, 2020
@netlify
Copy link

netlify bot commented Oct 9, 2020

Preview link ready!

Built with commit 39b1bc1

https://deploy-preview-558--cmu-delphi-covidcast.netlify.app

@sgratzl sgratzl linked an issue Oct 13, 2020 that may be closed by this pull request
Copy link
Contributor

@tildechris tildechris left a comment

Choose a reason for hiding this comment

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

Approach LGTM, but should we incorporate fips_pop.csv as a site resource?

async function generatePopulationLookup() {
const csv = csvParse(
await fetch(
'https://raw.githubusercontent.com/cmu-delphi/covidcast-indicators/main/_delphi_utils_python/delphi_utils/data/fips_pop.csv',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any cross-site considerations to be made when pulling this data from github directly? Would it be better to pull the data down and package it as part of the site at build time?

Copy link
Member Author

Choose a reason for hiding this comment

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

the raw data is just processed on demand. It will generate among others the CSV file that is also checked in.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah so, this is only at build time? That makes sense. It'd be nice if there was a npm package that we could pull down as a first-class dependency, but until then this make sense.

@sgratzl sgratzl assigned sgratzl and unassigned tildechris Oct 20, 2020
Copy link
Contributor

@tildechris tildechris left a comment

Choose a reason for hiding this comment

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

LGTM.

async function generatePopulationLookup() {
const csv = csvParse(
await fetch(
'https://raw.githubusercontent.com/cmu-delphi/covidcast-indicators/main/_delphi_utils_python/delphi_utils/data/fips_pop.csv',
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah so, this is only at build time? That makes sense. It'd be nice if there was a npm package that we could pull down as a first-class dependency, but until then this make sense.

@sgratzl sgratzl merged commit 826e532 into dev Oct 21, 2020
COVIDCast Ongoing Development automation moved this from In Review/Testing to Done Oct 21, 2020
@sgratzl sgratzl deleted the sgratzl/population branch October 21, 2020 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Propagate updated population figures from indicators into www-covidcast
2 participants