fars_map_state: Plot Accidents on a map choosing a year and US state

Description Usage Arguments Value Examples

Description

Function that enables to obtain the statistics from .csv files from specific year and US State and plot on a map the number of acidents per geographical location It will read a group of files, select specific states, filter the imported data and plot the counts on a map using longitude and latitude

Usage

1
fars_map_state(state.num, year)

Arguments

state.num

a number that the US states that we choose to analyse and plot if the code state does not exists on the files imported the function will stop and show the message : "invalid STATE number: ", state.num", also if there's no accidents to plot the function will output a message saying :"no accidents to plot" and it will return NULL not ploting on the current device

year

a number that represents the year or years of the data to import. the user can import 1 year data or create a sequence like n:m (n<=m) and the function will read the files from year n to m

Value

This function creates a plot using maps

Examples

1
## Not run: fars_map_state(state.num=10134,year=2013)

blewy/r_package_coursera documentation built on May 7, 2019, 10:38 a.m.