fars_map_state: Draw a map of accidents (from the Traffic Safety...

Description Usage Arguments Value Note Examples

Description

This function plots a map of all accidents (except those with missing longitude and/or latitude information) for a particular state and year.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A state number as (or coercible into) an integer for which the map will be plotted

year

A year value in %Y format, the year for which the accidents will be plotted

Value

NULL. This function is used for it's side effect, namely a map of the accidents for a given state and year

Note

The data for each year should be in format "accident_<year>.csv.bz2". If a state number is not recognized, an error will be generated. Some states (e.g., state number 2 (Alaska)) cannot be plotted.

Examples

1
2
require(maps)
fars_map_state(8, 2015)

ValeriVoev/VRVPackage documentation built on May 30, 2019, 9:41 p.m.