{
  "_id": "6acbf358fe5cc25786e936f0",
  "Package": "stats19",
  "Title": "Work with Open Road Traffic Casualty Data from Great Britain",
  "Version": "4.2.0",
  "Authors@R": "c(\nperson(\"Robin\", \"Lovelace\", email = \"rob00x@gmail.com\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0001-5679-6536\")),\nperson(\"Malcolm\", \"Morgan\", email = \"m.morgan1@leeds.ac.uk\", role = c(\"aut\"),\ncomment = c(ORCID = \"0000-0002-9488-9183\")),\nperson(\"Layik\", \"Hama\", email = \"layik.hama@gmail.com\", role = c(\"aut\"),\ncomment = c(ORCID = \"0000-0003-1912-4890\")),\nperson(\"Mark\", \"Padgham\", role=c(\"aut\"),\ncomment = c(ORCID = \"0000-0003-2172-5265\")),\nperson(\"David\", \"Ranzolin\", role=c(\"rev\")),\nperson(\"Adam\", \"Sparks\", role = c(\"rev\", \"ctb\"),\ncomment = c(ORCID = \"0000-0002-0061-8359\")),\nperson(\"Ivo\", \"Wengraf\", role = c(\"ctb\")),\nperson(given = \"RAC Foundation\", role = c(\"fnd\")),\nperson(\"Blaise\", \"Kelly\", email = \"blaise@kello.co.uk\", role = c(\"aut\"),\ncomment = c(ORCID = \"0000-0003-2623-1598\")),\nperson(\"Roger\", \"Beecham\", email = \"r.j.beecham@leeds.ac.uk\", role = c(\"aut\"),\ncomment = c(ORCID = \"0000-0001-8563-7251\"))\n)",
  "Description": "Work with and download road traffic casualty data from\nGreat Britain. Enables access to the UK's official road safety\nstatistics, 'STATS19'. Enables users to specify a download\ndirectory for the data, which can be set permanently by adding\n`STATS19_DOWNLOAD_DIRECTORY=/path/to/a/dir` to your `.Renviron`\nfile, which can be opened with `usethis::edit_r_environ()`. The\ndata is provided as a series of `.csv` files. This package\ndownloads, reads-in and formats the data, making it suitable\nfor analysis. See the stats19 vignette for details. Data\navailable from 1979 to 2025. See the official data series at\n<https://www.data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-accidents-safety-data>.\nThe package is described in a paper in the Journal of Open\nSource Software (Lovelace et al. 2019)\n<doi:10.21105/joss.01181>. See Gilardi et al. (2022)\n<doi:10.1111/rssa.12823>, Vidal-Tortosa et al. (2021)\n<doi:10.1016/j.jth.2021.101291>, Tait et al. (2023)\n<doi:10.1016/j.aap.2022.106895>, and León et al. (2025)\n<doi:10.18637/jss.v114.i09> for examples of how the data can be\nused for methodological and empirical research.",
  "License": "GPL-3",
  "URL": "https://github.com/ropensci/stats19,\nhttps://docs.ropensci.org/stats19/",
  "BugReports": "https://github.com/ropensci/stats19/issues",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "VignetteBuilder": "knitr",
  "Roxygen": "list(markdown = TRUE)",
  "Language": "en-US",
  "Config/roxygen2/version": "8.1.0",
  "Config/pak/sysreqs": "libabsl-dev cmake libgdal-dev gdal-bin libgeos-dev\nlibssl-dev libproj-dev libsqlite3-dev libudunits2-dev\nlibx11-dev",
  "Repository": "https://ropensci.r-universe.dev",
  "Date/Publication": "2026-10-11 19:00:52 UTC",
  "RemoteUrl": "https://github.com/ropensci/stats19",
  "RemoteRef": "master",
  "RemoteSha": "7f0f64d545a02422a02684c39b4455f61238e7f3",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-11 20:31:14 UTC",
    "User": "root"
  },
  "Author": "Robin Lovelace [aut, cre] (ORCID:\n<https://orcid.org/0000-0001-5679-6536>),\nMalcolm Morgan [aut] (ORCID: <https://orcid.org/0000-0002-9488-9183>),\nLayik Hama [aut] (ORCID: <https://orcid.org/0000-0003-1912-4890>),\nMark Padgham [aut] (ORCID: <https://orcid.org/0000-0003-2172-5265>),\nDavid Ranzolin [rev],\nAdam Sparks [rev, ctb] (ORCID: <https://orcid.org/0000-0002-0061-8359>),\nIvo Wengraf [ctb],\nRAC Foundation [fnd],\nBlaise Kelly [aut] (ORCID: <https://orcid.org/0000-0003-2623-1598>),\nRoger Beecham [aut] (ORCID: <https://orcid.org/0000-0001-8563-7251>)",
  "Maintainer": "Robin Lovelace <rob00x@gmail.com>",
  "_user": "ropensci",
  "_type": "src",
  "_file": "stats19_4.2.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/73eaba29be43c4f35809a95c6f3831585fd985bb1c10a8edf4419e87dc75bf02",
  "_filesize": 3459258,
  "_sha256": "73eaba29be43c4f35809a95c6f3831585fd985bb1c10a8edf4419e87dc75bf02",
  "_expires": "2027-01-19T20:36:37.000Z",
  "_created": "2026-10-11T20:31:14.000Z",
  "_published": "2026-10-11T20:36:39.801Z",
  "_buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 114568455359,
      "time": 178,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11715210268"
    },
    {
      "job": 114568455371,
      "time": 169,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11714497377"
    },
    {
      "job": 114568455311,
      "time": 116,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11714592055"
    },
    {
      "job": 114568455343,
      "time": 117,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11714861484"
    },
    {
      "job": 114567103245,
      "time": 388,
      "config": "pkgdown",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11713919529"
    },
    {
      "job": 114567103295,
      "time": 372,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11714601706"
    },
    {
      "job": 114568455310,
      "time": 164,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11714790880"
    },
    {
      "job": 114568455440,
      "time": 164,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11714387669"
    },
    {
      "job": 114568455346,
      "time": 106,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11715000502"
    },
    {
      "job": 114568455392,
      "time": 119,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11714293070"
    }
  ],
  "_upstream": "https://github.com/ropensci/stats19",
  "_commit": {
    "id": "7f0f64d545a02422a02684c39b4455f61238e7f3",
    "author": "Blaise Kelly <blaise@kello.co.uk>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Fix issue #332: DfT Schema update (#333)",
    "time": 1791745252
  },
  "_maintainer": {
    "name": "Robin Lovelace",
    "email": "rob00x@gmail.com",
    "login": "robinlovelace",
    "mastodon": "@robinlovelace@fosstodon.org",
    "bluesky": "@robinlovelace.bsky.social",
    "linkedin": "in/robin-lovelace-20751a34",
    "orcid": "0000-0001-5679-6536",
    "twitter": "@robinlovelace",
    "description": "Professor of Transport Data Science, University of Leeds 🎓  Researcher, teacher and builder of open source solutions 🚶🚲🚀",
    "uuid": 1825120
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "sf",
      "role": "Imports"
    },
    {
      "package": "curl",
      "version": ">= 3.2",
      "role": "Imports"
    },
    {
      "package": "readr",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "lubridate",
      "role": "Imports"
    },
    {
      "package": "jsonlite",
      "role": "Imports"
    },
    {
      "package": "glue",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "duckdb",
      "role": "Suggests"
    },
    {
      "package": "DBI",
      "role": "Suggests"
    },
    {
      "package": "dbplyr",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "stringr",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 2.1.0",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    },
    {
      "package": "tidyr",
      "role": "Suggests"
    },
    {
      "package": "tidyselect",
      "role": "Suggests"
    },
    {
      "package": "pkgdown",
      "role": "Suggests"
    },
    {
      "package": "kableExtra",
      "role": "Suggests"
    },
    {
      "package": "leaflet",
      "role": "Suggests"
    },
    {
      "package": "geojsonsf",
      "role": "Suggests"
    },
    {
      "package": "htmltools",
      "role": "Suggests"
    },
    {
      "package": "tmap",
      "role": "Suggests"
    },
    {
      "package": "spatstat.geom",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "readODS",
      "role": "Suggests"
    },
    {
      "package": "gt",
      "role": "Suggests"
    },
    {
      "package": "clock",
      "role": "Suggests"
    },
    {
      "package": "waldo",
      "role": "Suggests"
    }
  ],
  "_owner": "ropensci",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-41",
      "n": 6
    },
    {
      "week": "2025-42",
      "n": 3
    },
    {
      "week": "2025-49",
      "n": 3
    },
    {
      "week": "2025-50",
      "n": 2
    },
    {
      "week": "2026-03",
      "n": 1
    },
    {
      "week": "2026-04",
      "n": 1
    },
    {
      "week": "2026-07",
      "n": 1
    },
    {
      "week": "2026-08",
      "n": 1
    },
    {
      "week": "2026-10",
      "n": 5
    },
    {
      "week": "2026-11",
      "n": 1
    },
    {
      "week": "2026-12",
      "n": 2
    },
    {
      "week": "2026-31",
      "n": 11
    },
    {
      "week": "2026-32",
      "n": 1
    },
    {
      "week": "2026-39",
      "n": 3
    },
    {
      "week": "2026-41",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "v4.1.0",
      "date": "2026-07-31"
    }
  ],
  "_topics": [
    "stats19",
    "road-safety",
    "transport",
    "car-crashes",
    "ropensci",
    "data"
  ],
  "_stars": 74,
  "_contributors": [
    {
      "user": "robinlovelace",
      "count": 706,
      "uuid": 1825120
    },
    {
      "user": "layik",
      "count": 168,
      "uuid": 408568
    },
    {
      "user": "blaisekelly",
      "count": 60,
      "uuid": 40754415
    },
    {
      "user": "agila5",
      "count": 35,
      "uuid": 22221146
    },
    {
      "user": "mpadge",
      "count": 15,
      "uuid": 6697851
    },
    {
      "user": "wengraf",
      "count": 14,
      "uuid": 13015856
    },
    {
      "user": "adamhsparks",
      "count": 2,
      "uuid": 3195906
    },
    {
      "user": "elifclaus",
      "count": 2,
      "uuid": 262484289
    },
    {
      "user": "jeroen",
      "count": 2,
      "uuid": 216319
    },
    {
      "user": "lesswasted",
      "count": 2,
      "uuid": 260244514
    },
    {
      "user": "mem48",
      "count": 2,
      "uuid": 15819577
    },
    {
      "user": "mhkeller",
      "count": 2,
      "uuid": 498744
    },
    {
      "user": "cmcaine",
      "count": 1,
      "uuid": 6000761
    },
    {
      "user": "jimuttley",
      "count": 1,
      "uuid": 43413712
    },
    {
      "user": "meganstodel",
      "count": 1,
      "uuid": 16051791
    },
    {
      "user": "joeytalbot",
      "count": 1,
      "uuid": 52210872
    }
  ],
  "_userbio": {
    "uuid": 1200269,
    "type": "organization",
    "name": "rOpenSci",
    "followers": 1160,
    "description": "Tools and R Packages for Open Science"
  },
  "_downloads": {
    "count": 918,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/stats19"
  },
  "_devurl": "https://github.com/ropensci/stats19",
  "_pkgdown": "https://docs.ropensci.org/stats19",
  "_searchresults": 287,
  "_metadata": {
    "review": {
      "id": 266,
      "status": "reviewed",
      "version": "0.1.0.9000",
      "organization": "rOpenSci Software Review",
      "url": "https://github.com/ropensci/software-review/issues/266"
    },
    "ropensci_category": "data-access"
  },
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/stats19.html"
  ],
  "_homeurl": "https://github.com/ropensci/stats19",
  "_realowner": "ropensci",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.1",
      "date": "2019-01-17"
    },
    {
      "version": "0.2.0",
      "date": "2019-02-15"
    },
    {
      "version": "0.2.1",
      "date": "2019-04-08"
    },
    {
      "version": "1.0.0",
      "date": "2019-07-28"
    },
    {
      "version": "1.1.0",
      "date": "2019-10-16"
    },
    {
      "version": "1.2.0",
      "date": "2020-03-03"
    },
    {
      "version": "1.3.0",
      "date": "2020-10-01"
    },
    {
      "version": "1.4.0",
      "date": "2021-03-15"
    },
    {
      "version": "1.4.1",
      "date": "2021-03-28"
    },
    {
      "version": "1.4.3",
      "date": "2021-07-21"
    },
    {
      "version": "2.0.0",
      "date": "2021-10-29"
    },
    {
      "version": "2.0.1",
      "date": "2022-11-17"
    },
    {
      "version": "3.0.0",
      "date": "2023-10-12"
    },
    {
      "version": "3.0.2",
      "date": "2023-11-05"
    },
    {
      "version": "3.0.3",
      "date": "2024-02-09"
    },
    {
      "version": "3.1.0",
      "date": "2024-08-01"
    },
    {
      "version": "3.2.0",
      "date": "2024-10-24"
    },
    {
      "version": "3.3.0",
      "date": "2025-01-13"
    },
    {
      "version": "3.3.1",
      "date": "2025-01-17"
    },
    {
      "version": "3.4.0",
      "date": "2025-10-09"
    },
    {
      "version": "4.0.0",
      "date": "2026-03-18"
    },
    {
      "version": "4.1.0",
      "date": "2026-07-31"
    }
  ],
  "_exports": [
    "clean_make",
    "clean_make_model",
    "clean_model",
    "dl_stats19",
    "extract_make_stats19",
    "find_file_name",
    "format_casualties",
    "format_collisions",
    "format_column_names",
    "format_ppp",
    "format_sf",
    "format_vehicles",
    "get_data_directory",
    "get_MOT",
    "get_parquet_directory",
    "get_stats19",
    "get_stats19_adjustments",
    "get_ULEZ",
    "get_url",
    "junction_status",
    "locate_files",
    "locate_one_file",
    "match_tag",
    "read_casualties",
    "read_collisions",
    "read_vehicles",
    "select_file",
    "set_data_directory",
    "set_parquet_directory",
    "stats19_to_parquet",
    "summarise_adjusted_severities"
  ],
  "_datasets": [
    {
      "name": "accidents_sample",
      "title": "Sample of stats19 data (2022 collisions)",
      "object": "accidents_sample",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "accident_index",
        "accident_year",
        "accident_reference",
        "location_easting_osgr",
        "location_northing_osgr",
        "longitude",
        "latitude",
        "police_force",
        "accident_severity",
        "number_of_vehicles",
        "number_of_casualties",
        "date",
        "day_of_week",
        "time",
        "local_authority_district",
        "local_authority_ons_district",
        "local_authority_highway",
        "first_road_class",
        "first_road_number",
        "road_type",
        "speed_limit",
        "junction_detail",
        "junction_control",
        "second_road_class",
        "second_road_number",
        "pedestrian_crossing_human_control",
        "pedestrian_crossing_physical_facilities",
        "light_conditions",
        "weather_conditions",
        "road_surface_conditions",
        "special_conditions_at_site",
        "carriageway_hazards",
        "urban_or_rural_area",
        "did_police_officer_attend_scene_of_accident",
        "trunk_road_flag",
        "lsoa_of_accident_location",
        "enhanced_severity_collision"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "accidents_sample_raw",
      "title": "Sample of stats19 data (2022 collisions)",
      "object": "accidents_sample_raw",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "accident_index",
        "accident_year",
        "accident_reference",
        "location_easting_osgr",
        "location_northing_osgr",
        "longitude",
        "latitude",
        "police_force",
        "accident_severity",
        "number_of_vehicles",
        "number_of_casualties",
        "date",
        "day_of_week",
        "time",
        "local_authority_district",
        "local_authority_ons_district",
        "local_authority_highway",
        "first_road_class",
        "first_road_number",
        "road_type",
        "speed_limit",
        "junction_detail",
        "junction_control",
        "second_road_class",
        "second_road_number",
        "pedestrian_crossing_human_control",
        "pedestrian_crossing_physical_facilities",
        "light_conditions",
        "weather_conditions",
        "road_surface_conditions",
        "special_conditions_at_site",
        "carriageway_hazards",
        "urban_or_rural_area",
        "did_police_officer_attend_scene_of_accident",
        "trunk_road_flag",
        "lsoa_of_accident_location",
        "enhanced_severity_collision"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "casualties_sample",
      "title": "Sample of stats19 data (2022 casualties)",
      "object": "casualties_sample",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "accident_index",
        "accident_year",
        "accident_reference",
        "vehicle_reference",
        "casualty_reference",
        "casualty_class",
        "sex_of_casualty",
        "age_of_casualty",
        "age_band_of_casualty",
        "casualty_severity",
        "pedestrian_location",
        "pedestrian_movement",
        "car_passenger",
        "bus_or_coach_passenger",
        "pedestrian_road_maintenance_worker",
        "casualty_type",
        "casualty_home_area_type",
        "casualty_imd_decile",
        "lsoa_of_casualty",
        "enhanced_casualty_severity",
        "casualty_distance_banding"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "casualties_sample_raw",
      "title": "Sample of stats19 data (2022 casualties)",
      "object": "casualties_sample_raw",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "Accident_Index",
        "Vehicle_Reference",
        "Casualty_Reference",
        "Casualty_Class",
        "Sex_of_Casualty",
        "Age_of_Casualty",
        "Age_Band_of_Casualty",
        "Casualty_Severity",
        "Pedestrian_Location",
        "Pedestrian_Movement",
        "Car_Passenger",
        "Bus_or_Coach_Passenger",
        "Pedestrian_Road_Maintenance_Worker",
        "Casualty_Type",
        "Casualty_Home_Area_Type",
        "Casualty_IMD_Decile"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "file_names",
      "title": "stats19 file names for easy access",
      "object": "file_names",
      "class": [
        "list"
      ],
      "fields": [],
      "table": true,
      "tojson": true
    },
    {
      "name": "police_boundaries",
      "title": "Police force boundaries in England (2016)",
      "object": "police_boundaries",
      "class": [
        "sf",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "pfa16cd",
        "pfa16nm",
        "geometry"
      ],
      "rows": 43,
      "table": false,
      "tojson": true
    },
    {
      "name": "stats19_schema",
      "title": "Stats19 schema and variables",
      "object": "stats19_schema",
      "class": [
        "data.frame"
      ],
      "fields": [
        "table",
        "variable",
        "code",
        "label",
        "note",
        "type"
      ],
      "rows": 1825,
      "table": true,
      "tojson": true
    },
    {
      "name": "stats19_variables",
      "title": "Stats19 schema and variables",
      "object": "stats19_variables",
      "class": [
        "grouped_df",
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "table",
        "variable",
        "note",
        "type"
      ],
      "rows": 112,
      "table": true,
      "tojson": true
    },
    {
      "name": "vehicles_sample",
      "title": "Sample of stats19 data (2022 vehicles)",
      "object": "vehicles_sample",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "accident_index",
        "accident_year",
        "accident_reference",
        "vehicle_reference",
        "vehicle_type",
        "towing_and_articulation",
        "vehicle_manoeuvre",
        "vehicle_direction_from",
        "vehicle_direction_to",
        "vehicle_location_restricted_lane",
        "junction_location",
        "skidding_and_overturning",
        "hit_object_in_carriageway",
        "vehicle_leaving_carriageway",
        "hit_object_off_carriageway",
        "first_point_of_impact",
        "vehicle_left_hand_drive",
        "journey_purpose_of_driver",
        "sex_of_driver",
        "age_of_driver",
        "age_band_of_driver",
        "engine_capacity_cc",
        "propulsion_code",
        "age_of_vehicle",
        "generic_make_model",
        "driver_imd_decile",
        "driver_home_area_type",
        "lsoa_of_driver",
        "escooter_flag",
        "dir_from_e",
        "dir_from_n",
        "dir_to_e",
        "dir_to_n",
        "driver_distance_banding"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "vehicles_sample_raw",
      "title": "Sample of stats19 data (2022 vehicles)",
      "object": "vehicles_sample_raw",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "Accident_Index",
        "Vehicle_Reference",
        "Vehicle_Type",
        "Towing_and_Articulation",
        "Vehicle_Manoeuvre",
        "Vehicle_Location-Restricted_Lane",
        "Junction_Location",
        "Skidding_and_Overturning",
        "Hit_Object_in_Carriageway",
        "Vehicle_Leaving_Carriageway",
        "Hit_Object_off_Carriageway",
        "1st_Point_of_Impact",
        "Was_Vehicle_Left_Hand_Drive?",
        "Journey_Purpose_of_Driver",
        "Sex_of_Driver",
        "Age_of_Driver",
        "Age_Band_of_Driver",
        "Engine_Capacity_(CC)",
        "Propulsion_Code",
        "Age_of_Vehicle",
        "Driver_IMD_Decile",
        "Driver_Home_Area_Type",
        "Vehicle_IMD_Decile"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "accidents_sample",
      "title": "Sample of stats19 data (2022 collisions)",
      "topics": [
        "accidents_sample",
        "accidents_sample_raw"
      ]
    },
    {
      "page": "casualties_sample",
      "title": "Sample of stats19 data (2022 casualties)",
      "topics": [
        "casualties_sample",
        "casualties_sample_raw"
      ]
    },
    {
      "page": "check_input_file",
      "title": "Local helper to be reused.",
      "topics": [
        "check_input_file"
      ]
    },
    {
      "page": "clean_make",
      "title": "Clean vehicle make",
      "topics": [
        "clean_make"
      ]
    },
    {
      "page": "clean_make_model",
      "title": "Clean vehicle make and model",
      "topics": [
        "clean_make_model"
      ]
    },
    {
      "page": "clean_model",
      "title": "Clean vehicle model",
      "topics": [
        "clean_model"
      ]
    },
    {
      "page": "dl_stats19",
      "title": "Download STATS19 data for a year",
      "topics": [
        "dl_stats19"
      ]
    },
    {
      "page": "extract_make_stats19",
      "title": "Extract vehicle make from generic make/model string",
      "topics": [
        "extract_make_stats19"
      ]
    },
    {
      "page": "file_names",
      "title": "stats19 file names for easy access",
      "topics": [
        "file_names"
      ]
    },
    {
      "page": "find_file_name",
      "title": "Find file names within stats19::file_names.",
      "topics": [
        "find_file_name"
      ]
    },
    {
      "page": "format_casualties",
      "title": "Format STATS19 casualties",
      "topics": [
        "format_casualties"
      ]
    },
    {
      "page": "format_collisions",
      "title": "Format STATS19 'collisions' data",
      "topics": [
        "format_collisions"
      ]
    },
    {
      "page": "format_column_names",
      "title": "Format column names of raw STATS19 data",
      "topics": [
        "format_column_names"
      ]
    },
    {
      "page": "format_ppp",
      "title": "Convert STATS19 data into ppp (spatstat) format.",
      "topics": [
        "format_ppp"
      ]
    },
    {
      "page": "format_sf",
      "title": "Format convert STATS19 data into spatial (sf) object",
      "topics": [
        "format_sf"
      ]
    },
    {
      "page": "format_vehicles",
      "title": "Format STATS19 vehicles data",
      "topics": [
        "format_vehicles"
      ]
    },
    {
      "page": "get_data_directory",
      "title": "Get data download dir",
      "topics": [
        "get_data_directory"
      ]
    },
    {
      "page": "get_MOT",
      "title": "Download vehicle data from the DVSA MOT API using VRM.",
      "topics": [
        "get_MOT"
      ]
    },
    {
      "page": "get_parquet_directory",
      "title": "Get Parquet directory",
      "topics": [
        "get_parquet_directory"
      ]
    },
    {
      "page": "get_stats19",
      "title": "Download, read and format STATS19 data in one function.",
      "topics": [
        "get_stats19"
      ]
    },
    {
      "page": "get_stats19_adjustments",
      "title": "Download and read-in severity adjustment factors",
      "topics": [
        "get_stats19_adjustments"
      ]
    },
    {
      "page": "get_ULEZ",
      "title": "Download DVLA-based vehicle data from the TfL API using VRM.",
      "topics": [
        "get_ULEZ"
      ]
    },
    {
      "page": "get_url",
      "title": "Convert file names to urls",
      "topics": [
        "get_url"
      ]
    },
    {
      "page": "junction_status",
      "title": "Classify collisions as at a junction or not",
      "topics": [
        "junction_status"
      ]
    },
    {
      "page": "locate_files",
      "title": "Locate a file on disk",
      "topics": [
        "locate_files"
      ]
    },
    {
      "page": "locate_one_file",
      "title": "Pin down a file on disk from parameters.",
      "topics": [
        "locate_one_file"
      ]
    },
    {
      "page": "match_tag",
      "title": "Match STATS19 collisions with TAG (RAS4001) cost estimates",
      "topics": [
        "match_tag"
      ]
    },
    {
      "page": "phrase",
      "title": "Generate a phrase for data download purposes",
      "topics": [
        "phrase"
      ]
    },
    {
      "page": "police_boundaries",
      "title": "Police force boundaries in England (2016)",
      "topics": [
        "police_boundaries"
      ]
    },
    {
      "page": "read_casualties",
      "title": "Read in STATS19 road safety data from .csv files downloaded.",
      "topics": [
        "read_casualties"
      ]
    },
    {
      "page": "read_collisions",
      "title": "Read in STATS19 road safety data from .csv files downloaded.",
      "topics": [
        "read_collisions"
      ]
    },
    {
      "page": "read_vehicles",
      "title": "Read in stats19 road safety data from .csv files downloaded.",
      "topics": [
        "read_vehicles"
      ]
    },
    {
      "page": "select_file",
      "title": "Interactively select from options",
      "topics": [
        "select_file"
      ]
    },
    {
      "page": "set_data_directory",
      "title": "Set data download dir",
      "topics": [
        "set_data_directory"
      ]
    },
    {
      "page": "set_parquet_directory",
      "title": "Set Parquet directory",
      "topics": [
        "set_parquet_directory"
      ]
    },
    {
      "page": "stats19_schema",
      "title": "Stats19 schema and variables",
      "topics": [
        "stats19_schema",
        "stats19_variables"
      ]
    },
    {
      "page": "stats19_to_parquet",
      "title": "Convert raw STATS19 CSV files to Parquet",
      "topics": [
        "stats19_to_parquet"
      ]
    },
    {
      "page": "summarise_adjusted_severities",
      "title": "Summarise STATS19 severities with DfT adjustments",
      "topics": [
        "summarise_adjusted_severities"
      ]
    },
    {
      "page": "vehicles_sample",
      "title": "Sample of stats19 data (2022 vehicles)",
      "topics": [
        "vehicles_sample",
        "vehicles_sample_raw"
      ]
    }
  ],
  "_pkglogo": "https://github.com/ropensci/stats19/raw/master/man/figures/logo.png",
  "_readme": "https://github.com/ropensci/stats19/raw/master/README.md",
  "_rundeps": [
    "bit",
    "bit64",
    "class",
    "classInt",
    "cli",
    "clipr",
    "cpp11",
    "crayon",
    "curl",
    "DBI",
    "dplyr",
    "e1071",
    "generics",
    "glue",
    "hms",
    "jsonlite",
    "KernSmooth",
    "lifecycle",
    "lubridate",
    "magrittr",
    "pillar",
    "pkgconfig",
    "prettyunits",
    "progress",
    "proxy",
    "R6",
    "Rcpp",
    "readr",
    "rlang",
    "s2",
    "sf",
    "tibble",
    "tidyselect",
    "timechange",
    "tzdb",
    "units",
    "utf8",
    "vctrs",
    "vroom",
    "withr",
    "wk"
  ],
  "_vignettes": [
    {
      "source": "duckdb.Rmd",
      "filename": "duckdb.html",
      "title": "DuckDB and Parquet engines",
      "author": "R Lovelace",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Load the package",
        "Equivalence test with 2024 data",
        "Comparing record counts and fatal counts",
        "Using waldo for deep comparison",
        "Working with large datasets (1979-latest)",
        "Caching the data as Parquet",
        "Where Parquet files live",
        "Converting CSVs to Parquet",
        "Reading from the cache",
        "Keep the cache up to date"
      ],
      "created": "2026-03-18 14:06:45",
      "modified": "2026-09-22 11:03:18",
      "commits": 2
    },
    {
      "source": "schema-evolution.Rmd",
      "filename": "schema-evolution.html",
      "title": "Longitudinal Schema and Filename Evolution (1979–2025)",
      "author": "Robin Lovelace, Malcolm Morgan & Andrea Gilardi",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "1. Hosting and File Naming Evolution",
        "Package Handling",
        "2. Nomenclature: \"Accident\" to \"Collision\"",
        "3. The *_historic Column Split",
        "Longitudinal Harmonization",
        "4. Severity Adjustments (CRASH System Introduction)",
        "Practical Usage",
        "5. Emerging Vehicles and Variable Additions",
        "6. Schema Generation Pipeline"
      ],
      "created": "2026-09-22 11:03:18",
      "modified": "2026-09-22 11:03:18",
      "commits": 1
    },
    {
      "source": "make.Rmd",
      "filename": "make.html",
      "title": "Make and model data in STATS19",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Make and model data"
      ],
      "created": "2025-10-17 21:15:16",
      "modified": "2025-10-17 21:15:16",
      "commits": 1
    },
    {
      "source": "factsheet.Rmd",
      "filename": "factsheet.html",
      "title": "Reproducing Reported road casualties in Great Britain: pedestrian factsheet",
      "author": "Blaise Kelly",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Main findings",
        "2. Pedestrian traffic and reported casualties",
        "3. How far do pedestrians travel?",
        "4. Casualty rates per mile travelled",
        "5. Sex and age comparisons",
        "6. Which vehicles are involved in collisions with pedestrians?",
        "7. Time of day of collisions",
        "8. What type of road?",
        "9. Vehicle movement on the road"
      ],
      "created": "2025-10-08 11:46:54",
      "modified": "2025-10-08 15:20:45",
      "commits": 2
    },
    {
      "source": "stats19-vehicles.Rmd",
      "filename": "stats19-vehicles.html",
      "title": "Researching vehicles involved in collisions with STATS19 data",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Vehicle level variables in the STATS19 datasets",
        "Relationships between vehicle type and crash severity"
      ],
      "created": "2019-08-20 18:25:21",
      "modified": "2024-10-28 11:32:59",
      "commits": 10
    },
    {
      "source": "stats19.Rmd",
      "filename": "stats19.html",
      "title": "Introducing stats19",
      "author": "R Lovelace, M Morgan, L Hama and M Padgham",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Functions",
        "Download STATS19 data",
        "Read STATS19 data",
        "Crash data",
        "Format STATS19 data",
        "Casualties data",
        "Vehicles data",
        "Creating geographic crash data",
        "Joining tables",
        "Time series analysis",
        "Longitudinal trends and severity adjustments",
        "Further work",
        "References"
      ],
      "created": "2018-11-28 14:33:30",
      "modified": "2026-09-22 11:03:18",
      "commits": 51
    },
    {
      "source": "blog.Rmd",
      "filename": "blog.html",
      "title": "stats19: a package for road safety research",
      "author": "Layik Hama and Robin Lovelace",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Live Documentation & External Posts",
        "Recent Developments: Modernised Architecture (v4.0.0 - v4.2.0)",
        "1. Unified Longitudinal Schema",
        "2. Zero-Warning, High-Precision Parsing",
        "3. Native DuckDB and Parquet Support",
        "4. Research Tools: Costs and Vehicle Cleaning",
        "Introduction & Package History",
        "Short history and affiliations",
        "What is STATS19 anyway?",
        "The road crash data in stats19",
        "Note",
        "How stats19 works",
        "Creating geographic crash data",
        "The big picture: road safety",
        "Conclusion",
        "References"
      ],
      "created": "2019-02-15 11:09:19",
      "modified": "2026-09-22 11:03:18",
      "commits": 27
    },
    {
      "source": "stats19-training.Rmd",
      "filename": "stats19-training.html",
      "title": "Training Resources for Road Safety Analysis with R",
      "author": "Robin Lovelace, Malcolm Morgan & Andrea Gilardi",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Recommended Resources",
        "1. Reproducible Road Safety Research with R",
        "2. Geocomputation with R",
        "3. General R and Data Science",
        "Getting Started with stats19"
      ],
      "created": "2019-10-04 11:11:19",
      "modified": "2026-09-22 11:03:18",
      "commits": 22
    }
  ],
  "_score": 10.281356125904294,
  "_indexed": true,
  "_nocasepkg": "stats19",
  "_universes": [
    "ropensci",
    "robinlovelace"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "4.2.0",
      "date": "2026-10-11T20:35:42.000Z",
      "distro": "resolute",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/6d5c287b470bfdaf51a22bdfeb4a313856363bc08a97428acb10f3998fdbf820",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "4.2.0",
      "date": "2026-10-11T20:35:38.000Z",
      "distro": "resolute",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/9f8551fafc80a22497cb774bf91b38c5ac9bf4640d00b5a5c9fd2dd6cf2322d2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "4.2.0",
      "date": "2026-10-11T20:34:49.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/394532540c21558f0cf99fa01d043fd41c21810d892488ce67d7b4b61fc461fc",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "4.2.0",
      "date": "2026-10-11T20:34:52.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/1d3cef2116d4733ce0ebdd5618214467fba2aaff7526bd36cae9e5a4a94448f1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "4.2.0",
      "date": "2026-10-11T20:35:52.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/88d451f315a89a2a392ab83d9217088c3125b25009ae6a69fa8aeab3a18cb297",
      "status": "success",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "4.2.0",
      "date": "2026-10-11T20:35:30.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/1a88dbb0b7a389663665f4b9acb6c037ffea35464d7086b002fee13ea6d499af",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "4.2.0",
      "date": "2026-10-11T20:34:20.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/3d7bac106f9023968a1bf3b41e6962a2dab00daa73078617ba2051a669094949",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "4.2.0",
      "date": "2026-10-11T20:34:49.000Z",
      "commit": "7f0f64d545a02422a02684c39b4455f61238e7f3",
      "fileid": "https://r2.ropensci.org/f965b9da36a1024573131e4c1f2ce381c8a849b47c3a07d37273956ceb3ab8ae",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/ropensci/actions/runs/38172224317"
    }
  ]
}