Thursday, October 22, 2015

Book Review: An Introduction to R for Spatial Analysis and Mapping

I decided to talk a walk on the wild-side and examined R as a GIS for spatial analysis.  I hope to use several of R's spatial statistics packages and to automate tasks--staying within one program.  I highly recommend Brunsdon and Comber's book ($50 on Amazon, Paperback, electronic versions also available).

About the Authors: Chris Brunsdon is the creator of geographically weighted regression or GWR. Lex Comber is a professor at Leeds University.

Four Reasons to choose R as a GIS
1)  You are interested in performing tailored exploratory spatial data analysis (ESDA), spatial statistics, regression analysis, and diagnostics.
  • Of course, R is also way better than ArcGIS and QGIS for summary statistics too. (Notably, QGIS has integrated a R processing toolbox into it. ArcGIS  also has an official bridge to R.)
2)  You already use R for non-spatial data, have lots of code written, and need to analyze spatial data.

3)  You do not want to export your data (or results) from one program into another and back again!

4) You want to be able to publish or share your code with a wider audience.

A great cover to a great book!
Reader Accessibility
The content is extremely well-presented, clear and concise, and includes color graphics. It is not overly technical. Still, R as a GIS and spatial analysis are tough material and is definitely not for the faint-of-heart. The authors assume readers may not have either a R or GIS background, or both. I took a R class in graduate school and occasionally use it.

Additional packages that assist in manipulating and reshaping data, such as plyr, are also discussed. The authors also warn readers that R packages can change over time, causing error messages, but many warn users about recent and upcoming changes.

In the first 40 pages, you will learn R basics, if you don't already have a foundation. Next, you will learn GIS fundamentals, how to plot data to create a map, taking into account scale, and adding and positioning common map elements like a north arrow and scale bar. This may sound basic but in R nothing is easy!  Of course, the advantage with code is that you can reuse it or may only need to modify it slightly for many maps.

Late in Chapter 5-6 the book dives into spatial analysis.  The last few chapters are probably the best of the book, as more advanced statistical techniques are discussed including local indicators of spatial auto correlation (LISAs), geographically weighted summary statistics and regression.

The book providers a great guide and reference, and I am sure I will be re-visiting it frequently!  Overall, it is a great mix of practice and theory.

None, I found and purchased the book on my own.

Wednesday, October 14, 2015

Video: QGIS Print Composer - Side-by-Side Maps and Atlas

QGIS has a powerful print composer that allows users to create complex maps very quickly.  Two common practical examples include creating: 1) side-by-side (or multiple maps) on the same canvas/layout and 2) a map book or atlas. This week's video looks at these cases:

In the video, we will create side-by-side maps of different band combinations of remote sensing imagery of the Salton Sea.  For a related blog post, visit:

We will also use the atlas to take a closer look a battleground states during the 2012 presidential election.

Lastly, I searched high and low, but I could not find any guidance or cartographic reference on creating side-by-side maps. So, I looked through several dozen examples, found a couple of themes, and drafted some suggestions --which you can find towards the introduction--and below.
A few suggestions for creating multiple maps on the same canvas/layout.
In the coming months, we will also re-visit the atlas function in print composer and look at more complex examples.

Sunday, October 4, 2015

Video: Tips for Using QGIS Print Composer

QGIS Print Composer can be a little awkward to use at first.  It is analogous to Layout View in ArcGIS.  We will look at some tips to make it easier to use and understand how to create maps in QGIS.

In the video, we will review a map of 2012 Presidential Election Results, as seen below.

In Part II, I will show you how to create side-by-side map series, which is great to look at changes over time as well as different band combinations in remote sensing.  We will also take a look at creating an atlas or map book, essentially iterating/repeating the map making process by a geographic area.  Lastly, we will take a look at the QGIS Map Showcase on Flickr.

If there is something you would like to see, let me know in the comments section below.

Update #1: Print composer has an add Legend button but in this video I used an image file because I used some fancy rule-based symbology, the legend was not easy to look at. Normally, I would just select add Legend.