fars_map_state: Creates a map of the state and plots the points where there...

Description Usage Arguments Details Value Note Examples

Description

Creates a map of the state and plots the points where there is an accident.

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

A character containing State Number

year

A character containing a year

Details

This function expects a valid state number and year. This function uses internal method make_filename to construct a file name, fars_read for reading the file to a dtaframe. Once the dataframe is populated, this function validates if the user passed state number exists in the dataframe and filters the records that match the state number. The coordinates in the dataframe are filtered and draws a graph based on the range of latitudes and longitudes and plots the points.

Value

This function does not return anything. It draws a plot having a map and the points.

Note

This function fails if the state number pased is invalid

This function fails if there are no entries of the state and year passed to the function.

Examples

1
2
3
4
5
6
## Not run: 
fars_map_state(1)
fars_map_state("2013")
fars_map_state(1, "1999")

## End(Not run)

SatishDivakarla/FarsPackage documentation built on May 9, 2019, 1:18 p.m.