knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

This vignette provides a brief introduction to the roadworksUK package, building on the content in the package's README.

Input roadworks data

The EtON specification is set-out in @highwayauthoritiesandutilitiescommittee_technical_2013. The specification is clear but there are many ways to interpret it and there is little in the way of standardisation. File format for exchanging data vary, even at the level of individual roadworks, the starting point for many roadworks analysis projects.

Roadworks data used in this package were provided by Elgin. An example is htdd_ashford, a dataset representing all roadworks in Ashford in the in June quarter of 2018. Its dimensions and column names are queried below:

library(roadworksUK)
nrow(htdd_ashford)
ncol(htdd_ashford)
names(htdd_ashford)

Aggregation of roadworks data

Roadworks data do not plot spatially by defualt. The sf package needs to be loaded and spatial columns need to be specified. The spatial columns can be identified as follows:

cols_sf = names(htdd_ashford)[sapply(htdd_ashford, is, "sfc")]
cols_sf

Any of these can be plotted in geographic space as follows:

library(sf)
plot(htdd_ashford$e__location_point)
# st_geometry_type(htdd_ashford[[cols_sf[1]]])
# sapply(cols_sf, function(x) summary(st_geometry_type(htdd_ashford[[x]])))

Discussion and next steps

This project has demonstrated how the 'barrier to entry' to the complex world of roadworks data can be reduced with modern open source software. Like the oneminutetrafficdata project [@hudlass-galley_oneminutetrafficdata_2017], it has resulted not only in a write-up, but also software in the form of an R package. Getting the data into a statistical analysis environment will the data more accessible to stakeholders, with the potential to inform policies and operations around roadworks.

Another element is the international context. In Scotland roadworks are governed by the devolved Scottish Road Works Commissioner (SRWC), who have recently taken the step of opening-up their data so it is publicly accessible [@transportscotland_raising_2018]. With some reservations about data privacy there seemed to be overwhelming support for this policy, with one respondent to their consultation saying:

Streets are public spaces, so information on how they are managed (even by private companies) should be publicly available.

Unlike public transport data feeds, which are supported by GTFS, there is no internationally agreed data standard for streetworks data. We hope that some of the ideas presented in this report, and the associated roadworksUK R package, could provide a stimulus for work in this direction: the UK is well-placed with some of the best national datasets and most detailed specification documents in the world.

References

f = list.files(pattern = "png")
piggyback::pb_upload(f)


ITSLeeds/roadworksUK documentation built on May 31, 2019, 5:18 p.m.