library(finalassignmentx)

Detail

This package provides a simple set of 5 functions, allowing to load, summarize and plot FARS data, with some filtering functions.

make_filename

Produce standardized filnames for one or several years of data:

my_years<-c(2013, 2014, 2015)
my_filenames <- make_filename(my_years)
print(my_filenames)

fars_read

Read one standardized FARS file and store it into a tib data.frame:

my_data_2013 <- fars_read(my_filenames[1])
str(my_data_2013)

fars_read_years

Read several standardized FARS files in function of years specified in input, and store each file in one element of a list (only MONTH and year columns are preserved):

my_data_all <- fars_read_years(my_years)
str(my_data_all)

fars_summarize_years

Count the number of accidents for each month of every specified years:

my_summary <- fars_summarize_years(my_years)
my_summary

fars_map_state

Plot all accidents recorded a specified year in a state as black dots on a map:

fars_map_state(13, 2013)


thakurdev010/finalassignment3 documentation built on May 9, 2019, 1:17 p.m.