Basic draft of tc_join_stats19_ac whilst I try to understand issue #24.

tc_join_stats19(
  crashes = NULL,
  casualties = NULL,
  vehicles = NULL,
  level = "accident"
)

Arguments

crashes

The accidents table of crashes from STATS19 data

casualties

The casualty table from STATS19 data

vehicles

The vehicles table from STATS19 data

level

one of "accidents", "casualities" or "vehicles". Shorter versions is ok too as a regex of first three letters is used.

Examples

if (FALSE) {
ac = stats19::get_stats19(year = 2019, type = "ac", output_format = "sf")
ca = stats19::get_stats19(year = 2019, type = "ca")
ve = stats19::get_stats19(year = 2019, type = "ve")
tc_join_stats19(ac, ca, veh, level = "veh")
}