Choropleth Maps in R - TIGER Shapefile issue

Viewed 2498

Have a Question on Mapping with R, specifically around the choropleth maps in R.

I have a dataset of ZIP codes assigned to an are and some associated data (dataset is here).

My final data format is: Area ID, ZIP, Probability Value, Customer Count, Area Probability and Area Customer Total. I am attempting to present this data by plotting area probability and Area Customer Total on a Map. I have tried to do this by using the census TIGER Shapefiles but I guess R cannot handle the complete country.

I am comfortable with the Statistical capabilities and now I am moving all my Mapping from third party GIS focused applications to doing all my Mapping in R. Does anyone have any pointers to how to achieve this from within R?

To be a little more detailed, here's the point where R stops working -

shapes <- readShapeSpatial("tl_2013_us_zcta510.shp")

(where the shp file is the census/TIGER) shape file.

Edit - Providing further details. I am trying to first read the TIGER shapefiles, hoping to combine this spatial dataset with my data and eventually plot. I am having an issue at the very beginning when attempting to read the shape file. Below is the code with the output

require(maptools)
shapes<-readShapeSpatial("tl_2013_us_zcta510.shp")

Error: cannot allocate vector of size 317 Kb
2 Answers
Related