knitr::opts_chunk$set(echo = TRUE)
The faRs package allows users to load and map data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System, which is a nationwide census providing the American public yearly data regarding fatal injuries suffered in motor vehicle traffic crashes.
The package allows for quick and easy visualization that allows for direct comparison of accident data between states and across different years, for instance we could compare accidents in Illinois and Indiana for 2014:
library(faRs) library(maps) par(mfrow=c(1,2)) IL<-fars_map_state(17,2014) IN<-fars_map_state(18,2015)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.