2

The company I work for has its own special regions of the US for comparing sales. I'd like to be able to use such R packages as maps, mapdata and maptools but using these custom regions, each of which is defined by sets of zip codes. Is there a package with a function that would allow me to define those custom regions by assigning a set of zip codes to a name for each of the custom regions?

This looked promising at first but it doesn't create custom regions: (how do I map (on a geographical map) data in R just given the US Zipcodes)

Thanks!

rwinkel2000
  • 136
  • 9
  • Welcome to SO. I'm not aware of such a function. However, you could write one. I'm sure you'll find a shape file with the zip data, and there are plenty of examples on how to merge polygons (i.e. zip areas). – lukeA Dec 19 '15 at 21:31
  • "...plenty of examples on how to merge polygons"?! That would be exactly what is needed. Is this the place to start? https://cran.r-project.org/web/packages/maptools/vignettes/combine_maptools.pdf – rwinkel2000 Dec 20 '15 at 01:34
  • https://www.google.com/search?q=r+merge+polygons – lukeA Dec 20 '15 at 11:38
  • This example might help as well: http://stackoverflow.com/questions/31847671/remove-us-state-borders-create-outlined-regions-in-ggplot2-geom-polygon/31855133#31855133 – hrbrmstr Dec 20 '15 at 14:07

0 Answers0