The goal of fars is the data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.
You can install fars from github with:
# install.packages("devtools") devtools::install_github("BreizhZut/Fars")
Dependencies
library(dplyr) library(readr) library(tidyr) library(magrittr) library(maps)
Loading the library
library(fars)
In oder to work properly one need to check the data location.
fars_dir = file.path("tests","data") list.files(fars_dir)
This packaque contains a function to build standard names
file2013 <- make_filename(2013) file2013
The fars_read
function reads the file, the optionnal argument fars_path
unables the user to specify the directory cotainong the data.
library(knitr) data2013 <- fars_read(file2013,fars_path=fars_dir) kable(head(data2013))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.