1)Emergency cycles and activities
2)UK US command and control 2 example ( gold-silver-bronze ) local level national level health and oil sector
3)Why use international perspective?
4)3 key learning point of emergency response
2. Exercise 7: Point Patterns Analysis
On Canvas, there is a file named pines.dat that contains information on the locations of 71
pine trees in a 10m×10m plot in a Swedish forest (Strand, 1972). It’s a text file, but pointpattern data must be set up in a specific way for use in the spatial package in R. This file
also is in the spatial package, so you shouldn’t need to save it in a local folder, but I think it
is good to see the format of these files.
Before starting, check to see if the spatial and MASS packages are installed in your version
of R (do a little reading on these before and after installing to know what they can do). If not,
install.package them and then load them using library.
1. Explore the x- and y-coordinates of the pine locations (pines$x and pines$y) using standard
approaches (summary statistics, histograms, etc.). What would you expect the histograms to
look like for a random point pattern? “Plot the points (in a square plot) to visualize the point
pattern. As in the last exercise, add grid lines to help evaluate the degree of dispersion,
randomness, or clustering in this point pattern. Discuss. [4]
2. Use 2-dimensional kernel-density estimation (kde2d from MASS) to aid your visualization of
the pattern. Discuss the pattern that results from the smoothing process. [6]
Recall that kernel-density estimation often is used to smooth histograms. But, it also can be
used with 2-dimensional point patterns to identify where there are high and low densities of
points. I recommend the following options to begin with, but read the help and explore others
as well. The image command will allow you to view the 2-dimensional surface produced by
kde2d (you can also try contour(f1)). Be sure to also add the points on top of this surface.
f1 <- kde2d(x, y, h = c(2.5,2.5), n = 200, lims = c(0, 10, 0, 10))
image(f1, col = heat.colors(12))
3. Estimate the K-function (aka Ripley’s K) and plot it as a function of distance. To do this, use
the Kfn function (which actually estimates the L-function!). For comparison, it is essential to
also calculate the L-function that would be produced by complete spatial randomness (CSR).
Plot both of these and compare the estimated L-function to the one from CSR. Then add an
envelope of K-function simulations to the graphic to help determine how much variability in
random patterns there is with this many points. Interpret your results. [6]
plot(L,
type=”s”,
main=”Pines”,
xlab=”distance”,
ylab=”L(t)”)
lines(L$x,L$CSR,
col=”dark red”,
lty=3)
lims=Kenvl(10,100,Psim(n)) # n is from length(x)
lines(lims$x,lims$lower,lty=2,col=”darkblue”)
lines(lims$x,lims$upper,lty=2,col=”darkblue”)
4. Most humans find it easier to compare values that are referenced to a horizontal line (rather
than the sloping one of CSR in the L-function formulation). To make this transformation,
simply subtract CSR from the L-function and plot that. You will need to do this for the “lims”
as well. Compare this evaluation of randomness to that from Question 4. [4]
plot(L$x,L$y-L$CSR,
type=”l”,
xlab=”Distance”,
ylab=”L – CSR”,
ylim=c(-0.45,0.45))
CSRlims=sqrt(lims$x^2)
lines(lims$x,lims$lower-CSRlims,lty=2,col=”darkblue”)
lines(lims$x,lims$upper-CSRlims,lty=2,col=”darkblue”)
abline(h = 0, lty = 2, col = “dark red”)
What I’m looking for is something like this:
Note: if you are interested in counting and visualizing points in quadrats, you can install the
“spatstat” package and use the quadratcount function (spatstat has a lot of other good
functionality):
#convert to spatstat format
pines2 <- as.ppp(pines)
pines2q <- quadratcount(pines2)
plot(pines2q)
points(pines)
Strand, L. (1972). A model for stand growth. IUFROThird Conference Advisory Group of Forest
Statisticians.INRA, Institut National de la Recherche Agronomique, Paris. pp . 207–216.