# spatial statistics - msimaths- johnm/courses/r/asc2008/p2008-07-11point pattern or geostatistical...

Post on 10-Apr-2018

214 views

Category:

## Documents

Embed Size (px)

TRANSCRIPT

• Spatial Statistics ASC Workshop 2008 1

Spatial Statistics

CSIRO and University of Western Australia

ASC WorkshopComputing with R

2008

• Spatial Statistics ASC Workshop 2008 2

Types of spatial data

• Types of spatial data

Spatial Statistics ASC Workshop 2008 3

Three basic types of spatial data:

• Types of spatial data

Spatial Statistics ASC Workshop 2008 3

Three basic types of spatial data:

geostatistical

• Types of spatial data

Spatial Statistics ASC Workshop 2008 3

Three basic types of spatial data:

geostatistical

regional

• Types of spatial data

Spatial Statistics ASC Workshop 2008 3

Three basic types of spatial data:

geostatistical

regional

point pattern

• Geostatistical data

Spatial Statistics ASC Workshop 2008 4

GEOSTATISTICAL DATA:The quantity of interest has a value at any location, . . .

• Geostatistical data

Spatial Statistics ASC Workshop 2008 5

. . . but we only measure the quantity at certain sites. These values are our data.

• Regional data

Spatial Statistics ASC Workshop 2008 6

REGIONAL DATA:The quantity of interest is only defined for regions. It is measured/reported for certain fixed regions.

• Point pattern data

Spatial Statistics ASC Workshop 2008 7

POINT PATTERN DATA:The main interest is in the locations of all occurrences of some event (e.g. tree deaths, meteoriteimpacts, robberies). Exact locations are recorded.

• Points with marks

Spatial Statistics ASC Workshop 2008 8

Points may also carry data (e.g. tree heights, meteorite composition)

• Point pattern or geostatistical data?

Spatial Statistics ASC Workshop 2008 9

POINT PATTERN OR GEOSTATISTICAL DATA?

• Explanatory vs. response variables

Spatial Statistics ASC Workshop 2008 10

Response variable: the quantity that we want to predict orexplain

Explanatory variable: quantity that can be used to predict orexplain the response.

• Point pattern or geostatistical data?

Spatial Statistics ASC Workshop 2008 11

Geostatistics treats the spatial locations as explanatory variables and the valuesattached to them as response variables.Spatial point pattern statistics treats the spatial locations, and the valuesattached to them, as the response.

• Point pattern or geostatistical data?

Spatial Statistics ASC Workshop 2008 12

Temperature is increasing as we move from South to North geostatisticsTrees become less abundant as we move from South to North point patternstatistics

• Spatial Statistics ASC Workshop 2008 13

Software Overview

• Software overview

Spatial Statistics ASC Workshop 2008 14

For information on spatial statistics software:

• Software overview

Spatial Statistics ASC Workshop 2008 14

For information on spatial statistics software:

go to cran.r-project.org

• Software overview

Spatial Statistics ASC Workshop 2008 14

For information on spatial statistics software:

go to cran.r-project.org

• Software overview

Spatial Statistics ASC Workshop 2008 14

For information on spatial statistics software:

go to cran.r-project.org

• GIS software

Spatial Statistics ASC Workshop 2008 15

GIS = Geographical Information System

• GIS software

Spatial Statistics ASC Workshop 2008 15

GIS = Geographical Information System

ArcInfo

• GIS software

Spatial Statistics ASC Workshop 2008 15

GIS = Geographical Information System

ArcInfo proprietary esri.com

• GIS software

Spatial Statistics ASC Workshop 2008 15

GIS = Geographical Information System

ArcInfo proprietary esri.com

GRASS open source grass.osgeo.org

• GRASS

Spatial Statistics ASC Workshop 2008 16

• GRASS: Image data

Spatial Statistics ASC Workshop 2008 17

• GRASS: Vector data

Spatial Statistics ASC Workshop 2008 18

• GRASS: Regional data

Spatial Statistics ASC Workshop 2008 19

• GRASS: Multiple data layers

Spatial Statistics ASC Workshop 2008 20

• GRASS: Multiple data layers

Spatial Statistics ASC Workshop 2008 21

• GRASS: Mixed layers

Spatial Statistics ASC Workshop 2008 22

• GRASS: visualisation

Spatial Statistics ASC Workshop 2008 23

• GRASS: Data integration

Spatial Statistics ASC Workshop 2008 24

• GRASS: I mean really integrated

Spatial Statistics ASC Workshop 2008 25

• GRASS: did I mention data integration

Spatial Statistics ASC Workshop 2008 26

• GRASS: unbelievably well integrated

Spatial Statistics ASC Workshop 2008 27

• GRASS

Spatial Statistics ASC Workshop 2008 28

• GRASS: runs on anything

Spatial Statistics ASC Workshop 2008 29

• Recommendations

Spatial Statistics ASC Workshop 2008 30

Recommendations:

• Recommendations

Spatial Statistics ASC Workshop 2008 30

Recommendations:

For visualisation of spatial data, especially for presentation

graphics, use a GIS.

• Recommendations

Spatial Statistics ASC Workshop 2008 30

Recommendations:

For visualisation of spatial data, especially for presentation

graphics, use a GIS.

For statistical analysis of spatial data, use R.

• Recommendations

Spatial Statistics ASC Workshop 2008 30

Recommendations:

For visualisation of spatial data, especially for presentation

graphics, use a GIS.

For statistical analysis of spatial data, use R.

Establish two-way communication between GIS and R,

either through a direct software interface, or by

reading/writing files in mutually acceptable format.

• Putting the pieces together

Spatial Statistics ASC Workshop 2008 31

RGIS

• Putting the pieces together

Spatial Statistics ASC Workshop 2008 32

RGIS

Inte

rfac

e

Interface between R and GIS (online or offline)

• Interfaces

Spatial Statistics ASC Workshop 2008 33

Direct interfaces between R and GIS:spgrass6 interface to GRASS 6

RArcInfo interface to ArcInfo

• Interfaces

Spatial Statistics ASC Workshop 2008 33

Direct interfaces between R and GIS:spgrass6 interface to GRASS 6

RArcInfo interface to ArcInfo

Start R and GRASS independently; then start library(spgrass6) to establishcommunication

• GIS data files

Spatial Statistics ASC Workshop 2008 34

Dominant formats for data files:ESRI shapefiles ArcInfo software esri.com

NetCDF Unidata GIS standard unidata.ucar.edu

• GIS data files

Spatial Statistics ASC Workshop 2008 34

Dominant formats for data files:ESRI shapefiles ArcInfo software esri.com

NetCDF Unidata GIS standard unidata.ucar.edu

GDAL geospatial data gdal.org

PROJ.4 map projections remotesensing.org

• GIS data files

Spatial Statistics ASC Workshop 2008 34

Dominant formats for data files:ESRI shapefiles ArcInfo software esri.com

NetCDF Unidata GIS standard unidata.ucar.edu

GDAL geospatial data gdal.org

PROJ.4 map projections remotesensing.org

R packages handling GIS data files:

rgdal shapefiles, GDAL, PROJ.4

maps + mapproj map databases

• Putting the pieces together

Spatial Statistics ASC Workshop 2008 35

RGIS

spatial

data

supportInte

rfac

e

Support for spatial data: data structures, classes, methods

• R packages supporting spatial data

Spatial Statistics ASC Workshop 2008 36

R packages supporting spatial data classes:

sp genericmaps polygon mapsspatstat point patterns

• Putting the pieces together

Spatial Statistics ASC Workshop 2008 37

RGIS

analysis

spatial

data

supportInte

rfac

e

Capabilities for statistical analysis

• Putting the pieces together

Spatial Statistics ASC Workshop 2008 38

RGIS

analysis

spatial

data

support

analysis

analysis

Inte

rfac

e

Multiple packages for different analyses

• Statistical functionality

Spatial Statistics ASC Workshop 2008 39

R packages for geostatistical data

gstat classical geostatisticsgeoR model-based geostatisticsRandomFields stochastic processesakima interpolation

• Statistical functionality

Spatial Statistics ASC Workshop 2008 39

R packages for geostatistical data

gstat classical geostatisticsgeoR model-based geostatisticsRandomFields stochastic processesakima interpolation

R packages for regional data

spdep spatial dependencespgwr geographically weighted regression

• Statistical functionality

Spatial Statistics ASC Workshop 2008 39

R packages for geostatistical data

gstat classical geostatisticsgeoR model-based geostatisticsRandomFields stochastic processesakima interpolation

R packages for regional data

spdep spa