demographic_profiles: Wrapper function to create demographic profile plots

Description Usage Arguments

View source: R/demo_profiles_redshift.R

Description

Wrapper function to create demographic profile plots

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
demographic_profiles(
  aggregation_level,
  experian_table_name,
  experian_pii_table_name,
  additional_demographics_tbl = NA,
  additional_demographic_list = NA,
  additional_demographics_levels_and_x_axis_title = NA,
  custom_palette = NA,
  user_universe_list,
  user_universe_names,
  base_universe_tbl = NA,
  base_universe_name,
  plot_save_location
)

Arguments

aggregation_level

(string) "person" or "household" if "person" aggregation will use person_id605 if "household" aggregation will use id605

experian_table_name

(string) non PII experian table name

experian_pii_table_name

(string) PII experian table name

additional_demographics_tbl

(remote table) distinct rows of id605 or person_id605 + additional should already coded and ordered additional demographics

additional_demographic_list

(list of strings with names) list of additional demographics to plot with names

additional_demographics_levels_and_x_axis_title

(nested list) levels and x axis titles of additional demographics

custom_palette

(list of strings) color codes for custom color palette - MUST BE LENGTH 8

user_universe_list

(list of remote tables) each remote table should be just a table of 1 column = id605 or person_id605

user_universe_names

(list of strings) names of the universes from user_universe_list - must be in the same order

base_universe_tbl

(remote table) function will use the id605s from the inner join of the 2 experian tables if self defined, should be a remote table with a column of id605/person_id605

base_universe_name

(string) Label name for the base universe in the plots

plot_save_location

(string) directory path to the location the tables should be saved in


605data/DemoProfiles documentation built on June 12, 2020, 12:01 a.m.