fars_map_state: Map all recorded accidents of a specified year on a map...

Description Usage Arguments Value Note Examples

Description

This function takes a state number and year to import and subset the corresponding csv file. Records with missing longitudinal and latitudinal data are assigned default values. A map graphic of the specified state is generated with points representing individual records mapped on top.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric value corresponding to the state number

year

A numeric value corresponding to the csv file to be imported

Value

Returns a side effect map graphic of the state with all recorded accidents represented as points on the same map.

Note

If provided state number is not found in the data frame, an error is returned. If specified subset of data has no records associated with it, a message is returned.

Examples

1
## Not run: fars_map_state(1, 2013)

HaydenMacDonald/farsr documentation built on May 27, 2019, 9:34 a.m.