[R-sig-Geo] Plotting data on Canadian maps

Michael Friendly friendly at yorku.ca
Wed Feb 15 15:49:11 CET 2012


Barry Rowlingson replied to a query on R-Help:


>  gadm has four levels of Canadian boundaries, at first glance -
> country, province (black), something smaller than province (blue) and
> then red which looks like urban divisions.
>
>  The province upper-left doesn't seem to have any blue subdivisions,
> but that's possibly because there would be more subdivisions than
> people who actually live there.
>
> http://www.gadm.org/download
>
>  Gadm also has a facility to download the data as .Rdata objects that
> can load straight into R.

I've downloaded the .Rdata versions of the maps of Canada, 
CAN_adm[1-4].RData but can't find information on the contents of these 
SPDataFrames, other than direct exploration:

 > load("CAN_adm1.RData")
 > class(gadm)
[1] "SpatialPolygonsDataFrame"
attr(,"package")
[1] "sp"
 > names(gadm)
  [1] "PID"       "ID_0"      "ISO"       "NAME_0"    "ID_1" 
"NAME_1"    "NL_NAME_1" "VARNAME_1"
  [9] "TYPE_1"    "ENGTYPE_1"
 > gadm$NAME_1
  [1] "Alberta"                   "British Columbia"          "Manitoba" 

  [4] "New Brunswick"             "Newfoundland and Labrador" "Northwest 
Territories"
  [7] "Nova Scotia"               "Nunavut"                   "Ontario" 

[10] "Prince Edward Island"      "Québec" 
"Saskatchewan"
[13] "Yukon"

I'd like to try plotting some data on the map of Ontario.  Does anyone 
have an example or sources for such data?

-Michael


-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    Web:   http://www.datavis.ca
Toronto, ONT  M3J 1P3 CANADA



More information about the R-sig-Geo mailing list