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
Conversation
Preview link ready! Built with commit 39b1bc1 https://deploy-preview-558--cmu-delphi-covidcast.netlify.app |
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.
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', |
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.
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?
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.
the raw data is just processed on demand. It will generate among others the CSV file that is also checked in.
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.
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.
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.
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', |
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.
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.
closes #553
Prerequisites:
dev
branchdev
Summary
updates the population with the latest file as mentioned in the issue when processing the raw data: