summarize_trend: Summarize trend for either participants or churn

Description Usage Arguments See Also Examples

View source: R/data-dive.R

Description

To be run from run_visual_dive for preparing data for plot_trend

Usage

1
2
3
4
5
6
7
summarize_trend(
  priv,
  down = "None",
  across = "None",
  metric = "participants",
  pct = 10
)

Arguments

priv

data for one permission

down

variable name for optional facetting down. If "None", no facetting will be done.

across

variable name for optional facetting across. If "None", no facetting will be done.

metric

name of metric to summarize, either "participants" or "churn"

pct

sample size (in whole percentage points) for hist_samp

See Also

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

Examples

1
2
3
4
5
6
7
data(hist_samp)
priv <- dplyr::filter(hist_samp, priv == "all_sports")
summarize_trend(priv, pct = 1)
summarize_trend(priv, "sex", "age", pct = 1)

summarize_trend(priv, metric = "churn")
summarize_trend(priv, "age", metric = "churn")

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