From 425dab284833316744639bb75df18f79b228911b Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:14:28 +0100 Subject: [PATCH 01/10] Complete proofing updates to foreword --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index 26a62170d..eebe4296d 100644 --- a/index.Rmd +++ b/index.Rmd @@ -211,7 +211,7 @@ Writing books about open source data science software that constantly changes in Besides updating the contents of this book, the authors have also been very active in helping to streamline and focus those changes in software by extensively testing it, helping improve it, writing issues and pull requests on GitHub, sharing benchmark results, and helping to improve software documentation. -The first edition of this book has been a great success. It was the first book to popularize spatial analysis with the **sf** package and **tidyverse**. Its enthusiastic tone reached a wide audience, and helped people at various levels of experience solving new problems and moving to their next level. Being available entirely freely online in addition to the printed volume gave it a large reach, and enabled users to try out the presented methodology on their own datasets. In addition to that, the authors have encouraged the readership to reach out by ways of GitHub issues, social media posts, and discussions in a discord channel. This has led to 75 people contributing to the book's source code in one way or the other, including several providing longer reviews or contributing full sections, including on Cloud-optimized GeoTIFFs, STAC and openEO; the **sfheaders** package; OGC APIs and metadata; and the `CycleHire` shiny app. On discord it has led to lively and spontaneous discussions in threads that include topics ranging from highly technical to "look what I built". +The first edition of this book has been a great success. It was the first book to popularize spatial analysis with the **sf** package and **tidyverse**. Its enthusiastic tone reached a wide audience, and helped people at various levels of experience solving new problems and moving to their next level. Being available entirely freely online in addition to the printed volume gave it a large reach, and enabled users to try out the presented methodology on their own datasets. In addition to that, the authors have encouraged the readership to reach out by ways of GitHub issues, social media posts, and discussions in a discord channel. This has led to 75 people contributing to the book's source code in one way or the other, including several providing longer reviews or contributing full sections, including on Cloud-optimized GeoTIFFs, STAC and openEO; the **sfheaders** package; OGC APIs and metadata; and the `CycleHire` shiny app. on Discord, it has led to lively and spontaneous discussions in threads that include topics ranging from highly technical to "look what I built". Beyond this, the authors have initiated the companion volume _Geocomputation with Python_, stressing that geocomputation happens with data science languages, and is by no means restricted to one of them. Geocomputation is on the rise, and as part of fostering a growing geocomputation community, writing books like this one is indispensible. From 46ae96c514b20c6c09e966c01e3359553fc0e979 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:19:29 +0100 Subject: [PATCH 02/10] typo fix in foreword --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index eebe4296d..29c842cd2 100644 --- a/index.Rmd +++ b/index.Rmd @@ -213,7 +213,7 @@ Besides updating the contents of this book, the authors have also been very acti The first edition of this book has been a great success. It was the first book to popularize spatial analysis with the **sf** package and **tidyverse**. Its enthusiastic tone reached a wide audience, and helped people at various levels of experience solving new problems and moving to their next level. Being available entirely freely online in addition to the printed volume gave it a large reach, and enabled users to try out the presented methodology on their own datasets. In addition to that, the authors have encouraged the readership to reach out by ways of GitHub issues, social media posts, and discussions in a discord channel. This has led to 75 people contributing to the book's source code in one way or the other, including several providing longer reviews or contributing full sections, including on Cloud-optimized GeoTIFFs, STAC and openEO; the **sfheaders** package; OGC APIs and metadata; and the `CycleHire` shiny app. on Discord, it has led to lively and spontaneous discussions in threads that include topics ranging from highly technical to "look what I built". -Beyond this, the authors have initiated the companion volume _Geocomputation with Python_, stressing that geocomputation happens with data science languages, and is by no means restricted to one of them. Geocomputation is on the rise, and as part of fostering a growing geocomputation community, writing books like this one is indispensible. +Beyond this, the authors have initiated the companion volume _Geocomputation with Python_, stressing that geocomputation happens with data science languages, and is by no means restricted to one of them. Geocomputation is on the rise, and as part of fostering a growing geocomputation community, writing books like this one is indispensable. Edzer Pebesma From bbd713df5d2cc4c6f19da2b770654af8989c05ca Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:20:43 +0100 Subject: [PATCH 03/10] Add "Germany, " to Foreword --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index 29c842cd2..22b52ebc5 100644 --- a/index.Rmd +++ b/index.Rmd @@ -217,7 +217,7 @@ Beyond this, the authors have initiated the companion volume _Geocomputation wit Edzer Pebesma -Münster, May 2024 +Münster, Germany, May 2024 # Preface {-} From f013e6f55f4821ff68abcc31081a4d786ac300a3 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:46:02 +0100 Subject: [PATCH 04/10] Re-word the "How to read this book" section (#1115) --- index.Rmd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.Rmd b/index.Rmd index 22b52ebc5..e126ec81f 100644 --- a/index.Rmd +++ b/index.Rmd @@ -243,10 +243,12 @@ If you are new to both R and geographic data, do not be discouraged: we provide The book is divided into three parts: 1. Part I: Foundations, aimed at getting you up-to-speed with geographic data in R. -2. Part II: Extensions, which covers advanced techniques. -3. Part III: Applications, to real-world problems. +2. Part II: Advanced techniques, including spatial data visualization, bridges to GIS software, programming with spatial data, and statistical learning. +3. Part III: Applications to real-world problems, including transportation, geomarketing and ecological modeling. -The chapters get progressively harder in each so we recommend reading the book in order. +The chapters get harder from one part to the next. +We recommend reading all chapters in Part I in order before tackling the more advanced topics in Part II and Part III. +The chapters in Part II and Part III benefit slightly from being read in order, but can be read independently if you are interested in a specific topic. 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. From 04f0f5bbb5149e190a572b0913058981632a4008 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:50:29 +0100 Subject: [PATCH 05/10] command-line -> command line --- 01-introduction.Rmd | 10 +++++----- 02-spatial-data.Rmd | 2 +- 10-gis.Rmd | 10 +++++----- 16-synthesis.Rmd | 6 +++--- code/chapters/01-introduction.R | 2 +- code/chapters/10-gis.R | 2 +- geocompr.bib | 2 +- index.Rmd | 14 +++++++------- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/01-introduction.Rmd b/01-introduction.Rmd index 69fa96fb2..936242bd3 100644 --- a/01-introduction.Rmd +++ b/01-introduction.Rmd @@ -19,7 +19,7 @@ After reading the book and completing the exercises you should be ready to tackl Over the last few decades free and open source software for geospatial (FOSS4G\index{FOSS4G}) has progressed at an astonishing rate. Thanks to organizations such as OSGeo, advanced geographic techniques are no longer the preserve of those with expensive hardware and software: anyone can now download and run high-performance software for geocomputation. Open source Geographic Information Systems (GIS\index{GIS}), such as [QGIS](https://qgis.org/en/site/)\index{QGIS}, have made geographic analysis accessible worldwide. -GIS software products are powerful, but tend to emphasize a graphical user interface\index{graphical user interface} (GUI) approach over the command-line interface (CLI) approach advocated in this book. +GIS software products are powerful, but tend to emphasize a graphical user interface\index{graphical user interface} (GUI) approach over the command line interface (CLI) approach advocated in this book. The 'GUI-focus' of many GIS products has unintended consequence of disabling many users from making their work full reproducible\index{reproducibility}, a problem that can be overcome by calling 'geoalgorithms' contained in GIS software from the command line, as we'll see in Chapter \@ref(gis). A simplistic comparison between the different approaches is illustrated in Table \@ref(tab:gdsl). @@ -38,12 +38,12 @@ Other command environments with powerful geographic capabilities exist, includin However, R has advantages that make it a good language for learning geocomputation and for many geocomputation tasks, especially for statistics, modelling and visualization, as outlined in Section \@ref(why-open-source). This book is also motivated by the importance of reproducibility\index{reproducibility} for scientific research. -It aims to make reproducible geographic data analysis\index{geographic data analysis} workflows more accessible, and demonstrate the power of open geospatial software available from the command-line. +It aims to make reproducible geographic data analysis\index{geographic data analysis} workflows more accessible, and demonstrate the power of open geospatial software available from the command line. R provides ways to interface with other languages [@eddelbuettel_extending_2018], enabling numerous spatial software libraries to be called from R, as explained in Section \@ref(why-use-r-for-geocomputation) and demonstrated in Chapter \@ref(gis). Before going into the details of the software, however, it is worth taking a step back and thinking about what we mean by geocomputation\index{geocomputation}. ```{block2 01-introduction-1, type='rmdnote'} -Reproducibility is a major advantage of command-line interfaces, but what does it mean in practice? +Reproducibility is a major advantage of command line interfaces, but what does it mean in practice? We define it as follows: "A process in which the same results can be generated by others using publicly accessible code." This may sound simple and easy to achieve (which it is if you carefully maintain your R code in script files), but has profound implications for teaching and the scientific process [@pebesma_r_2012]. @@ -94,7 +94,7 @@ This book aims to contribute to the still-evolving 'Geographic Tradition' [@livi The book's links to older disciplines were reflected in suggested titles for the book: *Geography with R* and *R for GIS*. Each has advantages. The former conveying the applied nature of the content, about more than where something is on the map. -The latter communicates that this is a book about using R as powerful command-line geographic information system, to perform spatial operations on *geographic data*. +The latter communicates that this is a book about using R as powerful command line geographic information system, to perform spatial operations on *geographic data*. However, the term GIS has connotations which fail to communicate some of R's\index{R} greatest strengths: its abilities to seamlessly switch between geographic and non-geographic data processing, modeling and visualization tasks while enabling reproducibility go far beyond the capabilities of GIS. Geocomputation\index{geocomputation} implies working with geographic data in a reproducible code-driven environment and programming new results, methods and tools, which is what this book is all about.\index{GIS!connotations} @@ -233,7 +233,7 @@ Equally important, R has unparalleled support for statistics\index{statistics}, The major advantage of Python is that it is a *general-purpose* programming language. It is used in many domains, including desktop software, computer games, websites and data science\index{data science}. Python\index{Python} is often the only shared language between different (geocomputation) communities and can be seen as the 'glue' that holds many GIS\index{GIS} programs together. -Many geoalgorithms\index{geoalgorithm}, including those in QGIS\index{QGIS} and ArcMap, can be accessed from the Python command line, making it well-suited as a starter language for command-line GIS.^[ +Many geoalgorithms\index{geoalgorithm}, including those in QGIS\index{QGIS} and ArcMap, can be accessed from the Python command line, making it well-suited as a starter language for command line GIS.^[ Python modules providing access to geoalgorithms\index{geoalgorithm} include `grass.script` for GRASS GIS\index{GRASS GIS}, `saga-python` for SAGA-GIS\index{SAGA}, `processing` for QGIS\index{QGIS} and `arcpy` for ArcGIS\index{ArcGIS}. diff --git a/02-spatial-data.Rmd b/02-spatial-data.Rmd index 0335d77c2..af91d81ae 100644 --- a/02-spatial-data.Rmd +++ b/02-spatial-data.Rmd @@ -129,7 +129,7 @@ source("https://github.com/geocompx/geocompr/raw/main/code/02-vectorplots.R") # knitr::include_graphics(c("images/vector_lonlat.png", "images/vector_projected.png")) ``` -The **sf** package provides classes for geographic vector data and a consistent command-line interface to important low level libraries for geocomputation: +The **sf** package provides classes for geographic vector data and a consistent command line interface to important low level libraries for geocomputation: - [GDAL](https://gdal.org/)\index{GDAL}, for reading, writing and manipulating a wide range of geographic data formats, covered in Chapter \@ref(read-write) - [PROJ](https://proj.org/), a powerful library for coordinate system transformations, which underlies the content covered in Chapter \@ref(reproj-geo-data) diff --git a/10-gis.Rmd b/10-gis.Rmd index e1eec6bed..6da796cb1 100644 --- a/10-gis.Rmd +++ b/10-gis.Rmd @@ -42,7 +42,7 @@ rather than relying on pointing and clicking on different parts of a screen, you A common and effective workflow when using interactive development environments such as RStudio or VS Code is to type code into source files in a source editor and control interactive execution of the code with a shortcut such as `Ctrl+Enter`. CLIs are not unique to R: most early computing environments relied on a command line 'shell' and it was only after the invention and widespread adoption of the computer mouse in the 1990s that graphical user interfaces (GUIs)\index{graphical user interface} became common. -GRASS GIS the longest-standing continuously-developed open source GIS\index{GIS} software, for example, relied on its command-line interface before it gained a GUI [@landa_new_2008]. +GRASS GIS the longest-standing continuously-developed open source GIS\index{GIS} software, for example, relied on its command line interface before it gained a GUI [@landa_new_2008]. Most popular GIS software projects are GUI-driven. You *can* interact with QGIS\index{QGIS}, SAGA\index{SAGA}, GRASS GIS\index{GRASS GIS} and gvSIG from system terminals and embedded CLIs, but their design encourages most people to interact with them by 'pointing and clicking'. An unintended consequence of this is that most GIS users miss out on the advantages of CLI-driven and scriptable approaches. @@ -73,7 +73,7 @@ Another advantage of dedicated GIS software projects is that they provide access Such bridges to these computational recipes for enhancing R's capabilities for solving geographic data problems are the topic of this chapter. ```{block2 09-gis-2, type="rmdnote"} -A command-line interface is an environment for interacting with computer programs by typing and entering successive commands (command lines). +A command line interface is an environment for interacting with computer programs by typing and entering successive commands (command lines). `bash` in Linux and `PowerShell` in Windows are well-known examples that allow the user to control almost any part of their operating system. IDEs such as RStudio and VS Code provide code auto-completion and other features to improve the user experience when developing code. ``` @@ -82,7 +82,7 @@ R is a natural choice for people wanting to build bridges between reproducible d A key feature of R (and its predecessor S) is that it provides access to statistical algorithms in other languages (particularly FORTRAN\index{FORTRAN} and C), but from a powerful high level functional language with an intuitive REPL environment, which C and FORTRAN lacked [@chambers_extending_2016]. R continues this tradition with interfaces to numerous languages, notably C++\index{C++}. -Although R was not designed as a command-line GIS, its ability to interface with dedicated GISs gives it astonishing geospatial capabilities. +Although R was not designed as a command line GIS, its ability to interface with dedicated GISs gives it astonishing geospatial capabilities. With GIS bridges, R can replicate more diverse workflows, with the additional reproducibility, scalability and productity benefits of controlling them from a programming environment and a consistent CLI. Furthermore, R outperforms GISs in some areas of geocomputation\index{geocomputation}, including interactive/animated map making (see Chapter \@ref(adv-map)) and spatial statistical modeling (see Chapter \@ref(spatial-cv)). @@ -481,7 +481,7 @@ knitr::include_graphics("images/10-qgis-raster-map.png") ## SAGA {#saga} -The System for Automated Geoscientific Analyses (SAGA\index{SAGA}; Table \@ref(tab:gis-comp)) provides the possibility to execute SAGA modules via the command line interface\index{command-line interface} (`saga_cmd.exe` under Windows and just `saga_cmd` under Linux) (see the [SAGA wiki on modules](https://sourceforge.net/p/saga-gis/wiki/Executing%20Modules%20with%20SAGA%20CMD/)). +The System for Automated Geoscientific Analyses (SAGA\index{SAGA}; Table \@ref(tab:gis-comp)) provides the possibility to execute SAGA modules via the command line interface\index{command line interface} (`saga_cmd.exe` under Windows and just `saga_cmd` under Linux) (see the [SAGA wiki on modules](https://sourceforge.net/p/saga-gis/wiki/Executing%20Modules%20with%20SAGA%20CMD/)). In addition, there is a Python interface (SAGA Python API\index{API}). **Rsagacmd**\index{Rsagacmd (package)} uses the former to run SAGA\index{SAGA} from within R. @@ -939,7 +939,7 @@ tm_shape(buf) + ``` Unlike PostGIS, **sf** only supports spatial vector data. -To query and manipulate raster data stored in a PostGIS database, use the **rpostgis** package [@bucklin_rpostgis_2018] and/or use command-line tools such as `rastertopgsql` which comes as part of the PostGIS\index{PostGIS} installation. +To query and manipulate raster data stored in a PostGIS database, use the **rpostgis** package [@bucklin_rpostgis_2018] and/or use command line tools such as `rastertopgsql` which comes as part of the PostGIS\index{PostGIS} installation. This subsection is only a brief introduction to PostgreSQL/PostGIS. Nevertheless, we would like to encourage the practice of storing geographic and non-geographic data in a spatial DBMS\index{spatial database} while only attaching those subsets to R's global environment which are needed for further (geo-)statistical analysis. diff --git a/16-synthesis.Rmd b/16-synthesis.Rmd index 157e3e769..8c7b93ae7 100644 --- a/16-synthesis.Rmd +++ b/16-synthesis.Rmd @@ -261,7 +261,7 @@ See [*Geocomputation with Python*](https://py.geocompx.org/), for an introductio Dozens of geospatial libraries have been developed in C++\index{C++}, including well known libraries such as GDAL\index{GDAL} and GEOS\index{GEOS}, and less well known libraries such as the **[Orfeo Toolbox](https://github.com/orfeotoolbox/OTB)** for processing remote sensing (raster) data. [**Turf.js**](https://github.com/Turfjs/turf) is an example of the potential for doing geocomputation with JavaScript. [GeoTrellis](https://geotrellis.io/) provides functions for working with raster and vector data in the Java-based language Scala. -And [WhiteBoxTools](https://github.com/jblindsay/whitebox-tools) provides an example of a rapidly evolving command-line GIS implemented in Rust. +And [WhiteBoxTools](https://github.com/jblindsay/whitebox-tools) provides an example of a rapidly evolving command line GIS implemented in Rust. \index{Rust} \index{WhiteboxTools} Each of these packages/libraries/languages has advantages for geocomputation and there are many more to discover, as documented in the curated list of open source geospatial resources [Awesome-Geospatial](https://github.com/sacridini/Awesome-Geospatial). @@ -298,10 +298,10 @@ Reproducibility\index{reproducibility}: - Discourages people from 'reinventing the wheel': there is no need to re-do what others have done if their methods can be used by others - Makes research more conducive to real world applications, by enabling anyone in any sector to apply your methods in new areas -If reproducibility is the defining asset of geocomputation (or command-line GIS) it is worth considering what makes it reproducible. +If reproducibility is the defining asset of geocomputation (or command line GIS) it is worth considering what makes it reproducible. This brings us to the 'open source approach', which has three main components: -- A command-line interface\index{command-line interface} (CLI), encouraging scripts recording geographic work to be shared and reproduced +- A command line interface\index{command line interface} (CLI), encouraging scripts recording geographic work to be shared and reproduced - Open source software, which can be inspected and potentially improved by anyone in the world - An active user and developer community, which collaborates and self-organizes to build complementary and modular tools diff --git a/code/chapters/01-introduction.R b/code/chapters/01-introduction.R index 32ad25376..290449bc9 100644 --- a/code/chapters/01-introduction.R +++ b/code/chapters/01-introduction.R @@ -11,7 +11,7 @@ knitr::kable(x = d, booktabs = TRUE) -## Reproducibility is a major advantage of command-line interfaces, but what does it mean in practice? +## Reproducibility is a major advantage of command line interfaces, but what does it mean in practice? ## We define it as follows: "A process in which the same results can be generated by others using publicly accessible code." diff --git a/code/chapters/10-gis.R b/code/chapters/10-gis.R index ed7618ef9..02bb9d55f 100644 --- a/code/chapters/10-gis.R +++ b/code/chapters/10-gis.R @@ -12,7 +12,7 @@ library(terra) ## library(gdalcubes) -## A command-line interface is a means of interacting with computer programs in which the user issues commands via successive lines of text (command lines). +## A command line interface is a means of interacting with computer programs in which the user issues commands via successive lines of text (command lines). ## `bash` in Linux and `PowerShell` in Windows are its common examples. diff --git a/geocompr.bib b/geocompr.bib index 0c38f906c..99774c342 100644 --- a/geocompr.bib +++ b/geocompr.bib @@ -1305,7 +1305,7 @@ @article{lovelace_open_2021 issn = {1435-5949}, doi = {10/ghtnrp}, urldate = {2021-01-17}, - abstract = {Geographic analysis has long supported transport plans that are appropriate to local contexts. Many incumbent `tools of the trade' are proprietary and were developed to support growth in motor traffic, limiting their utility for transport planners who have been tasked with twenty-first century objectives such as enabling citizen participation, reducing pollution, and increasing levels of physical activity by getting more people walking and cycling. Geographic techniques---such as route analysis, network editing, localised impact assessment and interactive map visualisation---have great potential to support modern transport planning priorities. The aim of this paper is to explore emerging open source tools for geographic analysis in transport planning, with reference to the literature and a review of open source tools that are already being used. A key finding is that a growing number of options exist, challenging the current landscape of proprietary tools. These can be classified as command-line interface, graphical user interface or web-based user interface tools and by the framework in which they were implemented, with numerous tools released as R, Python and JavaScript packages, and QGIS plugins. The review found a diverse and rapidly evolving `ecosystem' tools, with 25 tools that were designed for geographic analysis to support transport planning outlined in terms of their popularity and functionality based on online documentation. They ranged in size from single-purpose tools such as the QGIS plugin AwaP to sophisticated stand-alone multi-modal traffic simulation software such as MATSim, SUMO and Veins. Building on their ability to re-use the most effective components from other open source projects, developers of open source transport planning tools can avoid `reinventing the wheel' and focus on innovation, the `gamified' A/B Street https://github.com/dabreegster/abstreet/\#abstreetsimulation software, based on OpenStreetMap, a case in point. The paper, the source code of which can be found at https://github.com/robinlovelace/open-gat, concludes that, although many of the tools reviewed are still evolving and further research is needed to understand their relative strengths and barriers to uptake, open source tools for geographic analysis in transport planning already hold great potential to help generate the strategic visions of change and evidence that is needed by transport planners in the twenty-first century.}, + abstract = {Geographic analysis has long supported transport plans that are appropriate to local contexts. Many incumbent `tools of the trade' are proprietary and were developed to support growth in motor traffic, limiting their utility for transport planners who have been tasked with twenty-first century objectives such as enabling citizen participation, reducing pollution, and increasing levels of physical activity by getting more people walking and cycling. Geographic techniques---such as route analysis, network editing, localised impact assessment and interactive map visualisation---have great potential to support modern transport planning priorities. The aim of this paper is to explore emerging open source tools for geographic analysis in transport planning, with reference to the literature and a review of open source tools that are already being used. A key finding is that a growing number of options exist, challenging the current landscape of proprietary tools. These can be classified as command line interface, graphical user interface or web-based user interface tools and by the framework in which they were implemented, with numerous tools released as R, Python and JavaScript packages, and QGIS plugins. The review found a diverse and rapidly evolving `ecosystem' tools, with 25 tools that were designed for geographic analysis to support transport planning outlined in terms of their popularity and functionality based on online documentation. They ranged in size from single-purpose tools such as the QGIS plugin AwaP to sophisticated stand-alone multi-modal traffic simulation software such as MATSim, SUMO and Veins. Building on their ability to re-use the most effective components from other open source projects, developers of open source transport planning tools can avoid `reinventing the wheel' and focus on innovation, the `gamified' A/B Street https://github.com/dabreegster/abstreet/\#abstreetsimulation software, based on OpenStreetMap, a case in point. The paper, the source code of which can be found at https://github.com/robinlovelace/open-gat, concludes that, although many of the tools reviewed are still evolving and further research is needed to understand their relative strengths and barriers to uptake, open source tools for geographic analysis in transport planning already hold great potential to help generate the strategic visions of change and evidence that is needed by transport planners in the twenty-first century.}, langid = {english} } diff --git a/index.Rmd b/index.Rmd index e126ec81f..61774b13e 100644 --- a/index.Rmd +++ b/index.Rmd @@ -194,7 +194,7 @@ This might include teaching materials, software, research practices (reproducibl R users have also benefitted greatly from 'upstream' open source geo libraries such as GDAL, GEOS and PROJ. This book is a clear example that, if you are curious and willing to join in, you can find things that need doing and that match your aptitudes. -With advances in data representation and workflow alternatives, and ever increasing numbers of new users often without applied quantitative command-line exposure, a book of this kind has really been needed. +With advances in data representation and workflow alternatives, and ever increasing numbers of new users often without applied quantitative command line exposure, a book of this kind has really been needed. Despite the effort involved, the authors have supported each other in pressing forward to publication. So, this fresh book is ready to go; its authors have tried it out during many tutorials and workshops, so readers and instructors will be able to benefit from knowing that the contents have been and continue to be tried out on people like them. @@ -227,13 +227,13 @@ This book is for people who want to analyze, visualize and model geographic data It is based on R, a statistical programming language that has powerful data processing, visualization and geospatial capabilities. The book covers a wide range of topics and will be of interest to a wide range of people from many different backgrounds, especially: -- People who have learned spatial analysis skills using a desktop Geographic Information System (GIS), such as [QGIS](https://qgis.org/en/site/), [ArcGIS](http://desktop.arcgis.com/en/arcmap/), [GRASS GIS](https://grass.osgeo.org/) or [SAGA](https://saga-gis.sourceforge.io/en/index.html), who want access to a powerful (geo)statistical and visualization programming language and the benefits of a command-line approach [@sherman_desktop_2008]: +- People who have learned spatial analysis skills using a desktop Geographic Information System (GIS), such as [QGIS](https://qgis.org/en/site/), [ArcGIS](http://desktop.arcgis.com/en/arcmap/), [GRASS GIS](https://grass.osgeo.org/) or [SAGA](https://saga-gis.sourceforge.io/en/index.html), who want access to a powerful (geo)statistical and visualization programming language and the benefits of a command line approach [@sherman_desktop_2008]: > 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. - Graduate students and researchers from fields specializing in geographic data including Geography, Remote Sensing, Planning, GIS and Spatial Data Science - Academics and post-graduate students working with geographic data --- in fields such as Geology, Regional Science, Biology and Ecology, Agricultural Sciences, Archaeology, Epidemiology, Transport Modeling, and broadly defined Data Science --- who 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 +- 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 \@ref(spatial-class) and in links provided below. @@ -261,15 +261,15 @@ More blog posts and examples can be found at [geocompx.org](https://geocompx.org Impatient readers are welcome to dive straight into the practical examples, starting in Chapter \@ref(spatial-class). However, we recommend reading about the wider context of *Geocomputation with R* in Chapter \@ref(intro) 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: [R for Data Science](https://r4ds.had.co.nz/) [@grolemund_r_2016] and [Efficient R Programming](https://csgillespie.github.io/efficientR/) [@gillespie_efficient_2016], and [An introduction to R](http://colinfay.me/intro-to-r/) [@rcoreteam_introduction_2021]. +Fortunately for beginners, R has a supportive community that has developed a wealth of resources that can help. +We particularly recommend three tutorials: [R for Data Science](https://r4ds.had.co.nz/) [@grolemund_r_2016] [Efficient R Programming](https://csgillespie.github.io/efficientR/) [@gillespie_efficient_2016], and [An introduction to R](http://colinfay.me/intro-to-r/) [@rcoreteam_introduction_2021]. ## Why R? {-} -Although R has a steep learning curve, the command-line approach advocated in this book can quickly pay off. +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) of a desktop GIS. +Typing and executing commands at the command line is, in many cases, faster than pointing-and-clicking around the graphical user interface (GUI) of a desktop GIS. For some applications such as Spatial Statistics and modeling R may be the *only* realistic way to get the work done. As outlined in Section \@ref(why-use-r-for-geocomputation), there are many reasons for using R for geocomputation: From 439f3a6d3e9bc0d41004f9af9e3f0defcfde410d Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:52:24 +0100 Subject: [PATCH 06/10] Well-suited -> well suited --- 01-introduction.Rmd | 2 +- 10-gis.Rmd | 2 +- 13-transport.Rmd | 2 +- index.Rmd | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/01-introduction.Rmd b/01-introduction.Rmd index 936242bd3..3802c0fd9 100644 --- a/01-introduction.Rmd +++ b/01-introduction.Rmd @@ -233,7 +233,7 @@ Equally important, R has unparalleled support for statistics\index{statistics}, The major advantage of Python is that it is a *general-purpose* programming language. It is used in many domains, including desktop software, computer games, websites and data science\index{data science}. Python\index{Python} is often the only shared language between different (geocomputation) communities and can be seen as the 'glue' that holds many GIS\index{GIS} programs together. -Many geoalgorithms\index{geoalgorithm}, including those in QGIS\index{QGIS} and ArcMap, can be accessed from the Python command line, making it well-suited as a starter language for command line GIS.^[ +Many geoalgorithms\index{geoalgorithm}, including those in QGIS\index{QGIS} and ArcMap, can be accessed from the Python command line, making it well suited as a starter language for command line GIS.^[ Python modules providing access to geoalgorithms\index{geoalgorithm} include `grass.script` for GRASS GIS\index{GRASS GIS}, `saga-python` for SAGA-GIS\index{SAGA}, `processing` for QGIS\index{QGIS} and `arcpy` for ArcGIS\index{ArcGIS}. diff --git a/10-gis.Rmd b/10-gis.Rmd index 6da796cb1..ec242c9e8 100644 --- a/10-gis.Rmd +++ b/10-gis.Rmd @@ -50,7 +50,7 @@ According to the creator of the popular QGIS software [@sherman_desktop_2008]: > 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. -The 'CLI vs GUI' debate does not have to be adverserial: both ways of working have advantages, depending on a range of factors including the task (with drawing new features being well-suited to GUIs), the level of reproducibility desired, and the user's skillset. +The 'CLI vs GUI' debate does not have to be adverserial: both ways of working have advantages, depending on a range of factors including the task (with drawing new features being well suited to GUIs), the level of reproducibility desired, and the user's skillset. GRASS GIS is a good example of GIS software that is primarily based on a CLI but which also has a prominent GUI. Likewise, while R is focused on its CLI, IDEs such as RStudio provide a GUI for improving accessibility. Software cannot be neatly categorised into CLI-based or GUI-based. diff --git a/13-transport.Rmd b/13-transport.Rmd index 77c375e63..1917889c5 100644 --- a/13-transport.Rmd +++ b/13-transport.Rmd @@ -475,7 +475,7 @@ Options include [**sfnetworks**](https://luukvdmeer.github.io/sfnetworks/)\index While fast and flexible, native R routing options are generally harder to set-up than dedicated routing engines for realistic route calculation. Routing is a hard problem and many hundreds of hours have been put into open source routing engines that can be downloaded and hosted locally. -On the other hand, R-based routing engines may be well-suited to model experiments and the statistical analysis of the impacts of changes on the network. +On the other hand, R-based routing engines may be well suited to model experiments and the statistical analysis of the impacts of changes on the network. Changing route network characteristics (or weights associated with different route segment types), re-calculating routes, and analyzing results under many scenarios in a single language has benefits for research applications. ### Locally hosted dedicated routing engines {#localengine} diff --git a/index.Rmd b/index.Rmd index 61774b13e..cfaf9a059 100644 --- a/index.Rmd +++ b/index.Rmd @@ -270,10 +270,10 @@ Although R has a steep learning curve, the command line approach advocated in th 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) of a desktop GIS. -For some applications such as Spatial Statistics and modeling R may be the *only* realistic way to get the work done. +For some applications such as Spatial Statistics and modeling, R may be the *only* realistic way to get the work done. As outlined in Section \@ref(why-use-r-for-geocomputation), there are many reasons for using R for geocomputation: -R is well-suited to the interactive use required in many geographic data analysis workflows compared with other languages. +R is well suited to the interactive use required in many geographic data analysis workflows compared with other languages. R excels in the rapidly growing fields of Data Science (which includes data carpentry, statistical learning techniques and data visualization) and Big Data (via efficient interfaces to databases and distributed computing systems). Furthermore R enables a reproducible workflow: sharing scripts underlying your analysis will allow others to build-on your work. To ensure reproducibility in this book we have made its source code available at [github.com/geocompx/geocompr](https://github.com/geocompx/geocompr#geocomputation-with-r). From d7f4e6362a1ee24047d4e6d0c950e642eae8097c Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 21:55:44 +0100 Subject: [PATCH 07/10] Build on not build-on --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index cfaf9a059..4605494bb 100644 --- a/index.Rmd +++ b/index.Rmd @@ -275,7 +275,7 @@ For some applications such as Spatial Statistics and modeling, R may be the *onl As outlined in Section \@ref(why-use-r-for-geocomputation), there are many reasons for using R for geocomputation: R is well suited to the interactive use required in many geographic data analysis workflows compared with other languages. R excels in the rapidly growing fields of Data Science (which includes data carpentry, statistical learning techniques and data visualization) and Big Data (via efficient interfaces to databases and distributed computing systems). -Furthermore R enables a reproducible workflow: sharing scripts underlying your analysis will allow others to build-on your work. +Furthermore, R enables a reproducible workflow: sharing scripts underlying your analysis will allow others to build on your work. To ensure reproducibility in this book we have made its source code available at [github.com/geocompx/geocompr](https://github.com/geocompx/geocompr#geocomputation-with-r). There you will find script files in the `code/` folder that generate figures: when code generating a figure is not provided in the main text of the book, the name of the script file that generated it is provided in the caption (see for example the caption for Figure \@ref(fig:zones)). From a5bbd071c74db41506c01fd50a0f99b987fa5878 Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 22:03:23 +0100 Subject: [PATCH 08/10] Typo fixes in preface --- index.Rmd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.Rmd b/index.Rmd index 4605494bb..254d868f5 100644 --- a/index.Rmd +++ b/index.Rmd @@ -280,18 +280,18 @@ To ensure reproducibility in this book we have made its source code available at There you will find script files in the `code/` folder that generate figures: when code generating a figure is not provided in the main text of the book, the name of the script file that generated it is provided in the caption (see for example the caption for Figure \@ref(fig:zones)). -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 \@ref(software-for-geocomputation). -None of these provide the unique combination of package ecosystem, statistical capabilities, visualization options, powerful IDEs offered by the R community. +Other languages such as Python, Java and C++ can be used for geocomputation. +There are excellent resources for learning geocomputation *without R*, as discussed in Section \@ref(software-for-geocomputation). +None of these provide the unique combination of package ecosystem, statistical capabilities, and visualization options 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. ## Real-world impact {-} *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 \@ref(what-is-geocomputation), geocomputation is not only about using computers to process geographic data: -it is also about real-world impact. +As described in Section \@ref(what-is-geocomputation), geocomputation is not only about using computers to process geographic data, it is also about real-world impact. The wider context and motivations underlying this book are covered in Chapter \@ref(intro). -## Acknowledgements {-} +## Acknowledgments {-} ```{r contrib-preface, include=FALSE} contributors = readr::read_csv("extdata/contributors.csv") From 19a81bbad354ae534f645224f4007446d36461cb Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 22:03:57 +0100 Subject: [PATCH 09/10] Add "and " to list of contributors --- index.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.Rmd b/index.Rmd index 254d868f5..7f5e18855 100644 --- a/index.Rmd +++ b/index.Rmd @@ -298,7 +298,7 @@ contributors = readr::read_csv("extdata/contributors.csv") c_txt = contributors$name c_url = contributors$link c_rmd = paste0("[", c_txt, "](", c_url, ")") -contributors_text = paste0(c_txt, collapse = ", ") +contributors_text = paste0(paste0(c_txt[-length(c_txt)], collapse = ", "), ", and ", c_txt[length(c_txt)]) ``` 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: `r contributors_text`. From c7898c920c18f48c04f3d05d07138d5a5a65725c Mon Sep 17 00:00:00 2001 From: robinlovelace Date: Mon, 23 Sep 2024 22:07:09 +0100 Subject: [PATCH 10/10] input into -> contributions to, complete preface changes --- index.Rmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.Rmd b/index.Rmd index 7f5e18855..84c8ba7c4 100644 --- a/index.Rmd +++ b/index.Rmd @@ -307,14 +307,14 @@ See `code/frontcover.R` and `code/frontcover2.R` for the reproducible code that Dozens more people contributed online, by raising and commenting on issues, and by providing feedback via social media. The `#geocompr` and `geocompx` hashtags will live on! -We would like to thank John Kimmel and Lara Spieker from CRC Press and Taylor and Francis for taking our ideas from an early book plan into production via four rounds of peer review for each edition. -The reviewers deserve special mention here: their detailed feedback and expertise substantially improved the book's structure and content. +We would like to thank John Kimmel and Lara Spieker from CRC Press and Taylor & Francis for taking our ideas from an early book plan into production via four rounds of peer review for each edition. +The reviewers deserve special mention here for their detailed feedback and expertise substantially improved the book's structure and content. -We thank Patrick Schratz and Alexander Brenning from the University of Jena for fruitful discussions on and input into Chapters \@ref(spatial-cv) and \@ref(eco). -We thank Emmanuel Blondel from the Food and Agriculture Organization of the United Nations for expert input into the section on web services; -Michael Sumner for critical input into many areas of the book, especially the discussion of algorithms in Chapter 11; +We thank Patrick Schratz and Alexander Brenning from the University of Jena for fruitful discussions on and contributions to Chapters \@ref(spatial-cv) and \@ref(eco). +We thank Emmanuel Blondel from the Food and Agriculture Organization of the United Nations for expert contributions to the section on web services; +Michael Sumner for critical contributions to many areas of the book, especially the discussion of algorithms in Chapter 11; Tim Appelhans, David Cooley and Kiranmayi Vadlamudi for key contributions to the visualization chapter (Chapter 9); -Marius Appel for his input into Chapter 10; +Marius Appel for his contributions to Chapter 10; and Katy Gregg, who proofread every chapter and greatly improved the readability of the book. Countless others could be mentioned who contributed in myriad ways.