[R] Mapping help

MacQueen, Don macqueen1 at llnl.gov
Tue Aug 27 22:00:56 CEST 2013


I'd suggest that r-sig-geo is a better choice for quick help in this case.

Depending on how your data is currently stored, and given your short time
frame, you might do better using software such as Quantum GIS, if you can
get it installed quickly enough.

In R, if you can get your data into an object of class
SpatialPolygonsDataFrame then I think most of the plotting can be done
with a few simple plot commands. Increasing the size of the small island
nations may be tricky; I'm not sure.

You'll need at a minimum the rgdal and sp packages.

You should also visit CRAN, click on "Task Views" on the left, then go to
the "Spatial" task view.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 8/26/13 6:03 PM, "Rhona Govender" <rhonag at gmail.com> wrote:

>Dear all,
>
>I have to make a last minute map...my thesis is due in a few days and our
>GIS lady fell ill, so my supervisor asked me to try in R., but I am a
>beginner. I've searched online, but have not found something at the global
>scale.
>
>I have a global dataset of dependent values (eg. rate of common cold) for
>100/240 countries/offshore territories. I have a predictor variable (eg.
>Human development index or HDI).
>What I would like to do is colour a global map by HDI grouping (low
>[0-0.5], medium[0.51-0.7], high[0.71-1.0]). So for countries that I have
>data for, if it is low HDI it would be colour1, medium colour 2, low
>colour3. For countries with no data they will be a fourth colour (grey).
>
>Additionally, some small island nations will be too small to be
>visualized.
>Is there a way to manually increase the size of the colouration to be
>visible on a map at the global scale?
>
>My data is as such (where blanks are no data):
>
>Country       HDI   Colds
>Albania        0.42     .72
>Austria        0.89
>China          0 .76      .12
>
>Could anyone direct me to some sample code and/or which package would be
>best.
>
>Any help would be greatly appreciated.
>
>Cheers,
>
>Sarah
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list