units <- function(crashid = NA) {
traffic_data <- readRDS('../data/txdot_cris_crashdata_201601_201802.rds')
if (is.na(crashid)) {
return(traffic_data$units)
} else {
return(traffic_data$units %>%
dplyr::filter(Crash.ID == crashid)
)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.