open spatial analysis with ron buliung assistant professor department of geography university of...
TRANSCRIPT
Open Spatial Analysis with
Ron BuliungAssistant Professor
Department of GeographyUniversity of Toronto at
Outline
What, Why, Where?
Some Key Projects
What Have I Been Up To?
Resources
What is “R”?
Integrated software suite for data manipulation, calculation and graphical display:
Data handling and storage.
Operators for calculations on arrays and matrices.
Collection of tools for data analysis.
Graphing and data visualization.
Complete programming language
Domain specific sub-projects
What does R Look Like?
Can also Look Like This
Rcmdr – John Fox
Why Adopt “R”?
Analytically Comprehensive FREE, and open source Multi platform support Flexibility Vast array of learning resources Continuity of Use Culture of Use Analytical Clarity Introducing, my international
team of collaborators!!
Drawbacks?
User interface R-GUIs: http://www.sciviews.org/_rgui/
Problems with packages Will it always be around? Problems with large problems? A non-
starter (see object.size, memory.size, memory.limits)
Can’t leave home without it?
Where can you learn more?
http://r-spatial.sourceforge.net/
http://sal.uiuc.edu/csiss/Rgeo//
Some Key Projects
sp splancs Spatstat maptools Shapefiles RpostGIS Spgrass6 Aspace adehabitat GeoDa?? STARS
OS OS
OS Proprietary
Teaching
Working Closer to the Data “Looking under the hood” Knowledge Spillovers Skills are in demand
GGR276: Spatial Data Analysis and Mapping
GGR370: Planes, Trains and Automobiles: The Geography of Transportation
580000 600000 620000 640000 660000 680000 7000004
78
00
00
48
20
00
04
86
00
00
49
00
00
0
GTA Landfill Sites
X-coords
Y-c
oo
rds
Teaching
#next two lines should be written into R as a single line
mpb <- read.table("C:/bc/mpb.txt", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE)
#next two lines should be written into R as a single line
plot(mpb$X_coord,mpb$Y_coord,xlab="X-coords",ylab="Y-coords",main="Pine Beetle Data")
n <- nrow(mpb[1])
n
mean(mpb$X_coord);mean(mpb$Y_coord)
mc.x<-sum(mpb$X_coord)/n
mc.y<-sum(mpb$Y_coord)/n
points(mc.x,mc.y,'p',pch=22,cex=2,col="blue",bg="blue")
wmc.x<-sum(as.numeric(mpb$Tree_no*mpb$X_coord))/sum(mpb$Tree_no)
wmc.y<-sum(as.numeric(mpb$Tree_no*mpb$Y_coord))/sum(mpb$Tree_no)
points(wmc.x,wmc.y,'p',pch=22,cex=2,col="red",bg="blue")
Deconstruct, Modify, Implement
Research: Human Spatial Behaviour
605000 610000 615000 620000
48
26
00
04
83
00
00
48
34
00
04
83
80
00
Easting (m)
No
rth
ing
(m
)
Graphic Results: Household MCP
570000 590000 610000 630000
47
90
00
04
81
00
00
48
30
00
0
Easting (m)
No
rth
ing
(m
)
Graphic Results:Household SDE
605000 610000 615000 620000
48
25
00
04
83
00
00
48
35
00
04
84
00
00
Easting (m)
No
rth
ing
(m
)
Graphic Results: Household SDD
Aspace:
Open Source toolkit for geographic visualization and analysis of activity spaces – i.e., the set of locations visited by a behavioural agent (e.g., person, household) over time.
Resources R-download http://www.r-project.org/
R-packages http://probability.ca/cran/ R-Spatial http://sal.uiuc.edu/csiss/Rgeo/
R-GUIs: http://www.sciviews.org/_rgui/
John Fox, Sociology, McMaster University: http://socserv.socsci.mcmaster.ca/jfox/
“R for Beginners” Emmanuel Paradis http://cran.r-project.org/ {click on Contributed
on left panel.}