[R] us zipcode data map

Roger Bivand Roger.Bivand at nhh.no
Sat Jun 11 10:58:59 CEST 2005


On Fri, 10 Jun 2005, Mike R wrote:

> i've search the email archives, searched the documention 
> of various map packages and done an R-site search, but 
> have been unable to find direct resources for creating maps 
> of the US that are colored or annotated or ... by zipcode 
> data.  
> 
> For example, create a map of the US and color each zipcode 
> region by its population using two vectors z,p containing the 
> zipcode and population, respectively.  I'm not looking for data 
> to fill z, and p.  I'm looking for some highend functions to 
> display on a map the data that I already have.

I'm replying to this original message, because your followups have been 
dropping the original query (please don't assume that everybody uses the 
e-mail system you have chosen yourself).

With the points you have found, you can delineate surrounding polygons and 
clip to the coastline using functions in the tripack, gpclib, and maps 
packages (being very careful to find out how to match the output polygon 
IDs to your data).

But unless you are aiming for A0 postscript output, for the continental US
viewed as a whole, almost all raster image processors will merge the
interesting metropolitan zip polygons, leaving the viewer looking at a
mess with only the areas with lowest population density legible. Even zip
code "maps" of small states are very difficult to use for look-up (reading
values from the polygon fill), one of the main functions of thematic
cartography.

So like most tasks, it can be done (this _is_ R, after all), but do you 
really need to do it?

Roger

> 
> Cheers,
> Mike
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-help mailing list