fars_map_state: Plot a map from FARS data

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

Reads the data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System from the provide year and state and plot a map with the accidents

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The numer code of the state of interest, from 1 to 56.

year

The year of interest

Value

None

Examples

1
2
3
4
5
6
7
8
9
con <- bzfile("accident_2013.csv.bz2", "w")
write.csv(accident_2013, con, row.names = FALSE)
close(con)

fars_map_state(23, 2013)

## This will generate an error because the year 2016 is not avaliable
## and because there is no state 58
## Not run: fars_map_state(58, 2016))

fernandovmacedo/samplePackage documentation built on May 14, 2017, 1:14 a.m.