Title: Spatial Multivariate Habitat Modeling Simplified with the ArcRstats Toolbox
1Spatial Multivariate Habitat Modeling Simplified
with the ArcRstats Toolbox
- Benjamin D. Best, Dean L. Urban, Patrick N.
Halpin, Song S. QianDuke University, NC USA
2Habitat and Connectivity Modeler Toolboxes for
ArcGIS
- Benjamin D. Best, Dean L. Urban, Patrick N.
Halpin, Song S. QianDuke University, NC USA
3Overview
LOGISTICHABITAT 0-1
ENV. RASTERS
BINARYHABITAT 0,1
POINT_OBS.
HABITAT MODELER
CONNECTIVITY MODELER
RANDOMPOINTS
MULTIVAR. REGRESSION
LEAST-COST PATHS
CREATENETWORK
NETWORK
POINTS_RANDOM
LINES_EDGES
4Goals
- What
- Model habitat with multivariate regression
- Model connectivity with graph theory
- How
- ESRI ModelBuilder scientific workflow
- Interface to R statistics application
- Utilize Python NetworkX module
- Provide building block templates
5Outline
- User Perspective
- ModelBuilder Interface
- Conceptual References
- Software Requirements
- Developer Perspective
- Python Glue Geoprocessor, R and NetworkX
- R Python Libraries
- Soon Sourceforge-Like Collective
6(No Transcript)
71. Habitat Modeler
pts_obs
Statistical
Random
pts_rand
dir_plots
rstr_viable
Plots
Points
Sample to
tbl_env
Table
Multivariate
rstr_landcov
ltgt Lakes
Regression,
rstr_glm
GLM
rstr_dem
rstr_glmroc
rstr_aspect
rstr_tci
82. Connectivity Modeler
tin
ln_edgeslc
pt_nodes
poly_patches
Network
Create
Least Cost
poly_patchsm
ln_edges
Network
Path
txt_network
rstr_cost
txt_networkl
pt_centroids
Network
Centrality
Metrics
poly_patches_
9Example Environmental Data
demdigitalelevationmodel
landcover
tcitopographic convergence index
Grandfather Mountain, NC
101.1. Random Points
pts_obs
Statistical
Random
pts_rand
dir_plots
rstr_viable
Plots
Points
Sample to
tbl_env
Table
Multivariate
rstr_landcov
ltgt Lakes
Regression,
rstr_glm
GLM
rstr_dem
rstr_glmroc
rstr_aspect
rstr_tci
111.1. Random Points
- R library spatstat (more point patterns possible)
- grid mask for point generation (Rgdal)
121.2. Sample to Table
pts_obs
Statistical
Random
pts_rand
dir_plots
rstr_viable
Plots
Points
Sample to
tbl_env
Table
Multivariate
rstr_landcov
ltgt Lakes
Regression,
rstr_glm
GLM
rstr_dem
rstr_glmroc
rstr_aspect
rstr_tci
131.2. Sample to Table
- File formats DBF or MDB (geodatabase)
- Presence 1 Observed, 0 Random
- Appended into single table
141.3. Statistical Plots
pts_obs
Statistical
Random
pts_rand
dir_plots
rstr_viable
Plots
Points
Sample to
tbl_env
Table
Multivariate
rstr_landcov
ltgt Lakes
Regression,
rstr_glm
GLM
rstr_dem
rstr_glmroc
rstr_aspect
rstr_tci
151.3. Statistical Plots
161.4. Multivariate Regression, GLM
17Regression Techniques
- Source Guisan and Zimmermann, 2000. Predictive
habitat distribution models in ecology. Ecol.
Mod.135.
Marine Reference Redfern et.al., 2006.
Techniques for Cetacean-habitat Modeling. MEPS
310.
181.4. Generalized Linear Model (GLM)
- logit(y) ß0 ß1x1 ß2x2 ßmxm
- presence ß0 ß1dem ß2tci
- OLS regression
- binary response 0-1
- inv.logit 1 / (1 exp( -x))
- categorical (factor), ie landcover -gt dummy x
variables 0,1 - stepAIC for model selection of best predictors
191.4. Multivariate Regression, GLM
_summary.txt
GLM best model, using step-wise AIC selection of
variables... Call glm(formula presence dem
tci, family binomial(link "logit"), data
samples) Deviance Residuals Min 1Q
Median 3Q Max -3.0314 -0.4194
0.0467 0.6924 2.3991 Coefficients
Estimate Std. Error z value Pr(gtz)
(Intercept) 0.130559 1.461863 0.089
0.929 dem 0.006760 0.001025
6.597 4.19e-11 tci -0.108406
0.016632 -6.518 7.13e-11 --- Signif. codes
0 '' 0.001 '' 0.01 '' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken
to be 1) Null deviance 454.70 on 327
degrees of freedom Residual deviance 250.21 on
325 degrees of freedom AIC 256.21 Number of
Fisher Scoring iterations 6
_coefficients.csv
201.4.c. Generalized Additive Model (GAM)
211.4.b. Classification and Regression Tree (CART)
22Carmel Bay, CA
Marine Example Benthic Habitat of Rockfish in
Monterey (2005 Workshop)
Blue Rockfish
ROV Transects
Source M. Park CDFG
23Benthic Habitat Layers
Distance to shelf
Distance to kelp
Depth
Bottom complexity
Substrate type
Carmel Bay, CA
24Benthic Habitat Prediction
251.4. Binary Habitat
Optional arguments
- binary map
- binary threshold
- or, use ROC optimimum threshold
261.4. Receiver Operating Characteristic (ROC) Curve
- Prediction performance
- True positive (i.e. omission, false negative)
vs. False positive (i.e. commission) - Optimize trade-off
- Or assign more risk-averse threshold
271. Habitat -gt 2. Connectivity Patches
281.-gt2. Patches and Cost Surface
- Patches
- Distinguish patches (Region Group)
- Trim edges (Boundary Clean)
- Cost Surface
- Accumulate cost from patch
291.-gt2.Cumulative Cost
302. Connectivity Modeler
tin
ln_edgeslc
pt_nodes
poly_patches
Network
Create
Least Cost
poly_patchsm
ln_edges
Network
Path
txt_network
rstr_cost
txt_networkl
pt_centroids
Network
Centrality
Metrics
poly_patches_
31Source Treml Halpin, 2006
Graph Theory Relationships between entities
- Social sciences
- Small-world phenomenon
- Six-degrees of separation
- Complex systems
- Random network theory
- Neural networks
- Scale-free networks
- Ecology
- Flow of energy, water or materials
- Movement of individuals
- Habitat characteristic
www.sojamo.de/iv/index.php
Urban Keitt, 2001
32Source Treml Halpin, 2006
Graph Structure Connectivity data
- Data model
- Distance matrix D
- or
- Edge list (from-id, to-id, distance)
- Adjacency matrix (1/0)
- Vertices/Nodes matrix (id,x, y)
- Node properties (area, density, quality, etc)
- Graph representation
- Nodes
- Edge or arc
- Clusters
- Node degree
- Hubs
- Path
33Source Treml Halpin, 2006
Ecological Connectivity Graph properties
behavior
- Graph properties and metrics
- Neighborhood metrics
- Shortest paths
- Betweenness measures
- Identify likely/unlikely routes
- Robustness and resilience node removal
- Analyze flow structure through network
- Community structure, clusters cliques
342. Connectivity Modeling
tin
ln_edgeslc
pt_nodes
poly_patches
Network
Create
Least Cost
poly_patchsm
ln_edges
Network
Path
txt_network
rstr_cost
txt_networkl
pt_centroids
Network
Centrality
Metrics
poly_patches_
352.1. Triangulated Irregular Network (TIN)
ArcScene
36Novel TIN Approach
- Captures spatial (X,Y) and functional (Z)
relationships - Edge length cumulative cost
- Fast
- Complexity tweakable
- Max. number of nodes
- Max. allowable Z difference
372. Connectivity Modeling
tin
ln_edgeslc
pt_nodes
poly_patches
Network
Create
Least Cost
poly_patchsm
ln_edges
Network
Path
txt_network
rstr_cost
txt_networkl
pt_centroids
Network
Centrality
Metrics
poly_patches_
382.2 Network Least Cost Paths
- Djikstra algorithm highly efficient over ArcGIS
CostPath function - Future create corridors with CostDistance from
paths
392. Connectivity Modeling
tin
ln_edgeslc
pt_nodes
poly_patches
Network
Create
Least Cost
poly_patchsm
ln_edges
Network
Path
txt_network
rstr_cost
txt_networkl
pt_centroids
Network
Centrality
Metrics
poly_patches_
40Network Centrality Metrics
Closeness
Betweenness
Degree
Brandes, 2000. Faster Evaluation of
Shortest-Path Based Centrality Indices. CiteSeer.
41Software Requirements
- Commercial ArcGIS 9.0
- ArcInfo
- Spatial Analyst
- 3D Analyst CM
- Free/Open-Source
- Download www.env.duke.edu/geospatial
- Python 2.3.5 (www.python.org)
- Python NetworkX (networkx.lanl.gov) CM
- R 2.0.1 (www.r-project.org) HM
- libraries mass, rpart, mgcv, maptools, foreign,
Rgdal, spatstat - R COM connector
42Developer Perspective
43ArcCatalog Add Script
44Script Source
45(No Transcript)
46Scrip
47Getting Arguments in Python
48Python Programming Glue
PythonWin IDE
49R Sourcing
50R Spatial Libraries
51R Performance
- Map Algebra formulas (GLM, CART) vs. prediction
in R (GAM) - Future simplify GAM prediction with with table
lookup values and Map Algebra - Works with shapefiles geodatabases
52Future
- Open-Source Software Control Hosting with TRAC
- GAM with Lookup Table
- Improve Error Checking, auto-install libraries
- Improve Documentation
- Spatial weighted regression (or CAR)
- Zero-Inflated Models
- Bayesian statistics
53Conclusions
- Habitat and connectivity modeling accessible to
the GIS masses - Provide templates/building blocks for analysis of
habitat and connectivity - Framework for continuing to develop ArcGIS
integration with R, Python tools
54Download/Feedback
- www.env.duke.edu/geospatialbbest_at_duke.edu
- Thanks to
- Scott Loarie, Ben Poulter
55(No Transcript)