Getting started

Hello world

install.packages("stats19")
library(stats19)
library(tidyverse)
dl_stats19(year = 2019, type = "Accident", data_dir = "/tmp")
crashes = get_stats19(year = 2020)
crashes

crashes_yearly = crashes %>% 
  group_by(date) %>% 
  summarise(
    n = n()
  )
crashes_yearly %>% 
  ggplot() +
  geom_line(aes(date, n)) +
  ylim(c(0, NA))


ropensci/stats19 documentation built on Jan. 14, 2025, 6:34 p.m.