fars_map_state: Plot map of accident locations in a year for a state in the...

Description Usage Arguments Details Value Note Examples

Description

This function plots a map representing accident locations for a valid state number and a valid year as input

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A numeric or character string represting a valid state number

year

Numeric or Character String represting a calendar year

Details

This function, takes a valid state number as input (using state.num) and a valid year (using year) as inputs, creates a filename (using make_filename) that represents accidents data in the given year, reads the dataframe (using fars_read), subsets the dataframe for the given state and plots the accident locations using Latitude and Longitude data points

Value

Plot a map/ graphic of accident locations for a particular state in the US

Note

Functions stops or shows error message for invalid state number & year or if any argument is left blank

Examples

1
2
3
4
## Not run: 
fars_map_state(1,2013)
fars_map_state("1","2014")
## End(Not run)

amolz/AnalyzeFatalities documentation built on May 23, 2019, 6:03 a.m.