Overview

Summary of core functions and sample data

salic

salic: Prepare Agency Dashboard Data

data_salic

Salic Sample Data Overview

Sample Data

Example of state agency data

cust

Sample Standardized Data: 30,000 Customers

lic

Sample Standardized Data: License Types

sale

Sample Standardized Data: Sales 2008 thru 2018

history

Sample Data: License History

metrics

Sample Data: Dashboard Metrics

dashboard

Sample Data: Metrics formatted for Dashboard Input

Data Formattting

Functions to check formatting guidelines for standardized data

data_check()

Check standardized data (cust, lic, sale) formatting rules

data_check_table() data_check_cust() data_check_lic() data_check_sale()

Check formatting rules for standardized data tables

data_foreign_key()

Check key coverage between two tables

License History

Functions to create a license history from standardized data

rank_sale()

Filter sales to 1 row per customer per year.

make_history()

Make license history table

history_check_sample() history_check_R3() history_check_lapse()

Checking license history

Dashboard Metrics

Functions to summarize dashboard metrics from license history

est_part() est_recruit()

Estimate participants by year from license history

scaleup_part() scaleup_recruit()

Scale segmented participation counts to total (if needed)

est_churn()

Estimate churn by year from license history

format_result()

Format estimated metrics for input to Dashboard

Category Variables

Functions for coding and labelling category variables

recode_agecat()

Create age category based on year (of sale) and birth year

label_categories()

Convert multiple numeric variables to factors

df_factor_var() df_factor_sex() df_factor_res() df_factor_R3() df_factor_age()

Convert numeric to factor in data frame and check

factor_var() factor_age() factor_sex() factor_res() factor_R3()

Convert numeric variable to factor

Southwick Processing

Functions/Data for Southwick-specific data preparation

check_dups()

Check for duplicates in a table

count_lines_textfile()

Count rows in a text file

recode_month()

Standardize month (for individual state dashboards)

recode_state()

Recode state abbreviations

summary_churn()

Summarize churn by year

summary_initial()

Summarize sales, customers, and churn by year

summary_sale()

Summarize sales and customers by year

state_abbreviations

Data: State/Province/Territory Abbreviations for US & Canada