load_cust_samp: Load a 10 percent sample of all sportspersons

Description Usage Arguments See Also Examples

View source: R/data-dive.R

Description

Every customer who holds a hunting or fishing permission at some point over the timeframe has an equal chance of being selected. We use a sample for the data dive to ensure a usable file size & sufficient responsiveness.

Usage

1
load_cust_samp(db, yrs, pct = 10, group = "all_sports")

Arguments

db

file path to sqlite database

yrs

years to be included from sqlite table

pct

Sample size to draw, in whole percentage points (defaults to 10 percent)

group

name of selected permission

See Also

Other data dive functions: drop_state_code(), filter_demo(), get_county_map_dive(), plot_county_dive(), plot_dist(), plot_trend(), run_visual_dive(), set_nonres_county_na(), set_other_county_na(), summarize_trend()

Examples

1
2
3
4
5
6
## Not run: 
db_history <- "E:/SA/Data-production/Data-Dashboards/IA/history.sqlite3"
cust_samp <- load_cust_samp(db_history, 2006:2018)
dplyr::glimpse(cust_samp)

## End(Not run)

southwick-associates/sadash documentation built on Jan. 6, 2022, 5:17 p.m.