Include some notes here about your assessment of the final validation.
knitr::opts_chunk$set(comment = NA) library(tidyverse) library(lubridate) library(DBI) library(salic) library(salicprep) source("../params.R")
con <- dbConnect(RSQLite::SQLite(), db_production) lic <- tbl(con, "lic") %>% collect() cust <- tbl(con, "cust") %>% select(cust_id, birth_year, sex) %>% collect() sale <- tbl(con, "sale") %>% select(cust_id, lic_id, year, dot, res) %>% collect() dbDisconnect(con)
hunt <- lic %>% filter(type %in% c("hunt", "combo")) %>% left_join(sale, by = "lic_id") %>% left_join(cust, by = "cust_id") %>% label_categories() %>% recode_agecat() summary_initial(hunt) plot_demo(hunt, c("sex", "agecat", "res"), trend = TRUE)
fish <- lic %>% filter(type %in% c("fish", "combo")) %>% left_join(sale, by = "lic_id") %>% left_join(cust, by = "cust_id") %>% label_categories() %>% recode_agecat() summary_initial(fish) plot_demo(fish, c("sex", "agecat", "res"), trend = TRUE)
sale <- mutate_at(sale, vars(dot), "ymd") summary_year_dot(sale, lastyr) %>% knitr::kable()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.