scaffold_report
scaffold_report(
format='pptx',
path=None,
title='Survey Report',
author=None,
reference_doc=None,
overwrite=False,
)Scaffold a Quarto survey-report template.
Copies a ready-to-render Quarto report skeleton into your project, wired up with ezrsurvey helpers against the bundled podracing_survey data: an executive summary, per-question sections with placeholder narrative, and a methodology appendix built from the precision diagnostics. The skeletons run Python through Quarto’s Jupyter engine. Each declares one parameter, data, the path to a CSV of your survey (empty means the bundled example data), set with quarto render <file> -P data:my-survey.csv.
Corporate templates: Quarto/Pandoc fills a reference-doc by looking for the standard layout names (“Title Slide”, “Title and Content”, “Two Content”, …). A corporate template whose layouts keep those names works directly; one with renamed layouts will render broken or blank slides here. Build the deck with report_deck() instead, which inspects placeholders and works with any template.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| format | str | Output format: one of list_report_templates() (“pptx”, “html”, “pdf”, “docx”). Default “pptx”. |
'pptx' |
| path | str | Destination .qmd path. None (default) writes survey-report-<format>.qmd. A bare file name lands in ezrsurvey-outputs/ (created on demand), so the scaffold sits where its rendered output will; a path naming a directory (“./x.qmd”, “reports/x.qmd”, anything absolute) is used exactly as given. See the output_dir option. |
None |
| title | str | Title inserted into the template’s YAML header. | 'Survey Report' |
| author | str | Author name for the YAML header. None leaves a placeholder. | None |
| reference_doc | str | Path to a PowerPoint / Word template used as the Quarto reference-doc (pptx and docx only). None (default) uses the brand template registered by use_brand(), if any; pptx then falls back to the package’s built-in 16:9 template, docx leaves the line commented. |
None |
| overwrite | bool | Overwrite path if it already exists. Default False. |
False |
Returns
| Name | Type | Description |
|---|---|---|
| str | The path written. |
See Also
report_deck, use_brand, example_report
Examples
>>> import tempfile, os
>>> path = os.path.join(tempfile.mkdtemp(), "report.qmd")
>>> scaffold_report("html", path=path, title="Q2 Customer Survey")