knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(assignment04)

This vignette shows how to plot a map for FARS occurrences using the fars_map_state function.

The first thing we need to do is make sure that our current working directory has FARS data files named accident_{year}.csv.bz2, where {year} is a 4 digit number, e.g. 2013.

list.files(pattern = "accident_*.csv.bz2", recursive = FALSE)

Then, we simply need to call the fars_map_state function with the state and year we are interested in plotting.

fars_map_state(1, 2013)

And there we have it.



adbjesus/assignment04 documentation built on July 2, 2020, 6:24 p.m.