[R-sig-Geo] mapping introduction
tom sgouros
tomfool at as220.org
Mon Nov 26 00:02:07 CET 2007
Hello all:
I've gotten two requests asking me to post a summary of the answers I
got to my question. The answers were dense, and will take me a bit to
assimilate, but here's my early attempt at a review. People will, I
hope, correct where I'm screwing it up.
The overall message was not to confuse R with a GIS system. Use a GIS
to manipulate and display geographical data; use R to analyze it.
I found this helpful:
> Most of what I have learned about spatial statistics in R has been from a
> collection of books on R, R newsletter articles, and misc. online tutorials.
> Here is a link to some tutorials which illustrate using GRASS and R:
> http://casoilresource.lawr.ucdavis.edu/drupal/node/438
GRASS came up frequently, as did QGIS as freeware GIS systems to try.
I'm not sure how to judge between them, but I figure frequency of
mention isn't a bad start.
> In which case, I recommend you look at uDig
> (http://undig.refractions.net), QGIS (www.qgis.org), and/or gvSIG
> (http://www.gvsig.gva.es/index.php?id=gvsig&L=2), which are open source,
> desktop GIS packages. If you are in the latter case, you will want one
> of the desktop products mentioned above (and GRASS will also be a
> possible option, http://grass.itc.it), and will you also want to look
> into the sp, maptools, PBSmapping, and spatstat R packages.
I've been looking into sp, of course, but haven't yet found the
introduction that will take me from the ground floor up to its dizzying
heights. What seems true of it is something I've noticed about a lot or
R: there is stellar reference material available, but not much in the
way of usage guides. The working theory seems to be that you pick that
up while you're earning your statistics PhD.
Along those lines, the following is a rich vein of information, but most
of it presumes you already know what you want:
> You might like to review the "Spatial" Task View on your local CRAN
> mirror, and the Rgeo website linked from the Task View. There are many
> possible choices, but using the classes and methods in the sp package
> may suit you.
On the other hand, I think the following will be quite helpful, since it
contains examples of maps similar to those I would like to create:
> and in courses and tutorials such as:
>
> http://www.bias-project.org.uk/ASDARcourse/
It seems that a lot of my confusion is in and around the division of
software labor, so this explanation has set me on what I think is the
right course:
> > Thanks very much for the reply. I think a lot of my confusion is in not
> > knowing where the boundaries fall between the different applications.
> > Can you tell me roughly the division of labor among the software you
> > mentioned?
>
> Sure. I use GRASS / PostGIS anytime I need to work with GIS data: raster,
> vector + attributes, etc. Importing, merging, subsetting, modification, and
> summarizing are best done within a GIS (I think). When I need graphical
> summaries (box and whisker plots and such) I will import the data into R and
> go from there. In other words, most of the heavy lifting of pushing pixels
> and vertices is done in the GIS. All of the analysis is done in R: summaries,
> hypothesis testing, and prediction using models. This nice thing about the
> GRASS-R bindings is that you can predict from GRASS data, and send the
> predicted values right back into a GRASS raster/vector .
>
> Lately I have been using R to produce some maps -- although mainly maps of
> purely vector data like thematic maps. The high quality PDF output from R
> makes for an ideal platform for producing press-ready vector graphics. Check
> out the spplot() function in the sp package for plotting a mixture of
> vector / raster data. When plotting raster data out to a PDF, be careful
> about generating gigantic files -- each pixel can be represented with a
> little rectangle, and for large grids can result in massive PDF files.
>
> I will try and post an examples of this.. in the mean time check out Roger's
> sp website- it should be in the manual page for the sp package. There are
> numerous mapping examples in there.
>
> For more complex maps I tend to favor GMT. Examples:
> http://casoilresource.lawr.ucdavis.edu/drupal/node/130
>
So my plan right now is to install the maptools package so I can follow
some of the course materials at bias-project.org.uk, and to install
GRASS or QGIS in the hope that one of them can help me convert the
ESRI-format political boundary map files available from my local
planning offices into something that R can munch on. (I'm pretty sure
I'll be back seeking all your indulgence sometime then.) For the moment,
I expect that the mapping I'll do will be via maptools, since the
immediate need is pretty rudimentary. I still know nothing about GRASS
and QGIS (but will soon) so don't yet know whether I can produce
print-quality (hi-res, vector graphic axes and fonts) maps from them,
but I hope so. (And I'll be checking out GMT, too.)
So that's what I learned this weekend. Many thanks again for all the
advice.
-tom
tom sgouros <tomfool at as220.org> wrote:
>
> Hello all:
>
> I almost hesitate to write and thank you all for the helpful replies,
> because good ones keep appearing in my inbox, and who would want to put
> a stop to that?
>
> But my gratitude overcomes my cupiditude, so thank you all very much for
> the pointers.
>
> -Tom
>
> --
> ------------------------
> tomfool at as220 dot org
> http://sgouros.com
> http://whatcheer.net
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
------------------------
tomfool at as220 dot org
http://sgouros.com
http://whatcheer.net
More information about the R-sig-Geo
mailing list