library(osmextract)
library(tidyverse)
Introduction to R
This course provides a brief introduction to R, a statistical programming language for data science that is well suited to geographic data analysis and reproducible analysis and modelling to support evidence-based transport planning.
Location
The lecture is located on Level 8 of the Worsley Building, which can be found on the campus map. As shown below, that is around a 10 minute walk from ITS. Ensure that you set-off on time, e.g. 08:30, to allow plenty of time to get lost, find the building, find the room and get set up before the lecture at 09:00.
= oe_get(place = "West Yorkshire", layer = "multipolygons")
west_yorkshire = west_yorkshire %>%
worsley_building filter(name == "Worsley Building")
::write_sf(worsley_building, "worsley_building.geojson")
sf= stplanr::route(from = "institute for transport studies leeds",
walking_route to = "worsley building leeds",
route_fun = stplanr::route_osrm
)::write_sf(walking_route, "walking_route.geojson") sf
= sf::read_sf("worsley_building.geojson")
worsley_building = sf::read_sf("walking_route.geojson")
walking_route library(tmap)
tmap_mode("view")
tmap mode set to interactive viewing
tm_shape(walking_route) +
tm_lines(lwd = 5) +
tm_shape(worsley_building) +
tm_polygons() +
tm_view(set.zoom.limits = c(15, 17)) +
tm_basemap(server = leaflet::providers$OpenStreetMap)