knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Travis-CI Build Status

Intro

Working with FARS data made easy.

Installation

You can install the package from GitHub using the devtools package:

devtools::install_github("vadimus202/fars")

Usage Examples

Copy FARS files into working directory

library(fars)
library(magrittr)
library(knitr)

my_file <- system.file("extdata", "fars_data.zip", package = "fars")
unzip(my_file, junkpaths = TRUE)

Preview 2015 FARS data

file_name <- make_filename(2015)
df <- fars_read(file_name)
df %>% head() %>% kable()

Summarize 2013-2015 data

fars_summarize_years(2013:2015) %>% kable()

Plot 2014 accidents on California state map

fars_map_state(6,2014)


vadimus202/fars documentation built on May 3, 2019, 2:41 p.m.