A practical guide to generating hundreds of customized reports using Quarto and Python. Learn how to leverage Quarto's parameter system to create PDFs and HTML reports at scale. Using a movie dataset example, we'll cover:
- How to automate report generation with Python and Quarto
- Create dynamic templates with data visualization and formatting
- Adapt parameters to work with both Python and R code
- Build scalable reporting workflows for any dataset
This tutorial demonstrates how to transform what could be hours of manual reporting work into an efficient automated process.
Quarto Crash Course Video: https://youtu.be/_VKxTPWDhA4?si=Q09V5xXlyo1YVQqs
Generating Analytics Reports (typst) Video: https://youtu.be/Q3phTByW138?si=FIMiAWAHP6HhUnhG
Link to Code (starting): https://github.com/KeithGalli/quarto-crash-course
Link to Code (finished): https://github.com/KeithGalli/quarto-crash-course/tree/parameterized-reports
Information on the dataset can be found here:
https://github.com/KeithGalli/quarto-crash-course/tree/master?tab=readme-ov-file#resources
Video timeline!
0:00 - Video Overview
0:58 - Walking through some starter code (linked in description)
3:20 - Passing parameters with Python into Quarto Markdown Files
4:27 - Passing parameters using R
5:18 - Using a Python script to render many reports with variable parameters.
6:36 - Dynamically generating markdown sections with Python (output: asis - execution option)
11:56 - Adding images, table of contents, & pagebreaks to our reports
15:00 - Adding graphs to our reports
17:54 - Tying everything together
21:47 - Adding fenced divs & styling/formatting dynamically with code