frameworks for geoprocessing on the web with r

31
Frameworks for geoprocessing on the web with R Daniel Nüst, 52°North GmbH AGILE 2015 Workshop: Geoprocessing on the Web

Upload: daniel-nuest

Post on 26-Jul-2015

83 views

Category:

Science


0 download

TRANSCRIPT

Page 1: Frameworks for geoprocessing on the web with R

Frameworks for geoprocessing on the web with RDaniel Nüst, 52°North GmbH

AGILE 2015 Workshop: Geoprocessing on the Web

Page 2: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 2

Motivation

Go beyond data

Share knowledge and ressources

Have fun and develop software

Process design is really really really really really really really reallyreally really really really hard.

Page 3: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 3

Why R?

R-sig-geo

GIS

geos, rgdal, raster, gstat, …

Page 4: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 4

Use casesIntuitive apps for air quality data

• Interactive UI• Pre-configured

analysis• Multiple „apps“

Reproducible scientific analysis

• Transparency & full control (levels)

• Existing research scripts

• Standards• Collaboration

User selects an air quality station on a map and a time frame to start one complex data analysis and explore the result plot.

Researcher tests different parameters of an algorithm using nonpublic data within his GIS environment, downloads all scripts and recreates full set-up in own environment.

Page 5: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 5

SENSORWEBYUser-friendly air quality timeseries analysis with…

http://joaquin.eu

Page 6: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 6

Shinyhttp://shiny.rstudio.com/

Page 7: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 7

52°North JavaScript Sensor Web Clienthttps://github.com/52north/js-sensorweb-client/http://sensorweb.demo.52north.org/jsClient/

Page 8: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 8

SensorwebysensorwebyWeb app integrating JS SWC with Shinyhttps://github.com/52North/sensorweby

sensorweb4R + sos4Rclient libraries to access data services from Rhttps://github.com/52North/sensorweb4Rhttp://cran.r-project.org/web/packages/sos4R/

Page 9: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 9

Page 10: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 10

Page 11: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 11

Plots by http://openairproject.org/

Page 12: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 12

Plo

ts b

y h

ttp:/

/openair

pro

ject

.org

/

Page 13: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 13

http://shiny.irceline.be/examples/

devtools::install_github("52North/sensorweb4R")devtools::install_github("52North/sensorweby")

sensorweby::runExample("basic")

Page 14: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 14

WPS4R

Standardized scientific geoprocessing for land use analysis using…

Page 15: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 15

Web Processing ServiceDescribes inputs & output of geospatial web processing serviceshttp://en.wikipedia.org/wiki/Web_Processing_Service | http://www.opengeospatial.org/standards/wps

• GetCapabilities: service-level metadata• DescribeProcess: process description (metadata,

inputs, outputs)• Execute: start and retrieve results of a process

instance– Synchronous– Asynchronous

Open source implementations

OGC WPS

Page 16: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 16

52°North WPS4Rhttps://wiki.52north.org/bin/view/Geostatistics/WPS4R

Collaboration platform for web devs, IT, and GIS/domain experts

Reproducible geoprocesses in SOA

Page 17: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 17

Page 18: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 18

Page 19: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 19

Page 20: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 20

WPS4R DEMONSTRATORReproducible Global Land Use Classification

Page 21: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 21

http://geoportal-glues.ufz.de/stories/landsystemarchetypes.html

Page 22: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 22

The following input parameters of the process are available to the user:• Sample size (numbers of points spread over the globe)• Sampling type (strategy such as regular, random, …)• Standardization method (how to move inputs to a common

scale)• SOM-specific parameter

– Grid topology (rectangular or hexagonal)

– Grid dimensions (influences # of output classes)

Future versions might allow to select the used datasets or integrate own datasets, select input layers, …

Process Inputs

Page 23: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 23

http://geoportal-glues.ufz.de/stories/openanalysis.html

Page 24: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 24

Page 25: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 25

http://geoportal-glues.ufz.de/stories/openanalysis.html

Page 26: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 26

https://github.com/52North/glues-wps/

Page 27: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 27

Next stepsWPS4R

Spatial output integrated with ArcGIS clientGitHub-based four-eyes-principle!Generate provenance information from scripts?Privacy-aware analysis of floating car data?See https://github.com/52North/WPS/labels/wps4r

sensorweby

Apps, apps, appsSee https://github.com/52North/sensorweby/issues/

Try it out!

Page 28: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 28

wps-js [shameless plug]WPS XML process description > web form

https://github.com/52North/wps-js/

Beta-stage, please join!

Goal: JSONIXhttps://github.com/

highsource/jsonix

Page 29: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 29

ConclusionsShiny

Quick, suitable for teaching, few lines of plain R creates an app, full GIS, extensible within the platform

WPS4R

SDI/SII-ready, simple to complex processes/abstraction levels, various clients, service oriented architecture, completely customizable

all algorithms,

visualisation, …

Page 30: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 30

*

http://en.wikipedia.org/wiki/Law_of_the_instrument* R is not the only hammer in the toolbox, 52°North WPS (and others) support Python, Java, and Matlab processes as well…

htt

p:/

/pix

abay.

com

/p-3

5369/?

no_r

edir

ect

htt

p:/

/pix

abay.

com

/p-9

6174/?

no_r

edir

ect

htt

ps:

//hom

e.c

om

cast

.net/

~to

mhors

ley/g

am

e/s

tyle

s/to

ols

.jpg

Page 31: Frameworks for geoprocessing on the web with R

Geoprocessing with R @ AGILE 2015 31

Referenceshttp://blog.52north.org/2015/04/22/advanced-time-series-analysis-on-the-web-with-r/ http://geoportal-glues.ufz.de/stories/openanalysis.html http://52north.org/wps

• Pebesma, E., D. Nüst, R. Bivand, 2012. The R software environment in reproducible geoscientific research. Eos, Transactions American Geophysical Union 93, vol 16, p. 163164

• CRAN task views “Spatial” ( http://cran.rproject.org/web/views/Spatial.html ) and “SpatioTemporal” ( http://cran.rproject.org/web/views/SpatioTemporal.html )

• Nüst, D., Stasch, C. and Pebesma, E. J. Connecting R to the Sensor Web in Geertman, S.; Reinhardt, W. and Toppen, F. (Eds.) Advancing Geoinformation Science for a Changing World, Springer Lecture Notes in Geoinformation and Cartography, 2011, 227-246

• Matthias Hinz, Daniel Nüst, Benjamin

Proß, Edzer Pebesma, 2013. Spatial Statistics on the Geospatial Web. Short paper, AGILE 2013

• Vaclavik, T., Lautenbach, S., Kuemmerle, T., Seppelt, R. (2013): Mapping global land system archetypes. Global Environmental Change 23(6): 16371647. DOI: 10.1016/j.gloenvcha.2013.09.004.

Contact: [email protected] | @nordholmen