stats19
4.0.0Work with Open Road Traffic Casualty Data from Great Britain
Overview
Work with and download road traffic casualty data from Great Britain. Enables access to the UK's official road safety statistics, 'STATS19'. Enables users to specify a download directory for the data, which can be set permanently by adding `STATS19_DOWNLOAD_DIRECTORY=/path/to/a/dir` to your `.Renviron` file, which can be opened with `usethis::edit_r_environ()`. The data is provided as a series of `.csv` files. This package downloads, reads-in and formats the data, making it suitable for analysis. See the stats19 vignette for details. Data available from 1979 to 2024. See the official data series at https://www.data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-accidents-safety-data. The package is described in a paper in the Journal of Open Source Software (Lovelace et al. 2019) doi:10.21105/joss.01181. See Gilardi et al. (2022) doi:10.1111/rssa.12823, Vidal-Tortosa et al. (2021) doi:10.1016/j.jth.2021.101291, Tait et al. (2023) doi:10.1016/j.aap.2022.106895, and León et al. (2025) doi:10.18637/jss.v114.i09 for examples of how the data can be used for methodological and empirical research.
Install
Health
- OK2026-06-0813 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0712 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-04-2512 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-03-1011 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 38%
- Documented parameters
- 97%
- Return-value docs
- 18%
- References docs
- 0%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
9 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/ropensci/stats19 on 2026-07-19.
Show all practices
Dependencies
Nothing depends on this yet.
Code & Tests
- Cyclomatic complexity
- 2.0 median / 21 max
Test coverage
Line coverage
1%
Expression
0.4%
Tests / Examples
0.7% / 20% ex
Functions
30 17 exported
Complexity
4.2 avg / 21 max
Call network
30 nodes / 37 edges
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| accidents_sample | tbl_df/tbl/data.frame | 3 × 37 | – |
| accidents_sample_raw | tbl_df/tbl/data.frame | 3 × 37 | – |
| casualties_sample | tbl_df/tbl/data.frame | 3 × 21 | – |
| casualties_sample_raw | tbl_df/tbl/data.frame | 3 × 16 | – |
| schema_original | data.frame | 1,060 × 4 | – |
| stats19_schema | data.frame | 1,820 × 6 | – |
| stats19_variables | grouped_df/tbl_df/tbl/data.frame | 111 × 4 | – |
| vehicles_sample | tbl_df/tbl/data.frame | 3 × 34 | – |
| vehicles_sample_raw | tbl_df/tbl/data.frame | 3 × 23 | – |
People & History
21 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 4.0.0Latest
- 3.4.02025-10-09 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 3.3.12025-01-15 · diff ↗
- 3.3.02025-01-13 · diff ↗
- 3.2.02024-10-25 · diff ↗
- 3.1.02024-08-01 · diff ↗
- RR 4.4.0 released · 2024-04-24
- 3.0.32024-02-09 · diff ↗
- 3.0.22023-11-05 · diff ↗
- 3.0.02023-10-12 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 2.0.12022-11-17 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 2.0.02021-10-30 · diff ↗
Show 18 earlier events
- unarchivedReturned to CRAN2021-10-30
- archivedRemoved from CRAN2021-10-20check problems were not corrected in time
- 1.4.32021-07-21 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.4.12021-03-28 · diff ↗
- 1.4.02021-03-15 · diff ↗
- unarchivedReturned to CRAN2021-03-15
- archivedRemoved from CRAN2021-03-14check problems were not corrected in time
- 1.3.02020-10-01 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 1.2.02020-03-03 · diff ↗
- 1.1.02019-10-15 · diff ↗
- 1.0.02019-07-28 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.2.12019-04-03 · diff ↗
- 0.2.02019-02-15 · diff ↗
- 0.1.12019-01-18
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-01-18
- Total releases
- 21 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 351 KB / 12 files
- Download size
- 3.0 MB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet