[R] Steps to create spatial plots

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Tue Jan 16 00:12:48 CET 2018


Also note that there is an R-sig-geo mailing list dedicated to this topic.

You might also like to look at [1] for more on coordinate projections.

[1] https://www.nceas.ucsb.edu/~frazier/RSpatialGuides/OverviewCoordinateReferenceSystems.pdf

On Mon, 15 Jan 2018, Roman Lu?trik wrote:

> You will need to coerce your data into a "spatial" kind, as implemented in
> `sp` or as of late, `sf` packages. You might want to give the vignettes a
> whirl before you proceed.
> Roughly, you will have to coerce the data to Spatial* (you could go for a
> point, raster or grid type, I think) and also specify the projection. Once
> you have that, plotting should be handled by packages.
>
> Here are a few quick links that might come handy:
>
> https://cran.r-project.org/web/views/Spatial.html
> http://www.datacarpentry.org/R-spatial-raster-vector-lesson/10-vector-csv-to-shapefile-in-r/
>
>
> Cheers,
> Roman
>
> On Mon, Jan 15, 2018 at 11:22 PM, lily li <chocold12 at gmail.com> wrote:
>
>> Hi users,
>>
>> I have no clear clue about plotting spatial data. For example, I just have
>> a table with attribute values of each grid cell, such as elevation. Then I
>> have coordinates of the upper left corner in UTM, the number of rows and
>> columns, and grid cell size. How to create spatial plot of elevations for
>> the grid cells, in color ramp? Should I create a spatial grid layer with
>> all the polygons first? Thanks.
>>
>> --
>> --
>> You received this message because you are subscribed to the ggplot2
>> mailing list.
>> Please provide a reproducible example: https://github.com/hadley/
>> devtools/wiki/Reproducibility
>>
>> To post: email ggplot2 at googlegroups.com
>> To unsubscribe: email ggplot2+unsubscribe at googlegroups.com
>> More options: http://groups.google.com/group/ggplot2
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "ggplot2" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ggplot2+unsubscribe at googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> In God we trust, all others bring data.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                       Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k



More information about the R-help mailing list