How rstudio/demo-co-quarto-report works
1. What this repo is
- This is a Quarto document project that produces a customer churn report for “DemoCo.”
- The architecture is centered on a single source document, with supporting data, styling, and publication assets around it.
2. Primary entrypoint
- churn_report.qmd is the main application surface.
- It contains the analysis narrative, code execution chunks, plots/tables, and the report parameter that switches the product segment being shown.
3. Data layer
- data/churn.csv is the report’s core input dataset.
- data/churn.R is likely the data preparation or generation script for that CSV, separating raw/derived data logic from the report itself.
- The report reads from this static data source rather than a live database or API.
4. Execution and rendering flow
- Quarto executes the R code embedded in churn_report.qmd, transforms the results into a formatted document, then renders either HTML or PDF.
- The repo includes a rendered artifact, churn_report.pdf, which indicates the output is checked in alongside the source.
5. Parameterized report boundary
- The report is parameterized by product with values Standard, Premium, and Professional.
- This makes the report behave like a small configurable application: the same source document produces different outputs depending on runtime parameter input.
6. Output formats
- The project produces two distinct deliverables: an HTML report and a PDF report.
- The README shows these are rendered as named Quarto targets (democo-html and democo-pdf), so the document has format-specific behavior rather than a single universal theme.
7. Custom Quarto extension layer
- _extensions/democo contains the custom Quarto formatting package used by the report.
- This is the main presentation boundary: it encapsulates shared branding and layout logic so the report content stays separate from theme implementation.
8. HTML-specific theming
- Files like custom.scss, logo.html, pagestyle.tex, and view-on-github.html suggest the extension controls branding, page chrome, and navigation/utility elements.
- SourceSans3/ provides bundled font assets, which means the report’s visual identity does not depend on external font availability.
9. PDF-specific theming
- demopdf.tex and related files define the PDF layout and color system.
- The README notes separate logo assets for HTML and PDF, which means the HTML and PDF outputs are intentionally styled as different presentation targets sharing the same content source.
10. Branding and assets
- images/ contains report visuals such as screenshots and the published report diagram.
- These assets support both documentation and in-report branding, but they are not part of the data pipeline itself.
11. Development and environment setup
- .Rproj and .Rprofile indicate an R/Posit-oriented project workspace.
- The intended authoring environment is RStudio/Posit tooling, with Quarto handling the document build process.
12. Publishing/deployment path
- The README shows the report is published to Posit Connect and can be scheduled weekly there.
- That means the deployment boundary is document publishing, not an application server: source code is rendered into static output and then hosted/scheduled by Connect.
13. Repo architecture in one sentence
- The repo is a parameterized Quarto reporting pipeline: static churn data feeds a single report source, custom Quarto extensions control branding and format-specific output, and the rendered HTML/PDF reports are optionally published to Posit Connect.
Main entry points: churn_report.qmd Churn report · README.md README · SourceSans3 Source Sans · churn.csv Churn data
Components 17
Report
Primary Quarto source and rendered deliverables
- Churn report · Parameterized report with narrative, analysis code, and format-specific content
churn_report.qmd - PDF report · Checked-in rendered PDF artifact
churn_report.pdf - Quarto config · Project-level Quarto build settings
_quarto.yml
Data
Static input dataset and its preparation script
- Churn data · Core input data used by the report
data/churn.csv - Data script · Script that prepares or generates the churn dataset
data/churn.R
Extension
Custom Quarto branding and format layer
- Extension config · Extension manifest for the Democo branding package
_extensions/democo/_extension.yml - HTML theme · Custom HTML styling and branding rules
_extensions/democo/custom.scss - HTML logo · HTML logo or header markup used by the extension
_extensions/democo/logo.html - GitHub link · Navigation or utility fragment for the report chrome
_extensions/democo/view-on-github.html - PDF page style · PDF page styling and layout customization
_extensions/democo/pagestyle.tex - PDF theme · PDF layout and color system for the extension
_extensions/democo/demopdf.tex - Source Sans · Bundled font assets for consistent rendering
_extensions/democo/SourceSans3
Publishing
Documentation and deployment targets
Workspace
R/Posit project setup
- Project · Workspace entrypoint for Posit/R authoring
demo-co-quarto-report.Rproj - Startup profile · Project startup and environment configuration
.Rprofile
Connections 17
- Data script → Churn data: generates · Preparation script produces the static dataset
- Churn data → Churn report: feeds · Report reads the churn data as its primary input
- Churn report → PDF report: renders · Quarto executes the report and emits a PDF artifact
- Quarto config → Churn report: builds · Project configuration drives report rendering
- Extension config → Churn report: extends · Custom extension provides shared formatting to the report
- HTML theme → Churn report: styles · HTML branding and visual theme are applied during render
- HTML logo → Churn report: brands · HTML markup contributes report identity
- GitHub link → Churn report: augments · Utility/navigation fragment adds report chrome
- PDF theme → Churn report: formats · PDF template controls the print layout
- PDF page style → Churn report: formats · PDF page styling is injected into the document build
- Source Sans → HTML theme: supports · Bundled fonts keep HTML rendering self-contained
- Source Sans → PDF theme: supports · Fonts also back the PDF presentation layer
- Images → README: illustrates · Screenshots and visual assets support documentation
- README → Posit Connect: describes · Documentation explains publication and scheduling on Posit Connect
- Project → Startup profile: loads · Project workspace uses startup configuration
- README → Churn report: documents · README explains the report targets and parameterized workflow
- Churn report → Posit Connect: publishes · Rendered report can be deployed to Connect as a static deliverable