From 425164ecbcafe84a78803f0da40d317a1f2d0035 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 5 Oct 2021 14:26:00 +0100 Subject: [PATCH 1/2] Update 07-read-write-plot.Rmd --- 07-read-write-plot.Rmd | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/07-read-write-plot.Rmd b/07-read-write-plot.Rmd index d10cdf531..3d7303a64 100644 --- a/07-read-write-plot.Rmd +++ b/07-read-write-plot.Rmd @@ -59,14 +59,15 @@ usa_parks = st_read(dsn = "nps_boundary.shp") ## Geographic data packages \index{data packages} -A multitude of R packages have been developed for accessing geographic data, some of which are presented in Table \@ref(tab:datapackages). +Many R packages have been developed for accessing geographic data, some of which are presented in Table \@ref(tab:datapackages). These provide interfaces to one or more spatial libraries or geoportals and aim to make data access even quicker from the command line. ```{r datapackages, echo=FALSE, warning=FALSE} datapackages = tibble::tribble( ~`Package`, ~Description, "getlandsat", "Provides access to Landsat 8 data.", - "osmdata", "Download and import of OpenStreetMap data.", + "osmdata", "Download and import small OpenStreetMap datasets.", + "osmextract", "Download and import large OpenStreetMap datasets.", "raster", "getData() imports administrative, elevation, WorldClim data.", "rnaturalearth", "Access to Natural Earth vector and raster data.", "rnoaa", "Imports National Oceanic and Atmospheric Administration (NOAA) climate data.", @@ -140,9 +141,14 @@ parks = opq(bbox = "leeds uk") %>% osmdata_sf() ``` -OpenStreetMap is a vast global database of crowd-sourced data and it is growing daily. -Although the quality is not as spatially consistent as many official datasets, OSM data have many advantages: they are globally available free of charge and using crowd-source data can encourage 'citizen science' and contributions back to the digital commons. -Further examples of **osmdata** in action are provided in Chapters \@ref(gis), \@ref(transport) and \@ref(location). +A limitation with the **osmdata** package is that it is *rate limited*, meaning that it cannot download large OSM datasets (e.g. all the OSM data for a large city). +To overcome this limitation, the **osmextract** package was developed, which can be used to download and import binary `.pbf` files containing compressed versions of the OSM database for pre-defined regions. + + +OpenStreetMap is a vast global database of crowd-sourced data, is growing daily, and has a wider ecosystem of tools enabling easy access to the data, from the [Overpass turbo](https://overpass-turbo.eu/) web service for rapid development and testing of OSM queries to the [osm2pgsql](https://osm2pgsql.org/) for importing the data into a PostGIS database. +Although the quality of datasets derived from OSM varies, the data source and wider OSM ecosystems have many advantages: they provide datasets that are available globally, free of charge, and constantly improving thanks to an army of volunteers. +Using OSM encourages 'citizen science' and contributions back to the digital commons (you can start editing data representing a part of the world you know well at [www.openstreetmap.org](https://www.openstreetmap.org)). +Further examples of OSM data in action are provided in Chapters \@ref(gis), \@ref(transport) and \@ref(location). Sometimes, packages come with inbuilt datasets. These can be accessed in four ways: by attaching the package (if the package uses 'lazy loading' as **spData** does), with `data(dataset)`, by referring to the dataset with `pkg::dataset` or with `system.file()` to access raw data files. From 11c31339fef28c60709541632853c6c214cb8b72 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 5 Oct 2021 15:18:04 +0100 Subject: [PATCH 2/2] Update 07-read-write-plot.Rmd --- 07-read-write-plot.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/07-read-write-plot.Rmd b/07-read-write-plot.Rmd index 3d7303a64..a8ed12776 100644 --- a/07-read-write-plot.Rmd +++ b/07-read-write-plot.Rmd @@ -145,7 +145,7 @@ A limitation with the **osmdata** package is that it is *rate limited*, meaning To overcome this limitation, the **osmextract** package was developed, which can be used to download and import binary `.pbf` files containing compressed versions of the OSM database for pre-defined regions. -OpenStreetMap is a vast global database of crowd-sourced data, is growing daily, and has a wider ecosystem of tools enabling easy access to the data, from the [Overpass turbo](https://overpass-turbo.eu/) web service for rapid development and testing of OSM queries to the [osm2pgsql](https://osm2pgsql.org/) for importing the data into a PostGIS database. +OpenStreetMap is a vast global database of crowd-sourced data, is growing daily, and has a wider ecosystem of tools enabling easy access to the data, from the [Overpass turbo](https://overpass-turbo.eu/) web service for rapid development and testing of OSM queries to [osm2pgsql](https://osm2pgsql.org/) for importing the data into a PostGIS database. Although the quality of datasets derived from OSM varies, the data source and wider OSM ecosystems have many advantages: they provide datasets that are available globally, free of charge, and constantly improving thanks to an army of volunteers. Using OSM encourages 'citizen science' and contributions back to the digital commons (you can start editing data representing a part of the world you know well at [www.openstreetmap.org](https://www.openstreetmap.org)). Further examples of OSM data in action are provided in Chapters \@ref(gis), \@ref(transport) and \@ref(location).