Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
Geographically plots highway fatalities from FARS data, subset by state.nm
and year
arguments.
1 | fars_map_state(state.num, year)
|
state.num |
Number encoding of state in FARS data. Argument can be input as integer or string. More information including codebook can be found at NHTSA website https://www.nhtsa.gov/research-data. |
year |
Four-digit year as integer or string of the data to be plotted. |
If state.num
not found in data, function stopped and "invalid STATE
number" error will be returned. If no data file exists for year
,
call to fars_read
will return "file does not exist" error.
If there are no fatalities for described subset, returns message "no accidents to plot"
If the given value for state.num is not a state in the dataset, a "invalid STATE" error is raised.
NULL value
1 2 3 4 | ## Not run:
fars_map_state(1, 2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.