Welcome
This is the online home of Geocomputation with R, a book on geographic data analysis, visualization and modeling.
Note: The first edition of the book has been published by CRC Press in the R Series. You can buy the book from CRC Press, or Amazon.
The archived First Edition is hosted on bookdown.org.
Inspired by the Free and Open Source Software for Geospatial (FOSS4G) movement, the code and prose underlying this book are open, ensuring that the content is reproducible, transparent, and accessible. Hosting the source code on GitHub allows anyone to interact with the project by opening issues or contributing new content and typo fixes for the benefit of everyone.
The online version of the book is hosted at r.geocompx.org and kept up-to-date by GitHub Actions. Its current ‘build status’ as follows:
This version of the book was built on GH Actions on 2024-11-07.
This book is licensed to you under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
The code samples in this book are licensed under Creative Commons CC0 1.0 Universal (CC0 1.0).
How to contribute?
bookdown makes editing a book as easy as editing a wiki, provided you have a GitHub account (sign-up at github.com). Once logged-in to GitHub, click on the ‘Edit this page’ icon in the right panel of the book website. This will take you to an editable version of the the source R Markdown file that generated the page you’re on.
To raise an issue about the book’s content (e.g., code not running) or make a feature request, check-out the issue tracker.
Maintainers and contributors must follow this repository’s CODE OF CONDUCT.
Reproducibility
The quickest way to reproduce the contents of the book if you’re new to geographic data in R may be in the web browser, thanks to Binder. Clicking on the link below should open a new window containing RStudio Server in your web browser, enabling you to open chapter files and running code chunks to test that the code is reproducible.
If you see something like the image below, congratulations, it worked! You can start exploring Geocomputation with R in a cloud-based environment, noting mybinder.org user guidelines):
To reproduce the code in the book on your own computer, you need a recent version of R and up-to-date packages. These can be installed using the remotes package.
install.packages("remotes")
install.packages('geocompkg', repos = c('https://geocompr.r-universe.dev', 'https://cloud.r-project.org'), dependencies = TRUE, force = TRUE)
After installing the book’s dependencies, you can rebuild the book for testing and educational purposes.
To do this download and unzip or clone the book’s source code.
After opening the geocompr.Rproj
project in RStudio (or opening the folder in another IDE such as VS Code), you should be able to reproduce the contents with the following command:
bookdown::serve_book(".")
See the project’s GitHub repo for full details on reproducing the book.
Getting involved
If you find the project of use and interest, you can get involved in many ways, by:
- Telling people about it
- ‘Starring’ the geocompr GitHub repository
- Communicating about the book online, via the #geocompr hashtag on Mastodon (see our Guestbook at geocompx.org) or by letting us know of courses using the book
- Citing and linking-to it
- Buying a copy
- Reviewing it, on Amazon, Goodreads or elsewhere
- Asking questions about the content or making suggestion on GitHub, Mastodon or Discord
- Answering questions, or at least responding to people asking for clarification or reproducible examples to demonstrate their question
- Helping people get started with open source software for reproducible research in general, and working with geographic data in R in particular (this can be an excellent way to consolidate and build your own skills)
- Supporting community translations
- The Spanish version: https://r.geocompx.org/es/
- The French version: https://r.geocompx.org/fr/
- The Japanese version: http://babayoshihiko.ddns.net/geo/
Further details can be found at github.com/geocompx/geocompr.
The globe icon used in this book was created by Jean-Marc Viglino and is licensed under CC-BY 4.0 International.
The book website is hosted on Netlify.