[R] Coloring Canada provinces (package maps?)

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Jan 25 22:37:01 CET 2012


On Wed, Jan 25, 2012 at 9:25 PM, Dimitri Liakhovitski
<dimitri.liakhovitski at gmail.com> wrote:
> Dear R'ers,
>
> I am wondering what is the smallest geographicterritorial unit
> available for formatting in Canada. Provinces?
>
>
> I know that in the US it is the county so that I can color US
> counties any way I want, for example:
>
> ### Example for coloring US counties
> ### Creating an ARTIFICIAL criterion for coloring US counties:
> library(maps)

If you want to extend your skills beyond the map package then you can
plot anything that you can get a shapefile, or other common geospatial
data set of, using the sp packages and friends such as maptools and
rgdal.

 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.

 You might want to ask questions about spatial data programming on
R-sig-geo or even on www.stackoverflow.com with the R tag.

Barry



More information about the R-help mailing list