Preface
- People who have learned spatial analysis skills using a desktop Geographic Information System (GIS) such as QGIS, , GRASS or , who want access to a powerful (geo)statistical and visualization programming language and the benefits of a command-line approach (Sherman 2008):
- Academics and post-graduate students working on projects in fields including Geology, Regional Science, Biology and Ecology, Agricultural Sciences (precision farming), Archaeology, Epidemiology, Transport Modeling, and broadly defined Data Science which require the power and flexibility of R for their research
- Applied researchers and analysts in public, private or third-sector organizations who need the reproducibility, speed and flexibility of a command-line language such as R in applications dealing with spatial data as diverse as Urban and Transport Planning, Logistics, Geo-marketing (store location analysis) and Emergency Planning
The book is designed for intermediate-to-advanced R users interested in geocomputation and R beginners who have prior experience with geographic data.If you are new to both R and geographic data, do not be discouraged: we provide links to further materials and describe the nature of spatial data from a beginner’s perspective in Chapter and in links provided below.
The book is divided into three parts:
- Part I: Foundations, aimed at getting you up-to-speed with geographic data in R.
- Part III: Applications, to real-world problems.
The chapters get progressively harder in each so we recommend reading the book in order.A major barrier to geographical analysis in R is its steep learning curve.The chapters in Part I aim to address this by providing reproducible code on simple datasets that should ease the process of getting started.
An important aspect of the book from a teaching/learning perspective is the exercises at the end of each chapter.Completing these will develop your skills and equip you with the confidence needed to tackle a range of geospatial problems.Solutions to the exercises, and a number of extended examples, are provided on the book’s supporting website, at geocompr.github.io.
Impatient readers are welcome to dive straight into the practical examples, starting in Chapter .However, we recommend reading about the wider context of Geocomputation with R in Chapter 1 first.If you are new to R, we also recommend learning more about the language before attempting to run the code chunks provided in each chapter (unless you’re reading the book for an understanding of the concepts).Fortunately for R beginners R has a supportive community that has developed a wealth of resources that can help.We particularly recommend three tutorials: (Grolemund and Wickham 2016) and (Gillespie and Lovelace 2016), especially (on installing and setting-up R/RStudio) and Chapter 10 (on learning to learn), and (Venables, Smith, and Team 2017).A good interactive tutorial is DataCamp’s .
Although R has a steep learning curve, the command-line approach advocated in this book can quickly pay off.As you’ll learn in subsequent chapters, R is an effective tool for tackling a wide range of geographic data challenges.We expect that, with practice, R will become the program of choice in your geospatial toolbox for many applications.Typing and executing commands at the command-line is, in many cases, faster than pointing-and-clicking around the graphical user interface (GUI) a desktop GIS.For some applications such as Spatial Statistics and modeling R may be the only realistic way to get the work done.
Other languages such as Python, Java and C++ can be used for geocomputation and there are excellent resources for learning geocomputation without R, as discussed in Section 1.3.None of these provide the unique combination of package ecosystem, statistical capabilities, visualization options, powerful IDEs offered by the R community.Furthermore, by teaching how to use one language (R) in depth, this book will equip you with the concepts and confidence needed to do geocomputation in other languages.
Geocomputation with R will equip you with knowledge and skills to tackle a wide range of issues, including those with scientific, societal and environmental implications, manifested in geographic data.As described in Section , geocomputation is not only about using computers to process geographic data:it is also about real-world impact.If you are interested in the wider context and motivations behind this book, read on; these are covered in Chapter 1.
Many thanks to everyone who contributed directly and indirectly via the code hosting and collaboration site GitHub, including the following people who contributed direct via pull requests: , erstearns, , tyluRp, , giocomai, , rsbivand, , gisma, , annakrystalli, , Henrik-P, , yutannihilation, , katiejolly, , mvl22, , ganes1410, , SymbolixAU, , yihui, .Special thanks to Marco Sciaini, who not only created the front cover image, but also published the code that generated it (see in the book’s GitHub repo).Dozens more people contributed online, by raising and commenting on issues, and by providing feedback via social media.The hashtag will live on!
We would like to thank John Kimmel from CRC Press, who has worked with us over two years to take our ideas from an early book plan into production via four rounds of peer review.The reviewers deserve special mention here: their detailed feedback and expertise substantially improved the book’s structure and content.
Countless others could be mentioned who contributed in myriad ways.The final thank you is for all the software developers who make geocomputation with R possible.Edzer Pebesma (who created the sf package), Robert Hijmans (who created raster) and Roger Bivand (who laid the foundations for much R-spatial software) have made high performance geographic computing possible in R.
This work is licensed under a .
Sherman, Gary. 2008. Desktop GIS: Mapping the Planet with Open Source Tools. Pragmatic Bookshelf.
Grolemund, Garrett, and Hadley Wickham. 2016. R for Data Science. O’Reilly Media.
Venables, W.N., D.M. Smith, and R Core Team. 2017. An Introduction to R. Notes on R: A Programming Environment for Data Analysis and Graphics.