Skip to contents

The roadtrafficdeaths package contains one dataset of death certificates from road traffic crashes that happened in Brazil. This data is provided by the Brazilian Ministry of Health, and includes all certificated between 1996 and 2021.

Installation

The current version of roadtrafficdeaths can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("pabsantos/roadtrafficdeaths")

Next, the libraries that will be used in this vignette are loaded. This package loads an data.table object called rtdeaths, so it is recommended to install and load the data.table package as well.

Usage example

In this example, we will use the rtdeaths dataset to extract the annual quantity of road traffic deaths in Brazil, between 1996 and 2022.


year_deaths <- table(rtdeaths$ano_ocorrencia)

plot(year_deaths, type = "l")