findings from a search for r spatial analysis support · findings from a search for r spatial...

Post on 01-Jun-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Findings from a Search for R Spatial Analysis Support

Donald L. Schrupp – Wildlife EcologistColorado Division of Wildlife (Retired)

Findings from a Search for R Spatial Analysis Support

=== Approach Steps ===

Install 'R' and RStudio

Search(s) for R Spatial Analysis Support

Findings:

• Packages

• Documentation

• Tutorials

Install 'R' and RStudio

'R' Source: http://cran-r-project.org

RStudio Source: http://rstudio.com

Search for R Spatial Analysis Support

R-Search: https://cran.r-project.org/search.html

Search for R Spatial Analysis Support

R Site Search: http://finzi.psych.upenn.edu/search.html

Search for R Spatial Analysis Support

R Site Search Results

FUNCTIONSVIGNETTESTASK VIEWS

Search for R Spatial Analysis Support

R Site Search Results - FUNCTIONS

Search for R Spatial Analysis Support

R Site Search Results - VIGNETTES

Search for R Spatial Analysis Support

R Site Search Results – TASK VIEW(S)

Search for R Spatial Analysis Support

CRAN TASK VIEW – Analysis of Spatial Data

https://cran.r-project.org/web/views/Spatial.html

Search for R Spatial Analysis Support

CRAN TASK VIEW – Analysis of Spatial Data

TOPIC AREAS

Classes for Spatial Data

Handling Spatial DataReading and Writing Spatial DataReading and Writing Spatial Data – Other PackagesVisualizationPoint Pattern AnalysisGeostatisticsDisease Mapping and Areal Data AnalysisSpatial RegressionEcological Analysis

Findings from a Search for R Spatial Analysis Support

FINDINGS – PACKAGES

(168 Related Packages)

Ones I Installed in Working Through Tutorials (to date)

GISTools Some further GIS capabilities for R

gstat Spatial and Spatio-Temporal Geostatistical Modeling, Prediction and Simulation

maptools Tools for Reading and Handling Spatial Objectsraster Geographic Data Analysis and Modelingrgdal Bindings for Geospatial Data Abstraction Libraryrgeos Interface to Geometry Engine – Open Sources (GEOS)sp Classes and Methods for Spatial Dataspgrass6 Interface between GRASS 6+ GIS and R

Findings from a Search for R Spatial Analysis Support

FINDINGS – DOCUMENTATION

sp: https://CRAN.R-project.org/package=spraster: https://CRAN.R-project.org/package=raster spgrass6: https://CRAN.R-project.org/package=spgrass6rgdal: https://CRAN.R-project.org/package=rgdal rgeos: https://CRAN.R-project.org/package=rgeosgstat: https://CRAN.R-project.org/package=gstatmaptools: https://CRAN.R-project.org/package=maptoolslattice: https://CRAN.R-project.org/package=latticerasterVis: https://CRAN.R-project.org/package=rasterVisGISTools: https://CRAN.R-project.org/package=GISTools

Findings from a Search for R Spatial Analysis Support

FINDINGS – DOCUMENTATION – sp Example

Findings from a Search for R Spatial Analysis Support

FINDINGS – DOCUMENTATION – sp Example

Findings from a Search for R Spatial Analysis Support

FINDINGS – DOCUMENTATION – sp PDF -1

FINDINGS – DOCUMENTATION – sp PDF - 2

FINDINGS – DOCUMENTATION – sp PDF - 3

FINDINGS – DOCUMENTATION – sp PDF - 4

Findings from a Search for R Spatial Analysis Support

FINDINGS – TUTORIALS

Spatial Analysis in R

NEON:

http://neondataskills.org/tutorial-series/

NPS: http://science.nature.nps.gov/datamgmt/statistics/advancedspatial.cfm

CRAN ( spgrass6 PDF )

https://cran.r-project.org/web/packages/spgrass6/spgrass6.pdf

Findings from a Search for R Spatial Analysis Support

FINDINGS – TUTORIALSNEON: http://neondataskills.org/tutorial-series/

FINDINGS – TUTORIALSNEON: http://neondataskills.org/tutorial-series/

TUTORIALS Cover: Metadata 1 tutorialRaster Data 8 tutorialsVector Data 6 tutorialsData Visualization 4 tutorialsGIS & Spatial Data in R and Python 18 tutorialsRemote Sensing 12 tutorialsHyperspectral Remote Sensing 7 tutorialsHierarchical Data Format – Version 5 9 tutorialsR Programming 45 tutorials

Data Sets and Coding is supplied; Necessary R Packages are specified

FINDINGS – TUTORIALSNEON: http://neondataskills.org/tutorial-series/

TUTORIALS by 'R' Package Available for:

dplyr (7) ggplot2 (12) h5py (1)lubridate (6) maps (1) maptools (2)plyr (2) raster (25) rasterVis (3)rgdal (GIS) (21) rgeos (3) rhdf5 (11)sp (5) scales (4) gridExtra (4)grid (2) reshape2 (3)

Note: 'R_package_name' ( # ) [ of tutorials available ]

FINDINGS – TUTORIALSNEON: http://neondataskills.org/tutorial-series/

TUTORIAL – Example Code in RStudio:

FINDINGS – TUTORIALSNPS:

http://science.nature.nps.gov/im/datamgmt/statistics/r/advanced/spatial.cfm

FINDINGS – TUTORIALSNPS: http://science.nature.nps.gov/datamgmt/statistics/advancedspatial.cfm

IntroductionWhy use R for spatial data ?Before the Webinar

Spatial ObjectsReading Spatial ObjectsWriting Spatial Objects

Creating kml files for Google Earth / Google MapsSpatial Overlays and ExtractionsRaster Computations

Package raster documentationWhy use R raster ?Key raster conceptsBasic raster function example:Raster for climate data analyses

FINDINGS – TUTORIALSNPS: http://science.nature.nps.gov/datamgmt/statistics/advancedspatial.cfm

If you wish to download the data files and R code to play along at home, I have posted them on the NPS R website:

CABR data (DEM, Boundary, Slope, Aspect, Vegetation Map Polygons)

PRISM data from Colorado (for John Gross' raster examples. Extract the .gz files into a "prism/t_min" for John's code.)

tmin_1900.ziptmin_2010.ziptmin_sum_1901-1904.ziptmin_sum_2000-2004.zipCMIP3_Tavg_Monthly_A2.zip

Tom's R code using gdal, overlay, etc.

John's R code using raster

Tom's kmlPolygons.R function to generate labeled kml polygons for Google Earth & Google Maps

`

FINDINGS – TUTORIALSCRAN ( spgrass6 PDF ) Documentation / Code Examples

https://cran.r-project.org/web/packages/spgrass6/spgrass6.pdf

FINDINGS – TUTORIALSCRAN ( spgrass6 PDF )

Document Content Headings

IntroductionInstalling the interface packageThe sp packageUsing graphics with sp objectsUsing the spgrass6 package with raster dataUsing the spgrass6 package with vector dataConclusionReferences

FINDINGS – TUTORIALSCRAN ( spgrass6 PDF ) Sample Code

library(spgrass6)

system("g.region -g3")

grand_nlcd <- readRAST6("Grand_County_NLCD_Attributed_N83_Z13", ignore.stderr = TRUE)

summary(grand_nlcd)

table(grand_nlcd$cat)

image(grand_nlcd, col = rev(colors(16)))

legend("top", legend = 11:12, fill = rev(colors(16)), cex = 0.8, bty = "n", horiz = TRUE)

legend("left", legend = 21:24, fill = rev(colors(16)), cex = 0.8, bty = "n", horiz = FALSE)

legend("right", legend = 41:43, fill = rev(colors(16)), cex = 0.8, bty = "n", horiz = FALSE)

legend("bottom", legend = 90:95, fill = rev(colors(16)), cex = 0.8, bty = "n", horiz = TRUE)

grand_dem <- readRAST6("Grand_County_CO_NED_30m", ignore.stderr = TRUE)

summary(grand)

table(grand_dem$cat)

image(grand_dem, col = rev(colors(10)))

FINDINGS – TUTORIALSCRAN ( spgrass6 PDF ) Example Code Outputs

FINDINGSGME: http://www.spatialecology.com/gme/

The Geospatial Modeling Environment (GME) is a platform designed to help to facilitate rigorous spatial analysis and

modeling.

GME provides you with a suite of analysis and modeling tools, ranging from small 'building blocks' that you can use to construct a sophisticated work-flow, to completely self-contained analysis programs. It also uses the extraordinarily powerful open source software R as the statistical engine to drive some of the analysis tools. One of the many strengths of R is that it is open source, completely transparent and well documented: important characteristics for any scientific analytical software.

FINDINGS – Evolutionary DevelopmentsGME: http://www.spatialecology.com/gme/

Findings from a Search for R Spatial Analysis Support

ACKNOWLEDGEMENTS and THANKS:

The R Development CommunityOpen Source Geospatial Community

NEON and NPS

QUESTIONS ?

top related