Skip to content

stats19

4.1.0Package record

Work with Open Road Traffic Casualty Data from Great Britain

0packages depend
10.2Kdownloads / year
0.8%test coverage
13/13flavors OK

Overview

About
Maintained by Robin LovelaceCRAN page ↗GitHub ↗Website ↗Issues ↗Declared funder: RAC Foundation

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 2025. 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.

Changes in 4.1.0
  • **Support for 2025 Data**: Full support for the newly published 2025 STATS19 casualty, vehicle, and collision dataset from the Department for Transport (fixes #315).
  • **Documentation and Dataset Updates**: Updated dataset list, documentation, examples, and metadata for 1979-2025 coverage (fixes #315).
  • **Citation Prompt on Attach**: Added package citation details (Lovelace et al. 2019) and citation("stats19") instructions to the package startup message.
  • **Bug Fixes & Data Quality Improvements**:
  • Preserved character class for alphanumeric collision indices, avoiding NA coercions (fixes #231).
  • Eliminated unmatched parser warnings during dataset loading (fixes #257).
  • Ensured valid POSIXct datetime creation for midnight 00:00 timestamps (fixes #236).
  • Enhanced vehicle make cleaning rules for Freight Rover and Austin Morris (fixes #296).

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.0 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-09-08
  • ERROR12 OK, 1 ERROR2026-09-07
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-08
Show 3 earlier changesHide 3 earlier changes
  • ERROR12 OK, 1 ERROR2026-06-07
  • OK12 OK2026-04-25
  • NOTE11 OK, 3 NOTE2026-03-10
Advisories

none known

Documentation

In release 4.1.0
READMEYes · 1,985 wordsVignettesYes · 9 · dynamicNEWSYes · 100% structured · mentions 4.1.0Citation fileYes · cites a publicationWebsiteYes · pkgdown
Cites a JOSS paper
Help pages
35
Examples that run
36%9 run in a plain check (1 of them under a condition) · 13 only when donttest examples are enabled (R CMD check --as-cran) · 2 never run · 1 hold no code
Exported functions with examples
77%
Documented parameters
97%
Return-value docs
12%
Help pages citing references
0%

Downloads

10.2K
CRAN downloads in the past year
Rank #4,052 · ~28/day · ~853/mo
Daily download trend is not available in this view yet.
83230 days
2.2K90 days
10.2K1 year
Compare downloads with other packages →
Also on120 r2u7 autocran

Repository

74Stars
22Forks
14Open issues
5Open PRs
18Releases
1,057Commits
18Commit identities
rr-packagerstats
License file reads as GPL-3.0 · 1,057 commits · Last activity 2026-10-11 · 0% stars, 30d · Default branch at 4.2.0, ahead of CRAN 4.1.0 (checked 2026-10-18)
Responsiveness
How these are sampled
PRs merged (all time)
92%
Median days to close, 50 most recently updated closed issues
1
Median days to close, 50 most recently updated closed PRs
1

Stars over time

2025-10-07 · 652026-09-20 · 74
PracticesBeta

14 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/ropensci/stats19 on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (2)
Code of conduct (inherited from ropensci)Contributing guide
Docs source (3)
README.Rmdpkgdown

GitHub Pages site last deployed 2026-07-30

pkgdown site last built 2026-07-30, before release 4.1.0 (2026-07-31)

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 4 practices
Reproducibility and dev environment (2)
data-raw/Dev Container
CRAN release process (1)
cran-comments.md
Research and citation (2)
codemeta.jsonJOSS paper
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-01-28
    Pull request: opened by its own account
    Commits: at least 3 crediting it in the message
  • Claude Codefirst seen 2026-07-31
    Named in .Rbuildignore: .claude
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
30 external dependencies (excludes base and recommended)

Installing stats19 adds 39 packages (26 with compiled code, 27 MB of source tarballs). Heaviest: sf 9.3 MB, s2 2.8 MB, Rcpp 1.8 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (10)
Author, Maintainer since 0.1.1 (2019)
Author · added in 4.1.0
Author
Author · added in 3.4.0
Reviewer, Contributor
Contributor · added in 1.2.0
Funder · added in 1.1.0
Releases (22)

Pick two releases to compare their code metrics.

  • 4.1.0Latest
    record
    2026-07-31 · current release · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 4.0.0
    record
    2026-03-18 · diff ↗ ·
    added 9 exports
    clean_make, clean_make_model, clean_model, extract_make_stats19, get_url, locate_files, match_tag, select_file, set_data_directory
  • 3.4.0
    record
    2025-10-09 · diff ↗ ·
    added 1 export
    get_data_directory
  • R
    R 4.5.0 released · 2025-04-11
  • 3.3.1
    record
    2025-01-15 · diff ↗
  • 3.3.0
    record
    2025-01-13 · diff ↗
  • 3.2.0
    record
    2024-10-25 · diff ↗
  • 3.1.0
    record
    2024-08-01 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 3.0.3
    record
    2024-02-09 · diff ↗
  • 3.0.2
    record
    2023-11-05 · diff ↗
  • 3.0.0
    record
    2023-10-12 · diff ↗ ·
    removed 2 exports
    format_accidents, read_accidents
    added 2 exports
    format_collisions, read_collisions
  • R
    R 4.3.0 released · 2023-04-21
  • 2.0.1
    record
    2022-11-17 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
Show 19 earlier eventsHide 19 earlier events
  • unarchivedReturned to CRAN
    2021-10-30
  • 2.0.0
    record
    2021-10-30 · diff ↗
  • archivedRemoved from CRAN
    2021-10-20
    check problems were not corrected in time
  • 1.4.3
    record
    2021-07-21 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 1.4.1
    record
    2021-03-28 · diff ↗ ·
    added 1 export
    get_ULEZ
  • unarchivedReturned to CRAN
    2021-03-15
  • 1.4.0
    record
    2021-03-15 · diff ↗ ·
    added 1 export
    get_stats19_adjustments
  • archivedRemoved from CRAN
    2021-03-14
    check problems were not corrected in time
  • 1.3.0
    record
    2020-10-01 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 1.2.0
    record
    2020-03-03 · diff ↗ ·
    added 2 exports
    format_ppp, get_MOT
  • 1.1.0
    record
    2019-10-15 · diff ↗
  • 1.0.0
    record
    2019-07-28 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.2.1
    record
    2019-04-03 · diff ↗
  • 0.2.0
    record
    2019-02-15 · diff ↗
  • 0.1.1
    record
    2019-01-18
  • R
    R 3.5.0 released · 2018-04-23

Package metadata

First published
2019-01-18
Total releases
22 / 7 yrs
License
GPL-3 OSI
Minimum R
≥ 4.1.0
Bundled data
351 KB / 12 files
Download size
3.0 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("stats19")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.21105/joss.01181.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for stats19 version 4.1.0 [Data set]. HJJB, LLC. Data release v2026-10-21. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy