Description Usage Arguments Details References See Also
View source: R/fars_functions.R
Display crashes for a state according to their MIPS code for a specified year.
1 | fars_map_state(state.num, year)
|
state.num |
The FIPS state code that corresponds to a state. The FIPS state code of American territories such as Puerto Rico or American Samoa are not guaranteed to work, especially if the dataset doesn't contain information on those territories. |
year |
"character" or "integer" representing the year in XXXX format (e.g. 2013). |
Note that the year specified should be available on the current working directory, e.g. for year = "2013" the file "accidents_2013.csv.bz2" should appear when calling dir()
in your instance.
Do note that the following packages are needed: dplyr, tidyr, readr, magrittr, purrr, and maps.
Wikipedia Article on FIPS codes for a key between state.num and the region/state you want to input. https://en.wikipedia.org/wiki/Federal_Information_Processing_Standard_state_code#FIPS_state_codes.
Other FARS functions:
fars_read_years()
,
fars_read()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.