Geocomputation
eBook - ePub

Geocomputation

A Practical Primer

  1. 392 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

About this book

Geocomputation is the use of software and computing power to solve complex spatial problems. It is gaining increasing importance in the era of the 'big data' revolution, of 'smart cities', of crowdsourced data, and of associated applications for viewing and managing data geographically - like Google Maps. This student focused book:

  • Provides a selection of practical examples of geocomputational techniques and 'hot topics' written by world leading practitioners.
  • Integrates supporting materials in each chapter, such as code and data, enabling readers to work through the examples themselves.

Chapters provide highly applied and practical discussions of:

  • Visualisation and exploratory spatial data analysis
  • Space time modelling
  • Spatial algorithms
  • Spatial regression and statistics
  • Enabling interactions through the use of neogeography

All chapters are uniform in design and each includes an introduction, case studies, conclusions - drawing together the generalities of the introduction and specific findings from the case study application – and guidance for further reading.

This accessible text has been specifically designed for those readers who are new to Geocomputation as an area of research, showing how complex real-world problems can be solved through the integration of technology, data, and geocomputational methods. This is the applied primer for Geocomputation in the social sciences.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Geocomputation by Chris Brunsdon, Alex Singleton, Chris Brunsdon,Alex Singleton in PDF and/or ePUB format, as well as other popular books in Social Sciences & Social Science Research & Methodology. We have over one million books available in our catalogue for you to explore.

Part I Describing how the World Looks

1 Spatial Data Visualisation with R

Introduction

What is R?

R is a free and open source computer program for processing data. It runs on all major operating systems and relies primarily on the command line for data input (www.r.project.org). This means that instead of interacting with the program by clicking on different parts of the screen via a graphical user interface (GUI), users type commands for the operations they wish to complete. For new users this might seem a little daunting at first, but the approach has a number of benefits, as highlighted by Gary Sherman (2008: 283), developer of the popular geographical information system (GIS) QGIS:
With the advent of ‘modern’ GIS software, most people want to point and click their way through life. That's good, but there is a tremendous amount of flexibility and power waiting for you with the command line. Many times you can do something on the command line in a fraction of the time you can do it with a GUI.
A key benefit is that commands sent to R can be stored and repeated from scripts. This facilitates transparent and reproducible research by removing the need for software licences and encouraging documentation of code. Furthermore, access to R's source code and the provision of a framework for extensions has enabled many programmers to improve on the basic, or ‘base’, R functionality. As a result, there are now more than 5000 official add-on packages, allowing R to tackle almost any numerical problem. If there is a useful function that R cannot currently perform, it is likely that someone is working on a solution. One area where extension of R's basic capabilities have been particularly successful in recent years is the addition of a wide variety of spatial analysis and visualisation tools (Bivand et al., 2013). The latter will be the focus of this chapter.

Why R for Spatial Data Visualisation?

R was conceived – and is still primarily known – for its capabilities as a ‘statistical programming language’ (Bivand and Gebhardt, 2000). Statistical analysis functions remain core to the package, but there is broadening functionality to reflect a growing user base across disciplines. It has become ‘an integrated suite of software facilities for data manipulation, calculation and graphical display’ (Venables et al., 2013). Spatial data analysis and visualisation is an important growth area within this increased functionality. The map of Facebook friendships produced by Paul Butler, for example, is iconic in this regard and has reached a global audience (Butler, 2010). It shows linkages between friends as lines passing across the curved surface of the Earth (using the geosphere package). The secret to the success of this map was the time taken to select the appropriate colour palette, line widths and transparency for the plot. As we discuss later in this chapter, the importance of such details cannot be overstated. They can be the difference between a stunning graphic and an impenetrable chart.
Arguably Butler's map helped inspire the R community to produce more ambitious graphics, a process fuelled by an increased demand for data visualisation and the development of packages that augment R's preinstalled ‘base graphics’. Thus R has become a key tool for analysis and visualisation used by the likes of Twitter, the New York Times and Google. Thousands of consultants, design houses and journalists also rely on R – it is not the preserve of academic research, and many graduate jobs now list R as a desirable skill.
It is worth noting that there are a few key differences between R and traditional desktop GIS software. While dedicated GIS programs handle spatial data by default and display the results in a single way, there are various options in R that must be decided by the user.
One example of this is the choice between R's base graphics and a dedicated graphics package such as ggplot2. The former option requires no additional packages and can provide very quick feedback about the nature of the dataset in question with the generic plot() function. The ggplot2 option, by contrast, requires a new package to be loaded but opens up a very wide range of functions for visualising data, beyond the base graphics. ggplot2 also has sensible defaults for grid axes, legends and other features, allowing the user to create complex and beautiful graphics with minimal effort. We encourage users to try both but, following the focus on visualisation, have used ggplot2 for all but the first two plots presented in this chapter.
An innovative feature of this chapter is that all of the graphics presented in it are reproducible (see the next section for how). We encourage users not only to reproduce the graphics presented here but also to play around with the code, taking advantage of the wide range of visual analysis options opened up by R. Indeed, it is this flexibility, illustrated by the custom map of shipping routes presented later in this chapter, that makes R an attractive visualisation solution.
All of the results presented in this chapter can be reproduced (and modified) by typing the short code snippets that are presented into R. Elsewhere in this book, these principles are extended in the context of reproducible geographic information science.

A Practical Primer on Spatial Data in R

This section introduces those steps required to get started with processing spatial data in R. The chapter focuses on the visualisation of so-called vector data (common in socio-economic examples), but R also provides functionality for the analysis and visualisation of raster data (see supporting materials). For users completely new to R, we would recommend beginning with an introductory tutorial, such as Torfs and Brauer (2014) or Lovelace and Cheshire (2014). Both are available free online.
The first stage is to obtain and load the data used for the examples into R. These data have been uploaded into an online repository that also provides a detailed tutorial to accompany this chapter: http://github.com/geocomPP/sdvwR.1
1 To download the data that will allow the examples to be reproduced, click on the ‘Download ZIP’ button on the right-hand side of the page, and unzip this to a convenient place on your computer (e.g. the Desktop). This should result in a folder called ‘sdvwR-master’ being created.
In any data analysis project, spatial or otherwise, it is important to have a strong understanding of the dataset before progressing. R is able to import a very wide range of spatial data formats by linking with the Geospatial Data Abstraction Library (GDAL). An interface to this library is contained in the rgdal package: install and load it by entering install.packages(“rgdal”) followed by library(rgdal) on separate lines. The former only needs to be typed once to install the package; however, the latter must be run for each new R session that requires use of the functions contained within the package.
The world map that we use is available from the Natural Earth website and a slightly modified version of it (entitled ‘world’) is loaded using the following code (see Figure 1.1).2
2 A common problem preventing the data being loaded correctly is that R is not set with the correct working directory. For more information, refer to the online tutorial hosted at http://github.com/geocomPP/sdvwR.
Figure 1
The above block of code loads the rgdal library, creates and then plots a new object called wrld (Figure 1.1). T...

Table of contents

  1. Cover
  2. Half Title
  3. Acknowledgements
  4. Title Page
  5. Copyright Page
  6. Contents
  7. About the Authors
  8. Preface
  9. Introduction
  10. Acknowledgements
  11. Part I Describing how the World Looks
  12. 1 Spatial Data Visualisation with R
  13. 2 Geographical Agents in Three Dimensions
  14. 3 Scale, Power Laws, and Rank Size in Spatial Analysis
  15. Part II Exploring Movements in Space
  16. 4 Agent-Based Modeling and Geographical Information Systems
  17. 5 Microsimulation Modelling for Social Scientists
  18. 6 Spatio-Temporal Knowledge Discovery
  19. 7 Circular Statistics
  20. Part III Making Geographical Decisions
  21. 8 Geodemographic Analysis
  22. 9 Social Area Analysis and Self-Organizing Maps
  23. 10 Kernel Density Estimation and Percent Volume Contours
  24. 11 Location-Allocation Models
  25. Part IV Explaining how the World Works
  26. 12 Geographically Weighted Generalised Linear Modelling
  27. 13 Spatial Interaction Models
  28. 14 Python Spatial Analysis Library (Pysal): An Update and Illustration
  29. 15 Reproducible Research: Concepts, Techniques and Issues
  30. Part V Enabling Interactions
  31. 16 Using Crowd-Sourced Information to Analyse Changes in the Onset of the North American Spring
  32. 17 Open Source GIS Software
  33. 18 Public Participation in Geocomputation to Support Spatial Decision-Making
  34. Conclusion: The Future of Applied Geocomputation
  35. References
  36. Index