Skip to content
Prev 350689 / 398503 Next

Plot by FIPS Code using Shapefiles

Dear Anthony,

Thanks again for your reply. The following worked for merge:

merged_data <- merge(shapes_fips,max_change,by="FIPS",all.x=T, all.y=F)


 However, I think I am doing something wrong - as I have 3109 FIPS code in
my original data but when I merge with the shapes
file SpatialPolygonsDataFrame, its not merging properly, many NA.

Is it a good idea to convert the shapefiles into data.frame/data.table for
merging and then transform it back to shapefiles? This is what I have been
doing:

shapes <- readShapePoly("F:/GCM//tl_2014_us_county/tl_2014_us_county.shp")
Thanks again!

Sincerely,

Shouro
On Tue, May 5, 2015 at 6:00 PM, Anthony Damico <ajdamico at gmail.com> wrote: