fars_map_state: 'fars_map_state' function allows to plot cases on a map based...

Description Usage Arguments Value Examples

Description

fars_map_state function allows to plot cases on a map based on a state number and specfic year data the function takes two arguments: a state number and year which serve as inputs in the first 2 functions created above. to make sure the remaining functions work appropiately, state number is converted as integer then, if the state number is not included in the data, an error will appear as "invalid STATE number xxxxx" otherwise the data will be filtered with that state number. in case the filtered data does not have any cases a message will appear that no accidents can be ploted. If there cases, longitude and latitude data are assigned to cases with NULL longitude and latitude. finally, a map with cases ploted is created based on the state and year specified as arguments

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A state number to plot cases in a map

year

A year of data to plot cases in a map

Value

a graphic that shows the map of cases for a specific state number and year

Examples

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

johans27/fars6 documentation built on May 25, 2019, 6:24 p.m.