run_state: Run 3 permission summaries for select state in select time...

Description Usage Arguments See Also

View source: R/sa-states.R

Description

This basically wraps the entire dashtemplate workflow into 1 function by (1) loading sqlite data, (2) applying some minor recoding and data checks, and (3) Applying run_group across the provided groups. It returns a summary dataset (formatted for Tableau) and optionally writes a csv output based on the outdir argument. The state-level csv files will ultimately be combined into 1 national/regional file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
run_state(
  st,
  yrs,
  timeframe,
  outdir,
  groups = c("all_sports", "hunt", "fish"),
  output_csv = TRUE,
  db_license = file.path("E:/SA/Data-production/Data-Dashboards", st,
    "license.sqlite3"),
  ...
)

Arguments

st

2-character state abbreviation

yrs

years to include in dashboard

timeframe

time period covered ("full-year" or "mid-year")

outdir

location for output csv (named based on input state).

groups

names of permissions to be summarized

output_csv

if TRUE, will write a csv to outdir

db_license

file path to production data

...

additional arguments passed to run_group

See Also

Other functions for SA state dashboard summaries: run_group()


southwick-associates/sadashreg documentation built on Jan. 7, 2022, 1:35 a.m.