Reference
Import data
Load and shape raw survey exports.
| parse_filename | Split a filename column into metadata columns. |
| read_folder | Read and stack every CSV in a folder. |
| select_prefix | Select identifier and prefixed columns. |
| select_suffix | Select identifier and suffixed columns. |
Select columns
The Python form of the tidyselect helpers R users pass to ezrsurvey.
| all_of | Select the columns named in a list, all of which must exist. |
| any_of | Select the columns named in a list that exist, skipping the ones that do not. |
| contains | Select columns whose names contain a piece of text. |
| ends_with | Select columns whose names end with a suffix. |
| everything | Select every column. |
| is_numeric | Tell whether a column holds numbers, as R’s is.numeric() does; for use with where(). |
| starts_with | Select columns whose names start with a prefix. |
| where | Select the columns for which a function returns True, such as is_numeric. |
Clean & recode
Turn messy survey columns into tidy, analysis-ready variables.
| add_region | Add region (and subregion) columns from a country column. |
| bin_numeric | Bin a numeric vector into labelled groups. |
| clean_label | Tidy an exported column name into a readable label. |
| drop_items | Drop unwanted answer categories from a question. |
| ensure_numeric | Coerce text to numeric, salvaging embedded numbers. |
| generation_scheme | Generational-cohort definitions. |
| na_blank | Convert blank and boilerplate non-answers to missing. |
| nps_group | Classify Net Promoter Score answers into groups. |
| recode_age | Recode age into standard survey bands. |
| recode_generation | Recode age or birth year into a generational cohort. |
| recode_likert | Recode a worded rating scale to integers. |
| recode_region | Look up the region or subregion for a country. |
| recode_subregion | Look up the subregion for a country; recode_region() with which="subregion". |
| split_multi | Split a packed multi-select column into one column per answer. |
Summarise
Percentages, summaries and cross-tabulations in one line.
| calc_percentage | Count a categorical question as percentages. |
| calc_percentage_batch | Percentages for a batch of questions at once. |
| calc_percentage_multi | Tabulate a check-all-that-apply (multi-select) question as percentages. |
| calc_summary | Summarise a numeric question (mean / median / sd). |
| clear_checkpoints | Delete saved cross-tab checkpoints. |
| crosstab | Cross-tabulate two survey questions as counts, percentages or an aggregate of a third column. The banner table builds its blocks from these crosstabs. |
| crosstab_banner | Build the market-research banner table: questions down the side, groups across the top, an Overall column first. Long runs report progress, confirm automatic selections and can resume from a checkpoint. |
Weighting
Post-stratification / raking applied automatically to the summaries.
| clear_weights | Remove the session weighting scheme, and the weight cache with it. See get_weights(). |
| clear_weights_cache | Forget cached survey weights. |
| get_weights | Inspect or clear the session weighting scheme. |
| has_weights | Tell whether a session weighting scheme is set. See get_weights(). |
| set_weights | Set a survey weighting scheme for the session. |
| weight_vector | Compute the per-respondent survey weights. |
Model
NPS and importance/performance modelling.
| calc_importance | Driver importance. |
| calc_nps | Net Promoter Score. |
| ipm_model | Build an importance / performance model. |
Compare
Differences between events, waves or segments.
| compare_values | Compare a metric between two datasets (e.g. two events or waves). |
| plot_diff | Diverging bar chart of differences. |
Diagnostics
Sampling precision and standard errors.
| diagnose | Survey precision diagnostics for one or more columns. |
| margin_of_error | Margin of error from a standard error. |
| precision_summary | Plain-language survey precision summary. |
| rse | Relative standard error. |
| rse_rating | Rate precision from a relative standard error. |
| se_mean | Standard error of a mean (point estimate). |
| se_prop | Standard error of a proportion. |
Currency
Convert monetary amounts between currencies.
| add_currency | Add a converted-currency column to a data frame. |
| convert_currency | Convert amounts between currencies. |
| list_currencies | List the currencies in a rate table. |
Plots
Presentation-ready static charts.
| plot_bars | Bar chart of a percentage table (auto-laid-out). |
| plot_gauges | Stacked score gauges (NPS over average quality, etc.). |
| plot_ipm | Importance / performance matrix. |
| plot_nps | NPS distribution slide (0-10 scale with group labels). |
| plot_nps_gauge | Score gauge with decision bands and a value marker. |
| plot_quotes_tree | Treemap of selected quotes. |
| plot_rating_grid | A stacked rating chart for a whole block of questions. |
| plot_stacked_rating | Stacked rating bars with weighted-average ordering. |
Brand
Adopt an organisation’s colours and typefaces for every chart.
| brand_info | Show the active brand settings. |
| clear_brand | Clear the active brand. |
| pal_brand | Brand colour palette. |
| scale_color_brand | |
| scale_colour_brand | Brand colour scale: discrete colours from pal_brand(). See scale_fill_brand. |
| scale_fill_brand | Brand fill scale: discrete fills from pal_brand(), interpolated when a chart needs more colours. |
| use_brand | Adopt an organisation brand from a PowerPoint or Word template. |
Themes & palettes
Visual identity for every chart.
| pal_neutral | |
| pal_nps | |
| pal_rating | |
| pal_sequential_blue | |
| scale_color_rating | |
| scale_colour_rating | Rating colour scale; the colour counterpart of scale_fill_rating(). |
| scale_fill_nps | NPS group fill scale. |
| scale_fill_rating | Rating fill scale. |
| theme_ezrsurvey | ezrsurvey plotnine themes. |
| theme_ezrsurvey_x | The ezrsurvey theme with faint vertical gridlines. See theme_ezrsurvey(). |
| theme_ezrsurvey_xy | The ezrsurvey theme with faint gridlines both ways. See theme_ezrsurvey(). |
| theme_ezrsurvey_y | The ezrsurvey theme with faint horizontal gridlines. See theme_ezrsurvey(). |
| theme_transparent | Transparent-background theme fragment. |
Decisions
Decision-band annotations.
| annotate_bands | Annotate a plot with labelled decision bands. |
| bands_nps | Detractor / Passive / Promoter bands over the 0-10 answer axis. See bands_rating_3(). |
| bands_nps_score | Needs work / Good / Great / Excellent bands over the -100..100 score axis. See bands_rating_3(). |
| bands_rating_3 | Built-in decision-band presets. |
| bands_rating_5 | Per-point bands over a 1-5 rating axis. See bands_rating_3(). |
| mark_value | Mark a single value on a plot. |
| rescale_bands | Move a band specification onto another scale. |
Scales
Tidy axis ceilings and percentage labels.
| label_pct | Percent label formatter. |
| nice_max | Round an axis maximum up to a “nice” value. |
| scale_y_pct | Continuous y-scale capped at a nice maximum, with percent labels. |
Save
Export tables and charts.
| export_summary_xlsx | Export a per-question summary workbook (table + chart per sheet). |
| export_xlsx | Export several tables to one Excel workbook, a tab each. |
| save_data | Quick-save a table to CSV, TSV or XLSX. |
| save_output | Quick-save any ezrsurvey output (plot or table). |
| save_plot | Quick-save a plot to PNG, SVG or PDF. |
Report
Decks, Word documents and Quarto reports.
| example_report | Copy the worked example report into a folder. |
| list_report_templates | Available Quarto report templates. |
| report_add_plot | Add a plot to a report. |
| report_add_slide | Add a slide (PowerPoint) or heading (Word) to a report. |
| report_add_table | Add a table to a report. |
| report_add_text | Add a paragraph of text to a report. |
| report_deck | Turn a dict of charts and tables into a titled deck or Word document in one call. Each item lands on its own slide, sized to the template’s content placeholder. |
| report_layouts | List the slide layouts of a PowerPoint template. |
| report_new | Start a new PowerPoint or Word report. |
| report_save | Save a report to disk. |
| report_section | Add a section-divider slide. |
| report_slide | Add a whole slide in one call (title plus its content). |
| report_title_slide | Add the opening title slide. |
| scaffold_report | Scaffold a Quarto survey-report template. |
Configuration
Options, the default dataset, reusable orders and profiles.
| apply_order | Apply a registered order to a vector. |
| clear_dataset | Remove the default dataset. See get_dataset(). |
| dataset_vars | The column names of the default dataset. See get_dataset(). |
| edit_ezrsurvey_profile | Open the ezrsurvey profile for editing. |
| ezrsurvey_options | Get or set ezrsurvey defaults. |
| ezrsurvey_profile_paths | Profile file locations ezrsurvey looks in. |
| get_dataset | Get, check or clear the default dataset. |
| get_order | Get the levels of a registered order. |
| has_dataset | Tell whether a default dataset is set. See get_dataset(). |
| list_orders | List registered orders. |
| load_ezrsurvey_profile | Load ezrsurvey defaults from a YAML profile. |
| order_for | Find the order that applies to a variable. |
| register_order | Register a reusable ordinal level order. |
| register_order_presets | Register a set of common ordinal scales. |
| remove_order | Remove a registered order. |
| reset_ezrsurvey_options | Reset all ezrsurvey options to their built-in defaults. |
| save_ezrsurvey_profile | Save current options and orders to a profile. |
| use_dataset | Set a default dataset for the session. |
| use_ezrsurvey_profile | Create a starter ezrsurvey profile. |
Comments
Select illustrative open-text comments.