Quantcast
Channel: The Stata Blog - Latest Comments
Viewing all articles
Browse latest Browse all 1126

Re: How to create choropleth maps using the COVID-19 data from Johns Hopkins University

$
0
0

Is there a way to display the boundaries of American Indian reservation lands on top of the map made in this blog? .shp files for reservations can be found at https://www2.census.gov/geo... I have tried the following

// Create rez geographic datasets
clear
copy https://www2.census.gov/geo...cb_2018_us_aiannh_500k.zip
unzipfile cb_2018_us_aiannh_500k.zip
spshape2dta cb_2018_us_aiannh_500k.shp, saving(rez) replace
use rez.dta, clear
save rez.dta, replace
generate fips_s = AIANNHCE
generate fips = real(fips_s)
rename NAME rez_name
save rez.dta, replace

// Merge the datasets
Clear
use _ID _CX _CY GEOID rez_name fips using rez.dta
merge 1:1 fips using covid19_county , keepusing(province_state combined_key confirmed)

However when I do this I end up with 41 matched items which is obviously an error. For instance one merger results in Alakanuk tribal land as having the same “fips” as Lassen County in California. Alakanuk tribal land is actually located in Alaska.

Any help you can provide is appreciated.


Viewing all articles
Browse latest Browse all 1126

Trending Articles