-
Notifications
You must be signed in to change notification settings - Fork 16
Find Unexpected Values for geo_id #426
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
nmdefries
merged 10 commits into
cmu-delphi:fb-package-validation
from
JedGrabman:jedgrabman/geo_id_validation
Nov 5, 2020
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5d8f220
First draft of geo_id validator
JedGrabman f2562e6
Fix typo (geo_value -> geo_id)
JedGrabman ac28c33
Minor fixes
JedGrabman 0ea0a79
Allow setting static directory in template
JedGrabman 69881a4
rename directory (dev -> scripts)
JedGrabman 06ba36c
Pass through filename for error message
JedGrabman 538d98e
Add file for national values
JedGrabman 45046cb
Allow uppercase version of geo_id, but with warning
JedGrabman ad32bd3
Add tests for geo_id value checks
JedGrabman 42ad65e
Add small error-message changes to tests
nmdefries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
library(covidcast) | ||
|
||
geo_types = c("county", "state", "hrr", "msa") | ||
for(type in geo_types){ | ||
dtf = covidcast_signal("indicator-combination", "confirmed_7dav_incidence_num", start_day = "2020-10-01", end_day = "2020-10-01", geo_type = type) | ||
file_name = paste0("../static/", type, "_geo.csv") | ||
write.table(unique(dtf$geo_value), file = file_name, row.names = F, col.names = "geo_id") | ||
} | ||
|
||
dtf = covidcast_signal("ght", "raw_search", start_day = "2020-10-01", end_day = "2020-10-01", geo_type = "dma") | ||
file_name = "../static/dma_geo.csv" | ||
write.table(unique(dtf$geo_value), file = file_name, row.names = F, col.names = "geo_id") | ||
|
||
national_file = "../static/national_geo.csv" | ||
write.table("us", file = national_file, row.names = F, col.names = "geo_id") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.