library(sf)
library(spDataLarge)

E1. In much of the analysis presented in the chapter, we focused on active modes, but what about driving trips?

sum(desire_lines$car_driver) / sum(desire_lines$all)
# 57%
desire_lines_5km_plus = desire_lines |> 
  filter(distance_km > 5)
# Just over are half ar 5km+, 54%:
nrow(desire_lines_5km_plus) / nrow(desire_lines)
# 71 of 5km+ trips are made by car
sum(desire_lines_5km_plus$car_driver) / sum(desire_lines_5km_plus$all)

desire_lines_driving = desire_lines |> 
  mutate(`Proportion driving` = car_driver / all) |> 
  filter(`Proportion driving` > 0.5)
nrow(desire_lines_5km_plus_driving) / nrow(desire_lines)

desire_lines_5km_less_50_pct_driving = desire_lines |>
  filter(distance_km <= 5) |> 
  mutate(`Proportion driving` = car_driver / all) |> 
  filter(`Proportion driving` > 0.5)
desire_lines_5km_less_50_pct_driving |> 
  tm_shape() +
  tm_lines("Proportion driving")

E2. What additional length of cycleways would be built if all the sections beyond 100 m from existing cycleways in Figure 13.8, were constructed?

sum(st_length(route_network_no_infra))
# 104193.6 [m]
# Just over 100 km

E3. What proportion of trips represented in the desire_lines are accounted for in the routes_short_scenario object?

sum(routes_short_scenario$all) / sum(desire_lines$all) # 13%
d_intersect = desire_lines[routes_short_scenario, , op = st_crosses]
sum(d_intersect$all) / sum(desire_lines$all) # 88%

E4. The analysis presented in this chapter is designed for teaching how geocomputation methods can be applied to transport research. If you were doing this for real, in government or for a transport consultancy, what top 3 things would you do differently?

# Higher level of geographic resolution.
# Use cycle-specific routing services.
# Identify key walking routes.
# Include a higher proportion of trips in the analysis

E5. Clearly, the routes identified in Figure 13.8 only provide part of the picture. How would you extend the analysis?

E6. Imagine that you want to extend the scenario by creating key areas (not routes) for investment in place-based cycling policies such as car-free zones, cycle parking points and reduced car parking strategy. How could raster\index{raster} datasets assist with this work?



Robinlovelace/geocompr documentation built on June 14, 2025, 1:21 p.m.