fars_map_state: Plots accidents on a state map.

Description Usage Arguments Value Note Examples

View source: R/fars_functions.R

Description

Plots accidents occuring in a particular state on the state map (US).

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

The state number corresponding to a state in the US. This should be integer between 1 & 56 ( both lower & upper limits included).

year

The year for which the accident data should be take (can take any value from 2013, 2014, 2015)

Value

A plot of accidents occuring in a particular state on the state map (US). A NULL object is returned.

Note

Requires 'readr', 'dplyr', 'tidyr' and 'maps' packages to be loaded first.

Examples

1
2
3
4
## Considering your data is in the present working directory
## The following would work fine and would return the subsetted data.
mydata <- fars_map_state(55, 2013)
str(mydata)

abhinav-piplani/Assignment1 documentation built on May 27, 2019, 7:39 a.m.