Quarto with Python


Lucas A. Meyer


July 7, 2022

I am a firm believer in “learning out loud”, that is, writing about what you learned.

In the last few weeks, I have been learning how to use Quarto with Python, while creating a presentation and a website using it.

What is Quarto?

Quarto builds on top of RMarkdown and adds native support to Python. It integrates extremely well with VS Code and Jupyter notebooks. It allows you to write code for computers while also generating content that is fit for humans to read. My blog, my Twitter, and my LinkedIn posts in the last month have all been written in Quarto, including this one. Most do not contain any code, but many do. I wrote code to automatically publish new posts to social media.

Quarto is from the same authors that wrote RMarkdown. New features for RMarkdown will be added to Quarto.

Should you learn Quarto?

If you produce data-based content for humans, like data journalism, reports that include data analysis or scientific articles, Quarto is an excellent choice. It’s scriptable and reproducible. Quarto source code is text-based, so it can be saved to git.

You can generate PDFs, PowerPoints, Word documents and interactive websites. Quarto can also be the start of an workflow that automatically generates a Word document or PowerPoint, which will then get further refinement, like commentary.

How to learn Quarto?

Quarto has an excellent tutorial to get you started. I also wrote my own guide as I learned it.