Package 'ozroaddeaths'

Title: Pulls Data From Australian Road Deaths Database
Description: ozroaddeaths is a package that pulls data from the Australian Road Deaths Database, run by the Bureau of Infrastructure, Transport and Regional Economics (BITRE). This provides basic details of road transport crash fatalities in Australia as reported by the police each month to the State and Territory road safety authorities. The details provided in the database fall into two groups: 1) the circumstances of the crash, for example, date, location, crash type some details regarding the persons killed, for example, age, gender and road user group.
Authors: Nicholas Tierney [aut, cre], Maddie Davey [aut], Justin Carmody [aut], Steph de Silva [aut], Adam Gruer [aut], Mathew Ling [ctb], Michael Sumner [ctb]
Maintainer: Nicholas Tierney <[email protected]>
License: MIT + file LICENSE
Version: 0.0.3.9000
Built: 2024-11-27 03:55:16 UTC
Source: https://github.com/njtierney/ozroaddeaths

Help Index


Get BITRE data with hard coded link

Description

Get BITRE data with hard coded link

Usage

get_bitre_hard_coded(group = "fatal_crashes")

Arguments

group

Character. The group name.

Value

path to the temporary XLSX file.


Retrieve Australian Fatal Crash Data

Description

This function pulls data from the Australian Road Deaths Database, specifically, the circumstances of the crash, for example, date, location, crash type.

Usage

oz_road_fatal_crash(source = "stable")

Arguments

source

Character. Either "stable" or "latest".

Details

There are two sources of data: data.gov.au and bitre.gov.au. While bitre.gov.au is more up-to-date, there are inconsistencies between the two sources for certain crash records.

Value

a dataset (tibble) of fatal crash data

Format: a data frame with 43,345 observations on the following 14 variables.

'crash_id'

An integer, 13 digits, unique to each crash

'state'

Text, Austraian jurisdiction, Abbreviation for each state and territory. QLD = Queensland, NSW = New South Wales, ACT = Australian Capital Territory, VIC = Victoria, TAS = TASMANIA, SA = South Australia, WA = Western Australian, NT = Northern Territory

'date'

Date, Year, Month. This is the date of the crash, but with unknown date (set to 1st)

'month'

Integer, the month of the date of the crash

'year'

Integer, the year of the date of the crash

'weekday'

Text the weekday of the date of the crash

'time'

Time, the time of the date of the crash

'date_time'

POSIXct, the date time of the crash

'n_fatalities'

Integer, number of killed persons in the crash

'crash_type'

Character, Code summarising the type of type of crash. Single, Multiple, or Pedestrian

'bus'

logical - whether a bus was involved in the crash (TRUE) or not (FALSE)

'heavy_rigid_truck'

logical - whether a heavy rigid truck was involved in the crash (TRUE) or not (FALSE)

'articualated_truck'

logical - whether a articulated trucl was involved in the crash (TRUE) or not (FALSE)

'speed_limit'

Integer, posted speed limit at the location of crash

Source

https://bitre.gov.au/statistics/safety/fatal_road_crash_database.aspx

Examples

## Not run: 
oz_road_fatal_crash

## End(Not run)

Retrieve road fatal crash data from BITRE

Description

Retrieve road fatal crash data from BITRE

Usage

oz_road_fatal_crash_bitre()

Retrieve Australian Fatal Crash Data

Description

This function pulls data from the Australian Road Deaths Database. Specifically, the details regarding the persons killed, for example, age, gender and road user group.

Usage

oz_road_fatalities(source = "stable")

Arguments

source

Character. Either "stable" or "latest".

Details

There are two sources of data: data.gov.au and bitre.gov.au. While bitre.gov.au is more up-to-date, there are inconsistencies between the two sources for certain crash records.

Value

a dataset (tibble) of fatal crash data

'crash_id'

An integer, 13 digits, unique to each crash

'state'

Text, Austraian jurisdiction, Abbreviation for each state and territory. QLD = Queensland, NSW = New South Wales, ACT = Australian Capital Territory, VIC = Victoria, TAS = TASMANIA, SA = South Australia, WA = Western Australian, NT = Northern Territory

'date'

Date, Year, Month and Day. This is the date of the crash, but with unknown day so set to the 1st

'month'

Integer, the month of the date of the crash

'year'

Integer, the year of the date of the crash

'weekday'

Text the weekday of the date of the crash

'time'

Time, the time of the date of the crash

'crash_type'

Character, Code summarising the type of type of crash. Single, Multiple, or Pedestrian

'date_time'

POSIXct, the date time of the crash

'bus'

logical - whether a bus was involved in the crash (TRUE) or not (FALSE)

'heavy_rigid_truck'

logical - whether a heavy rigid truck was involved in the crash (TRUE) or not (FALSE)

'articualated_truck'

logical - whether a articulated trucl was involved in the crash (TRUE) or not (FALSE)

'speed_limit'

Integer, posted speed limit at the location of crash

'road_user'

Text, Type of person killed. Driver, Passenger, Pedestrian, Motorcycle Rider, Motorcycle Passenger, Bicyclist (including pillion passengers)

'gender'

Text, Biological Sex of person killed, Male, Female, Unknown

'age'

Integer, Age of person killed, in years

Examples

## Not run: 
oz_road_fatalities

## End(Not run)

ozroaddeaths

Description

ozroaddeaths is a package that pulls data from the Australian Road Deaths Database, run by the Bureau of Infrastructure, Transport and Regional Economics (BITRE). This provides basic details of road transport crash fatalities in Australia as reported by the police each month to the State and Territory road safety authorities. The details provided in the database fall into two groups: 1) the circumstances of the crash, for example, date, location, crash type some details regarding the persons killed, for example, age, gender and road user group.

Author(s)

Maintainer: Nicholas Tierney [email protected]

Authors:

Other contributors:

See Also

Useful links: