Quarto is a powerful tool that transforms R or Python code into beautifully clean reports. Lumo is a custom format for Quarto, enhancing the default appearance to make it even more polished and aligned with your brand. This document showcases how a lumo-styled document looks.
Quarto is probably my favorite tool in the R/Python universe. Transforming your code and thoughts into a stunning report in one click always blows my mind.
+
While the default Quarto appearance looks great, there are a few tweaks I always apply to elevate the report even further. Rather than manually adding them each time, I bundled everything into a custom format called lumo.
+
+
+
Btw, you can learn how to master Quarto thanks to my online course: Productive R Workflow
+
This document aims at showcasing how a quarto document made with the lumo format looks like.
+
+
+
Load Packages
+
Make sure to load all your packages at the start of your document for clarity and consistency.
+
Notice that the code chunks are folded by default. You can adjust this behavior with the code-fold option in the document’s YAML header.
+this package provides my favorite ggplot2 theme: theme_ipsum()
+
+
2
+
+because I was too lazy to find something better in the R Color Finder!
+
+
+
+
+
+
+
+
+
+
+
By the way, you should open the code chunk that is folded above. ⬆️ There is a little stunning surprise on its right hand side.
+
+
+
+
+
+
Main Features
+
+
Typography
+
You may have noticed the typography differs from the default Quarto style. I’ve also added extra spacing above each title for better readability, and underlined them to make the headings stand out more.
+
+
+
Header & Footer
+
The header is fully customized, complete with a fun GitHub corner linking to the original code. Plus, there are animated particles for a touch of whimsy. Scroll down, and you’ll find a custom footer as well.
Oh and since we’re here, did you know you can easily include a full width interactive map with leaflet in a quarto doc? 😍
+
+
+Code
+
# Load the library.
+library(leaflet)
+
+# Make a map
+leaflet() %>%
+addTiles() %>%# Add default OpenStreetMap map tiles
+addMarkers(lng =174.768, lat =-36.852, popup ="The birthplace of R")
+
+
+
+
+
+
+
+
+
+
How It Works
+
Lumo is a Quarto custom format. With a single command, you can add an _extension folder to your working directory, containing all the styles and content needed to create a report like this.
+
It takes less than 28 seconds, and you can find all the details here.
+
+
By the way, did you know you can link graphs together using ggiraph? Its syntax is quite similar to ggplot2 and it produces stunning, interactive outputs. Try hovering over one of the charts below!
It is very easy to insert an interactive table in your document thanks to the DT package. The output allows to filter rows, search for something and sort using a specific columns!
+
Install the library with install.packages("DT"). Then, just pass a dataframe to the datatable() function to get a stunning interactive output!
+
+
+Code
+
library(DT)
+data(iris)
+
+# Make a table
+datatable(iris, filter ="top")
+
+
+
+
+
+
+
+
+
I’ve added a bit of CSS to make the font smaller on DT tables by the way 🙂
+
+
+
A grey section
+
+
It’s always good to have a grey section. Makes the document breath a bit. I’ve added a little utility class in Lumo to make sure you can make sections like this very easily. Check the documentation!
+
Let’s use this space to render a little equation:
+
\[
+x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
+\]
+
+
+
+
Quarto Tricks
+
Lumo is a great format, but to get the most out of it, you’ll need to master a few Quarto tricks!
+
The good news? I’ve compiled my 30+ favorite tips in one place. Just spend 30 minutes, and you’ll be up to speed with all of them!
+
+
For example, if you’re creating multiple plots, each highlighting different aspects of your dataset, consider using pills to organize them!
You can also make a boxplot, but please do not hide the underlying distribution! This is widely explain in my data-to-viz.com project in case you’re not convinced 😋. Check the next tab to get convinced!