-
Notifications
You must be signed in to change notification settings - Fork 24
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
Gun Violence Front-end Integration (Gen Pop Adults) #2915
Conversation
✅ Deploy Preview for health-equity-tracker ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
'gun_violence_suicide_pct_relative_inequity', | ||
'gun_violence_injuries_pct_relative_inequity', | ||
] | ||
const GUN_VIOLENCE_DETERMINANTS = [...GUN_VIOLENCE_METRICS] |
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.
these shouldn't be the same. determinants should be like "injuries, homicides, suicides" and metrics should be x_per_100k x_pct_share etc
metricQuery.dataTypeId, | ||
timeView | ||
) | ||
if (!datasetId) throw Error('DatasetId undefined') |
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.
this is getting thrown
super('gun_violence_provider', GUN_VIOLENCE_DETERMINANTS) | ||
} | ||
|
||
getDatasetId( |
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.
something in the arguments sent in to this method are not triggering any of the if
conditions so it's returning undefined
@kccrtv make sure in the PR description you literally write |
# Description and Motivation <!--- bulleted, high level items. use keywords (eg "closes SatcherInstitute#144" or "fixes #4323") --> Related to SatcherInstitute#2911 By extending the existing `write_to_bq` method, we can keep our existing tests in place, and allow the BQ flow to continue uninterupted, but now optionally redirect the written table to local frontend instead of BQ. NOTE: Eventually we'll likely want to rename this method across the entire codebase including the `data_server` to something like `run_pipeline()` ## Pipeline - removes deprecated table name methods from the parent DataSource class - adds a `local_pipeline_utils.py` file to hold new utility functions that will help us run our pipelines locally, including reading real data directly from the `/data` dir, and writing json files to frontend/public/tmp folder (to allow local loading) - adds a new python file that instantiates the class (and can easily extend to iterate over all data sources, and the calls the write to bq with the "write to local frontend" flag enabled. NOTE: this is still making real calls out to BQ for population data and FIPS data, etc. We should consider re-structuring this, so that here and also for our tests, instead of having to mock, our data sources could just read from the data directory like `data/acs_population/` or `data/state_ids` or similar ## `CDCVaccinationNational` - adjusts `CDCVaccinationNational.write_to_bq()` to accept an optional boolean keyword arg - adjusts `CDCVaccinationNational.write_to_bq()` so if that flag is passed, it uses the util from above to write to frontend instead of writing to bigquery ## Has this been tested? How? - working locally, it writes out json files as expected to the `/frontend/public/tmp` folder - by adding the file names into the .env file and restarting the localhost server it automatically serves those tables instead of reading from the backend ## Types of changes (leave all that apply) - Refactor / chore ## New frontend preview link is below in the Netlify comment 😎
Bullet points and indentation in news articles enhance readability and organization. They highlight key information, making it easier for readers to identify main points and follow the structure of the content. tests passing ![Screenshot 2024-02-27 at 9 09 46 AM](https://github.com/SatcherInstitute/health-equity-tracker/assets/67879386/0d5803b7-6d33-40d9-b8f8-883ebd5a8f5e) - refactor? --------- Co-authored-by: Eric M Warren II <eric.m.warren1@gmail.com>
Description and Motivation
GunViolenceProvider.ts
#2881GunViolenceProvider.test.ts
#2894MetricConfigGunViolence.ts
#2895Has this been tested? How?
tests passing
Types of changes
New frontend preview link is below in the Netlify comment 😎