-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add PR to fips<>name and territories to fips<>abbr/ fips<>name to R package #496
Conversation
Hmm. So I kind of forgot we had the raw data generated like this, but I guess we should bring the generator up to date. @statsmaths, if you could help that'd be great. |
Oh I wasn't aware of that. I had to pull 2 xlsx files, one for pop/name and one for name/fips, and join them to get the df, which I did by hand. I can write up a script to do it and add to that file if that's preferred. US territories is even more convoluted, I think each territory had its own xlsx file without fips and I pulled the name <> fips from wikipedia (since the names aren't always consistent and. this .gov site doesnt use the same county names as the census) |
Yeah, I think having it all in that file would be great, and we could then add some code comments so we remember that the data is generated by the file. It'd be great if the Census data we pulled could just be extended with a few territory entries, instead of needing to merge a bunch of different things. |
Alternatively I could do what I did for the python geomapper and hard code the numbers into the data generation script: https://github.com/cmu-delphi/covidcast-indicators/pull/668/files |
Also what's the subsetting you're referring to here? |
I think that makes sense
Taylor subset the columns in |
Ok updated this PR to include territories and add the code to Make.R. I put the hand-constructed territories data into rda files within the data-raw folder. Ready for another review @capnrefsmmat @sgsmob |
This looks great. Once you merge, I will also add the code I have to create the smaller geojson files into the data-raw directory. |
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.
looks good
Addresses #446 and #461 for R package
Since the PR and territories data comes from multiple xlsx files in different formats, as well as some web pages for name/fips mappings, I constructed individual rda files by hand for PR and territories that are stored in data-raw/ and joined with the data pulled from the census when Make.R is run. Similar pattern to how the geomapper in delphi_utils generates the mapping files.
Have not rebuilt documentation yet, if that should go in this PR let me know and I'll add.