roadcrash {GET}R Documentation

Road crashes

Description

Road crashes

Usage

data("roadcrash")

Format

A list with

Details

Mrkvička et al. (2023) worked with the database of road crashes reported to the Police in the Czech Republic from 1 January 2016 to 31 December 2020. The data available here is a subpattern of this full data set, included here with the permission of the Police in the Czech Republic. The full data is published as open data, see https://policyvisuals.eu/traffic-accidents-data-in-the-czech-republic/. The subpattern 7700 crashes lying on a linear network with 269 vertices and 354 lines. Further average traffic volume (number of vehicles per 24 hours), forest density and building density in the cell are available in the region of the linear network.

References

Mrkvička, T., Kraft, S., Blažek, V. and Myllymäki, M. (2023) Hotspots detection on a linear network with presence of covariates: a case study on road crash data.

Examples

if(require("spatstat.geom", quietly = TRUE) & require("spatstat.linnet", quietly = TRUE)) {
  data("roadcrash")
  win <- owin(xrange = roadcrash$xrange,
              yrange = roadcrash$yrange)
  X <- ppp(x = roadcrash$x, y = roadcrash$y, window = win)
  Vertices.pp <- ppp(x = roadcrash$Vertices.x,
                     y = roadcrash$Vertices.y,
                     window=win)
  L <- linnet(vertices=Vertices.pp,
              edges = roadcrash$Edges)
  PP <- lpp(X, L)
  z1 <- im(roadcrash$Traffic,
           xrange = roadcrash$xrange,
           yrange = roadcrash$yrange)
  z2 <- im(roadcrash$ForestDensity,
           xrange = roadcrash$xrange,
           yrange = roadcrash$yrange)
  z3 <- im(roadcrash$BuildingDensity,
           xrange = roadcrash$xrange,
           yrange = roadcrash$yrange)
}

[Package GET version 1.0-2 Index]