Skip to content

Reformat NSSP county zip code #1976

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 3 commits into from
Jun 18, 2024
Merged

Reformat NSSP county zip code #1976

merged 3 commits into from
Jun 18, 2024

Conversation

minhkhul
Copy link
Contributor

@minhkhul minhkhul commented Jun 17, 2024

Description

Testing NSSP on staging shows some NSSP geo_ids at county level don't match what's expected in our db and so cannot be ingested. This is because our db takes 5-digit zip codes (e.g. 08059), while nssp source may note the same county down with 4-digit (8059).

This fix adds a leading 0 all 4-digit zip codes present in nssp source.

Changelog

This fix adds a leading 0 all 4-digit zip codes present in nssp source when pulling from API.

@minhkhul minhkhul changed the title Format NSSP county zip code to all be 5 digits (with leading zeros if needed) Reformat NSSP county zip code Jun 18, 2024
@minhkhul minhkhul requested a review from dsweber2 June 18, 2024 00:14
Copy link
Contributor

@dsweber2 dsweber2 left a comment

Choose a reason for hiding this comment

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

pretty straightforward, lgtm!

"hsa": "Denver (Denver), CO - Jefferson, CO",
"hsa_counties": "Adams, Arapahoe, Clear Creek, Denver, Douglas, Elbert, Gilpin, Grand, Jefferson, Park, Summit",
"hsa_nci_id": "688",
"fips": "8059",
Copy link
Contributor

Choose a reason for hiding this comment

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

just confirming, this is a test example with 4 rather than 5 digits to make sure it bumps to 5?

@minhkhul minhkhul merged commit 445b583 into main Jun 18, 2024
16 checks passed
@dshemetov dshemetov deleted the fix_nssp_geo_id branch June 18, 2024 23:01
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