You are on page 1of 43

Luc Anselin 3, Myung-Hwa Hwang 1,3, Yan Liu 1,2,

Anand Padmanabhan 1,2, Sergio Rey 3 and Shaowen Wang 1,2


1 CyberInfrastructure and Geospatial Information Laboratory (CIGI)

2 National Center for Supercomputing Applications (NCSA)

University of Illinois at Urbana-Champaign


and
3 GeoDa Center for Geospatial Analysis and Computation

Arizona State University

1
Spatial Econometrics Workbench
PySAL, PySAL spreg, and GeoDaSpace
CyberGIS Integration of PySAL spreg
Hands-on Exercise
Conclusions, Integration Principles, and Significance

2
The application of mathematical, statistical, modeling, simulation, and
computational methods to solving geographic problems (Anselin and
Getis, 1992; Wang, 2010)
Advances in analytical methods
o Exploratory spatial data analysis, spatial statistics, spatial econometrics,
geostatistics, operational research methods, geocomputation, and visual
analytics
Advances in computing environments (Anselin, 2012)
o Standalone desktop applications: SpaceStat, Open GeoDa, GeoDaSpace
o Toolboxes: Matlab
o Commercial software: Toolboxes in ArcGIS, Stata
o Open source libraries: R spdep, spBayes, sphet, PySAL
o Cyberinfrastructure and CyberGIS

3
Anselin and Rey, IJGIS, 2012
Framework for supporting spatial econometric research in a
cyberscience era
Support for scientific workflow
Code reuse: Leverages PySAL and spreg

4
An open source library for spatial data analysis and
geocomputation written in Python
o Current version 1.6 available at https://github.com/pysal/pysal
Leverage existing tools
o GeoDa/PySpace, STARS
Aims to develop a core library of spatial analytical functions
o Enhanced specialization, modularization
o Fill a void in Python libraries
Flexible delivery mechanism
o Shell, Desktop GUI, ArcGIS,
o CyberGIS and spatial analytical web services

5
spreg

6
Provides a suite of Python modules for modern spatial
econometrics
History
o Developed from GeoDa and PySpace
o Incorporated into PySAL from version 1.1
Functions
o Ordinary least squares with regimes and spatial diagnostics
o Two-stage least squares with regimes and spatial diagnostics
o Spatial two-stage least squares with regimes and spatial diagnostics
o GM/GMM estimation of spatial error and combo models
With regimes and heteroskedasticity

7
PySAL spreg
OLS

GeoDaSpace
Spatial Lag Model
Dispatcher Classes
Model
Specification & Parameters Spatial Error Model

8
9
Broaden access to PySAL capabilities in CyberGIS communities
o Build online user interfaces to lower the access barrier to PySALs
analytical capabilities for non-technical users
Integrate PySAL capabilities within the CyberGIS Gateway
o Provide a multi-user online problem-solving environment for PySAL
computation
o Enable user collaboration through the sharing of analysis parameters,
models, and results in Gateway
Develop systematic strategies for further integration between
CyberGIS and PySAL
o Establish strategies from rapid prototype experience of integrating
PySAL with Gateway
o Streamline the process of integration for future extensions

10
Integration Integration
Challenges Level

Collaborative Sharing and Reuse of


Analysis Model Specification

Gateway
User Modular Interface Components
Interface with Consistent Look-and-Feel

Data Data Management &


Management Metadata Services

Service
Distributed
and Open Geospatial Consortium
Scalable Web Processing Services
Analysis Cloud Computing

11
OGC WPS Service for GeoDaSpace dispatcher
Spatial Regression wrapped as a web service
GeoDaSpace process
Dispatcher
& PySAL spreg OGC WPS API used as a
service interface protocol
Cloud Web services deployed on
multiple compute
CyberGIS Gateway instances of advanced
cyberinfrastructure
o Scalable load balancing

12
Allow users to access a rich set of data from diverse
sources
File uploads, web accessible URLs, Gateway user space, application
output
Provide data abstraction
Any data is represented as a URI to allow universal online access
Metadata extraction transparently handles data source
diversity
Data uploading handled by dedicated data servers instead
of the Gateway portal
o Scalability

13
Separated GeoDaSpace GUI
elements into three
categories
o Data handling, model specification,
and results viewer

Minimal changes made to


the look-and-feel and
behaviors of GeoDaSpace
GUI
o Leveraged HTML5 components
provided by Gateway and Ext JS

14
Share the Results User collaboration is
enabled by sharing model
and results
Shared model and results
Create Report can be viewed by
collaborators via this URL
Shared model is used as
template of new regression
analysis by other users
The CyberGIS gateway is
uniquely positioned to
facilitate such collaborative
problem solving
Rerun the model

15
User
Workflow
(2,4,10)
1.Load the app
2.Specify data Browser
3.Data upload and (1) (3)
metadata extraction (5,9)
4.Model configuration
5.Model submission (8)
Gateway Portal Data Server
6.Data transfer
7.Model computation
8.*Result view (7)
9.Sharing (6)
Cloud
10.Create new analysis
based on shared model spreg
Web Service
*: via Gateway Portal
16
17
1) Log in CyberGIS Gateway: http://sandbox.cigi.illinois.edu
2) Click Spatial Regression on the CyberGIS Apps box or
Apps menu on the top

18
1) Click Next at the bottom of the Introduction page
2) Ensure US county homicide data is selected for the
Sample list of the Data File (Required) panel. Then, click
Add in the Data File panel. This resets the Weights Files
panel.
3) Ensure Queen weights of US counties is selected for the
Sample list of the Weights File panel. Then, click Add in the
Weights Files panel.
4) Click Next at the bottom of the Input Data & Weights page

19
1)

2)

3)

4)

5)
1) Review metadata shown in the panels of Data File and
Model Weights Files
o Number of observations and islands, variables
2) Check information in the panel of Evaluation Results
3) If the evaluations results include only ok, click Next. If not,
click Back to re-load input files.

21
1)

2)

3)
Basic OLS model with spatial diagnostics
1) Drag and drop HR90 from Variables list to Y
To remove a dropped item, double click it
2) Drag and drop RD90, PS90, UE90, and MA90 from Variables list to
X
3) Click Next at bottom or Run on the toolbar to run the model

23
3)

2)

1)

3)
1) Review the modeling results in the Report tab
2) (Optional) Review the model specification in the Model tab
3) (Optional) Review the predicted values and residuals in the
Predicted Values and Residuals tab
By default, predicted values and residuals are not returned
4) (Optional) Download the output files in the Output Files
panel
5) Click Previous to specify a new model

25
1) 2) 3) 4)

5)
Two-stage LS model with an endogenous variable and
spatial diagnostics
1) Drag and drop UE90 from X to YE
2) Click OK on the following message box
3) Drag and drop FP89, GI89, and FH90 from Variables list to
Instruments
4) Ensure that Standard and GMM are selected for Model Type and
Method, respectively
5) Click Preferences on the toolbar
6) Click Output tab
7) Check Predicted Values and Residuals, and click Save
8) Click Next at bottom or Run on the toolbar to run the model
9) Review the report, predicted values and residuals, and click
Previous to specify a spatial model 27
8)
4)

1)

5)

2)

6)

7)

3)

8)
9)
Spatial lag model with an endogenous variable and 2nd
order spatial lags
1) Select Spatial Lag for Model Type
2) Click Preferences on the toolbar
3) Click Instruments tab
4) Increase the value for Order of Spatial Lags for Instruments from
1 to 2
5) Click Save
6) Click Next at bottom or Run on the toolbar to run the model
7) Review the results and click Previous to specify a spatial model

30
6)
2)

3)
4)

5)

1)

31
6)
32
8)
Spatial error model with an endogenous variable, and KP
HET standard errors
1) Select Spatial Error for Model Type
2) Check KP HET for Standard Errors
3) Click Next at bottom or Run on the toolbar to run the model
4) Review the results and click Previous to specify a spatial model

33
3)

1)
2)

3) 4)
Spatial error regime model with an endogenous variable,
and KP HET standard errors
1) Drag and drop REGIONS from Variables list to R
2) Click Next at bottom or Run on the toolbar to run the model
3) Review the results

35
3)

1)

3)
1) Click Share the Results on the toolbar of the Results page
2) Modify Title and Description in the following form and click
Create
3) Click the resulting URL in the following message box
4) Review the report
5) Click Re-run this model. This will redirect you to the
model specification page with the model loaded.
o You may need to log in CyberGIS Gateway again
6) Modify and run the model

37
1)

3)

2)
4)

5)
CyberGIS integration of spreg provides a
number of users with seamless and
simultaneous access to PySAL spatial
regression via CyberGIS Gateway
Integration success highlights tangible
benefits of the CyberGIS software integration
process

40
Design modularity of Gateway, PySAL, and GeoDaSpace
Standard-based services
Accessibility
Interoperability
Scalability
User-centric approaches needed for data access, transfer, and
management
Consistency in user interfaces across desktop and Gateway
Gateway enables user collaboration in spatial analysis through
the sharing and reuse of model specifications and results

41
Data-rich cyberGIS analytics for everyone
Reproducible science
Education
Scalability
Data sizes
Different user environments
Backend computing resources

42
National Science Foundation
o OCI-1047916
o TeraGrid/XSEDE SES070004
Colleagues
o http://www.cigi.illinois.edu/doku.php/people/index
o https://github.com/pysal/pysal/blob/master/THANKS.txt
ASU PySAL development support
o National Institute of Justice Award 2009-SQ-B9-K101
o National Institutes of Health R01CA126858-02
o National Science Foundation BCS-0433132
o National Science Foundation BCS-0852261

43

You might also like