Description Usage Arguments Details Value Examples
This function maps accidents in individual U.S. State in a given year
1 | fars_map_state(state.num, year)
|
state.num |
the unique identification of a U.S. state |
year |
relevant data year |
For a given year value, this function read the relevant data file
using the make_filename
and fars_read
functions.
It checks that the stae exists and that any accidents were reported that year in that state.
The function also removes erroneous longotude and lattitudes entries in the raw data
(longitude>900
and lattitude>90
) and uses the map
package to
draw the relevant map and the graphics
package to plot dots.
a long/lat plot of reported accidents in the U.S. state and year of choice against a state boundary map
1 2 3 4 | ## Not run:
fars_map_state("12","2013")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.