From 74e5a6e6412a1b347ac6da9fb4a49c0b804bae61 Mon Sep 17 00:00:00 2001 From: roblinlovelace Date: Mon, 12 Jan 2026 16:34:05 +0000 Subject: [PATCH] Add example of getting bus stop data from OSM --- s2/index.qmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/s2/index.qmd b/s2/index.qmd index 299997cb..bd6f019b 100644 --- a/s2/index.qmd +++ b/s2/index.qmd @@ -56,8 +56,17 @@ Work through the reproducible code in the "Introducing osmextract" vignette host - Reproduce the examples - Get all supermarkets in OSM for West Yorkshire +- Get all bus stops in Leeds from OSM using `osmextract` - Identify all cycleways in West Yorkshire and, using the stats19 data you have already downloaded, identify all crashes that happened near them. +Example of getting bus stops: + +```r +q = "select * from points where highway IN ('bus_stop')" +bus_stop_leeds = osmextract::oe_get("leeds", query = q) +mapview::mapview(bus_stop_leeds) +``` + ```{r} #| eval: false #| echo: false