Resources

Quarto Dashboards: from zero to publish in one hour

From R/Medicine 2025 You already analyze and summarize your data with R and Quarto. What’s next? You can share your insights or allow others to make their own conclusions in eye-catching dashboards and straight-forward to author, design, and deploy Quarto Dashboards. With Quarto Dashboards, you can create elegant and production-ready dashboards using a variety of components, including static graphics, interactive widgets, tabular data, value boxes, text annotations, and more. Additionally, with intelligent resizing of components, your Quarto Dashboards look great on devices of all sizes. And importantly, you can author Quarto Dashboards without leaving the comfort of your “home” – in plain text markdown with any text editor. In this one-hour demo we will build and publish a Quarto Dashboard – you can code-along or sit back and enjoy the show! Mine Çetinkaya-Rundel, Professor of the Practice at Duke University and Developer Educator at Posit Mine’s work focuses on innovation in statistics and data science pedagogy, with an emphasis on computing, reproducible research, student-centered learning, and open-source education as well as pedagogical approaches for enhancing retention of women and under-represented minorities in STEM. Mine works on the OpenIntro project, whose mission is to make educational products that are free, transparent, and lower barriers to education. As part of this project she co-authored four open-source introductory statistics textbooks – latest is the 2nd edition of Introduction to Modern Statistics. She is also a co-author on R for Data Science, the creator and maintainer of Data Science in a Box, and she teaches popular data analysis and data science with R courses on Coursera. Mine is a Fellow of the ASA and Elected Member of the ISI as well as a Waller and Hogg award winner for teaching excellence. In 2024, she was elected as Vice President of the International Association for Statistical Education (IASE). Resources R/Medicine: https://rconsortium.github.io/RMedicine_website/ R Consortium: https://www.r-consortium.org/

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

It looks like it's that we can get going here now, and I am pleased to announce this demo on Quarto Dashboards from zero to publish in one hour by Vinay, and I will turn it over to you. All right, wonderful. Thank you very much, and thanks for having me.

I'm going to share the link to the slides one more time, and I'll do so again when we get close to the demo piece of it. So if you're here, you probably know about Quarto and Dashboards, but Quarto is an open-source scientific and technical publishing system, and the goal of Quarto is to make the process of creating and collaborating dramatically better.

With Quarto, you can weave together narrative, text, and code to produce elegantly formatted output. This output could be an HTML file, a PDF file, a Word file, and a lot more, including Dashboards since Quarto 1.4. And we are at, so I'll be using the pre-release version of Quarto, which is 1.8, which I happen to have installed, but if you have 1.7 installed, which is the release version, that's totally fine as well. There's been no changes regarding any of the things that I'll be demoing today.

So it has been around for some time, though it is one of the newer features of Quarto as opposed to one of the original ones. So if you are going to be following along as I demo, which may be a bit of a ride because we're going to go through some things quickly, but especially if you're thinking that you may do this in your own time later, make sure that you check your Quarto version if you haven't installed it over the last couple of years and make sure that things are up to date.

Overview of Quarto dashboard examples

I'm going to scroll through a few slides here with some dashboards in them, and what I want you to take a look at is, well, first the fact that you are going to be seeing some dashboards where the computation is done in R and some in Python, and unless you have a really keen eye for the various libraries that are being used, I think it'll be quite difficult to tell what the computation was done with.

But additionally, I want you to think about is the information organized in rows or is it organized in columns first and foremost, because that's going to be the thought process for building Quarto dashboards. So here, for example, I'm seeing three rows of content. Some of them are split into columns. Here I'm seeing a sidebar, but again, three rows of content.

So the idea when you're thinking about building a Quarto dashboard is whether you primarily want to organize things in rows or columns.

The dashboard we're building today

So let's go ahead and get to the dashboard that we're actually going to build today. We're actually going to be working with the UseR schedule. We're hosting UseR at Duke, and I am one of the organizers. This was one of the TidyTuesday datasets as well, but if you've played with it, it's actually been updated to reflect some more recent changes there.

So I was thinking about what dataset could we use that could be relevant to the folks here, but also something that I know something about, and medicine is not my expertise area per se, so I decided to go with this. So we're going to build this dashboard, and if you are looking at the slides on your own end, feel free to click on the link here to see the live page as well.

But before you go there, let's take a look. I am seeing that there are two main pages on here. One is called Overview, and the other is called Schedule. And then the information is first and foremost organized in columns. I have an in-person program column, and then a virtual program column, and then within it there are rows. So that's an idea that we're going to come back to.

And if I was to click on the live dashboard itself, I can then click on the other page too. And here we're seeing really only a single content area, but we have tabs that go – that are embedded in here, and we also have the functionality to switch over to dark mode. And you can see that as we switch to dark mode, our plots are updated as well, as our tables. So we have not just the background of the Quarto dashboard, but the elements in it as well.

Dashboard basics: cards, rows, and columns

Now let's start with some dashboard basics to cover. Cards are the main building blocks of Quarto dashboards. And we can organize the cards in a variety of ways, in rows and in columns. And layouts allow us to add pages, as we've seen, tab sets, and also a sidebar as well. In the one that we're going to build today, we don't have a sidebar, but we've seen a few in the examples earlier with sidebars too.

So we're going to make this dashboard step-by-step, and we're going to be coding in R for the computational cells. If you also code in other languages, like Python or Julia, just about everything that we're saying Quarto syntax-wise should apply. Obviously, what goes in the code cells would change. And based on sizing and sort of like formatting, you may need to play with sort of the look a little bit more, but everything that we're saying Quarto syntax-wise should stand.

Building a baby dashboard first

So let's make our first dashboard in R a baby dashboard before we get to the real one. So I'm going to start with the YAML for my document. And the important thing is that I am setting my format to be dashboard. Yes, a dashboard is ultimately an HTML page as well, but format HTML refers to a document. So here we have a dashboard as the Quarto format, and we have a title as well. And then I've added two code cells to it. One of them is loading a package, and the other one is building a plot.

The one that's building a plot is actually going to result in what we call a card. So a few things happened here when we rendered the document. One, I didn't explicitly say hide my code. So eco is set to false by default for dashboards with the understanding that this is likely a presentation medium, and you probably don't want to show your code. And you can see that any code cells that don't have an output sort of like don't present themselves in the rendered dashboard.

And the R plot itself is placed into this card with these faint gray lines. And you should be able to see over here, there's a little button. When we take a look at the live dashboard shortly, we're going to see that that little button allows you to expand the card further.

If I now go ahead and add another code cell, another plot, that's going to create another card for me. And also something that happened is that automatically these cards got placed on top of each other. Because by default, Quarto is going to create these two outputs in a single column and in rows, so stacked on top of each other.

And I can add a code cell option title, which is not something you would use with other Quarto formats. But in dashboards, the title code cell option is actually a functional option. And that actually creates a title for the cards that we're building, and it formats it nicely. And if you were to change the theme that you're working with, that will get updated nicely to align with your theme as well.

All right, so that's in four steps, we have a dashboard with basically two plots in it. And we can see that we got a little bit of bells and whistles for free, Quarto brought for us simply by adding some code cells into it.

Starting the live demo

So let's go ahead and build. If you would like to see the slides, get access to the slides, we share the links in the chat here as well. These slides are also made with Quarto. So if you would like to take a look at the source code for the slides themselves, just because you want to maybe you like something about the slides, or you want to get something and use it yourself. Those are also included in the GitHub repository where the dashboard is as well.

We are going to start with a document that is labeled user 25 start. And I'm going to show you this document in a second that is just a plain HTML, a plain Quarto document that will render to HTML sort of like as a report, and we're going to update it to be this fancier dashboard that we're making. If you'd like to follow along now or work on it yourself later, you can go to this GitHub repository.

And you will be able to see in the that in this GitHub repository, there is a button called use this template. And you can create a sort of basically a clone of this repo for yourself. And then grab that repo, clone it and open it in your preferred ID or your editor. And then you can start modifying this QMD file along with me.

So let me go ahead and share that in case anyone is interested in doing so. I will say that most of the time I will be typing, but sometimes I'm going to bring in a chunk of code that I've prepared ahead of time. So it may be, you know, sort of frustrating to try to keep up with it. I would encourage you to sort of like follow along and ask questions and then come back to it later in your own time.

And our goal is to basically get to this, or as close as we can in an hour. And we're going to make sure that we deploy the dashboard on Quartopub as well.

Reviewing the starting document

So this UseR25 Start document is what we're going to start with. Let's go ahead and review this document, see what it looks like, and go from there. It has the same information as the dashboard, just fewer bells and whistles.

So we're loading some packages, we're loading our data, and I have pre-saved some colors that are going to be helpful for us. I think about this as declaring some variables. It's entirely personal choice. Whether you want to use these colors or not, but I've at least saved these ones so that I'm not typing hex codes and confusing you along the way. So we can really focus on the Quarto and the R aspects of the dashboard.

And I also have a helper function called Make Schedule. And really, all it's going to be doing is taking a data frame and also a custom color that I might want to give it, and making a table with GT. This is what we're going to be seeing on the schedule. Those tables were made with GT.

So let's scroll down. We have some numbers here. We've seen these as value boxes in the dashboard. So we've calculated these numbers, how many keynotes, how many tutorials, so on and so forth. We also have a visualization of the number of different types of sessions on each day of the in-person conference.

That GG plot looks really stretched out, but we'll get to that later. But that's basically a bar plot that's faceted by day. And we also have a word cloud of themes, emerging themes. And this is basically just looking at the keywords that are going to be used in the just looking at the keywords that participants or the speakers for UseR have submitted when they submitted their talk pitches.

And we're just counting them, finding the frequencies. And I think this should be, if I remember correctly, filtering for any keywords that appear more than once. And there may be some keywords that are actually not showing up in this word cloud if they happen too few times and they don't fit in there.

We also have similar information about the virtual program. And then on what will be our second page of our dashboard, we have these tables that are made with GT that basically have this functionality to show more information about the program itself. If you have been to the UseR website, this should look familiar to you.

And that make schedule custom function that I had written basically makes this GT table. Now, what's the takeaway here? The important thing is that I am making four of the same table for different days of the conference. That's why I wrote a single function that does the same sort of formatting and the same actions to the data set so that we can present them in the same way. The virtual program is identified in green, and the other days have blue coloring to them.

So this is our starting point for our dashboard. So the title of this demo, From Zero to Quarto Dashboard, is a lie. As you can see, we're not going to start with zero. But all we're starting with sort of is the analysis portion of things that's done. And we're going to turn it into a dashboard.

So the title of this demo, From Zero to Quarto Dashboard, is a lie. As you can see, we're not going to start with zero. But all we're starting with sort of is the analysis portion of things that's done. And we're going to turn it into a dashboard.

Converting the document to a dashboard

I am going to start by taking out this table of contents. The idea of table of contents doesn't really make sense in a Quarto dashboard. And I am then going to simply say, let's make this a dashboard. And let's see what happens.

So we get some things that look good and some things that make no sense whatsoever. My first level headings, so my headings that were overview and later on, if I go in my outline schedule, ended up being the two pages of my dashboard. And then every single output from an R code cell ended up being a card, one of these expandable cards. So the content that I want for my dashboard is here. But it's obviously not organized in the way that I would like it to be organized. So let's go ahead and tackle this organization problem first.

We are going to start with sort of creating the right hierarchy for our dashboard so that we can have the rows and columns as we like.

So we have my overview. And this is going to be my first page. And remember that my dashboard was organized in columns. So the first thing that I'm going to do is to say that I want my orientation to be columns. And then we are going to create these two columns. One of them is the in-person program. That was a much wider area because there's a lot more going on the three days of in-person program than the virtual program. So I'm going to give this a width of 70%.

And then I am going to go to my virtual program and give that a width of 30% adding up to 100. And let's go ahead and click on render on save just because we're going to be doing this over and over. So my goal now is to create the two columns that I'm interested in, which seems to have happened. And let's also observe a few other things that happened.

The title for my page, my first level heading, the word overview is in my code and also visible here. Unfortunately, though, or maybe fortunately, I'm not sure, but the title for the second level heading, which basically identified the columns is not visible here. So the text that you see here in the code is optional. We could have completely avoided it. What I generally like to do is I like to leave myself notes about what these things create.

So this is going to be a column. And then I want to still make a title for that column. And I'm going to do that with something like this. Let's make it a bolded text in-person program.

So now I have a card that says in-person program in it. The expand buttons coming for free with Quarto dashboards is great for something like a plot and really silly for something like a text box like this. So we can actually have finer control on these cards, even though each piece of text or each piece of computational output gets a card by default. We can manually create cards with fence divs as well. So that's three columns. And then I'm going to say this is a card. And then I can say that I don't want it to be expandable. So I'm going to set expandable to false.

So now we go ahead and we can see that we're going to get that title. And we are not going to be seeing the button for expanding things. I also would like this to be much skinnier. So I'm going to add another layer. So let's call this title. And we used width for columns. So we're going to use height for rows. Let's make this 5%, something tiny.

All right, that looks a lot better to me. And let me go ahead and make similar changes on the virtual program as well. So what were some things that we did here? We said this denotes a column. And this is going to be the virtual program.

Adding value boxes

So now we have two title cards that are equal height that we have here. Let's go ahead and tackle now this tabular output. Remember, these are going to be value boxes instead. So instead of presenting this information as a table, we're going to present each piece of this information as value boxes. So the first thing I'm going to do is I'm going to actually go ahead and remove the table from printing. So we do want the values to be calculated, but we don't want them printed as a table.

And instead, what we're going to do is let's create another row. These are my value boxes. Remember, this text is optional. It's just something that's helpful for me to remember what's in that row. And it also then gets presented in the document outline as well, which is nice. And let's give it a width. I'm going to say 30%.

And let's go ahead and create those value boxes. Each one of these value boxes can be created as a code cell. And there are a few pieces of information we want to give for these code cells. First of all, I want to set the code cell option content to value box. And then I want to give it a title. Let's start with the keynote. That was the first value box in our dashboard. And then let's go ahead and actually make the value box itself. In R, we can use a list for that.

The icons are bootstrap icons. So I'm going to use a mic for this. The color. So here is where I'm going to cheat a little bit. I have pre-programmed some colors here. And so we're just going to use these as opposed to spending a bunch of time browsing through colors while we're also trying to build the dashboard in an hour. I'm going to use the keynote color. And the value. So we want this number five. How do we get this number five?

We can take this data frame or table. We can filter for where session simplified. Since I didn't run that code in my console, it's not helping me, is equal to keynote. And then we can say pull the column in. So let's go ahead and see what that looks like.

All right. So we have our first value box. And we need to make a bunch of these. This is going to be the slightly annoying piece where we're making a bunch of them. But hopefully, it is not too bad. I think we had five of these things to make.

And they are going to be tutorials. So after keynotes, we have tutorials. And then talks. Lightning talks. And posters. As you can imagine, we can go ahead and change what we're filtering for easily here.

So this gives us the value boxes that we wanted. And we're probably going to want to look for some new icons for these. So let's go ahead and look for bootstrap icons. So what I usually do is maybe I go somewhere like this. And maybe for the tutorials, I might want something like code. So let's go ahead and say I'd like code square. Code square.

And we can go ahead for tutorials and change that icon to code square. For talks, we're going to do a mic that's not filled. For lightning, it turns out there is a lightning icon. And for poster, I think what I had originally was a clipboard. Which is not a poster. But that was the closest image I could find to what I think of as what a scientific poster might look like at a conference. So there we go. We have our value boxes. They're equally spaced, equally sized. The space that we had allotted has now been sort of dedicated to these value boxes themselves.

Sizing and theming the plots

The next thing we're going to want to do is deal with these figures that are looking truly awful at this point. So first of all, let's go ahead and deal with the first one, which is the daily count.

And once again, I'm going to say this is a row. And I would like it to be a height of, let's say, a height of 30%. Let's go ahead and see what that gets us in terms of the space.

And the next one with beams is also a row. And this one, I think all we have left is 40%. Now, remember that we want a little bit more here in terms of these cards. So let's go ahead and give them titles. We can call this daily session counts. And for the themes, we can call it emerging themes.

And those are going to get the nice card title treatment in the code cells, obviously making the plot shrink a lot more. But we'll get to that in a sec.

So plot sizing is tricky, particularly when you're working in a limited area, like the viewer of your IDE. So I'm going to go ahead and pop this out first of all. Let's go ahead and get rid of this window here. I'm going to go ahead and pop this out and make it a little bit bigger.

So things look a little bit better here. And then let's go ahead and play with figure sizing like you usually do in Quarto. So fig height, I want it to be pretty skinny in terms of the height. I'm going to say 1.75. And fig width, we want it to be wide. So let's go ahead and try 10 and see what that gets us.

All right, there we go. That's looking a lot better and a lot more legible.

And then the other thing that we're going to want to do is a similar treatment for the themes plot as well. So let's go ahead and grab what we've done here. And use sort of similar sizes. I'm going to say 2.5 and 8 here.

All right, if we were to just forgive ourselves for a second from the second column and just focus on the first column, things are looking pretty good.

Adding light and dark themes with brand.yaml

But one of the things I showed earlier was that we're going to also have a light and a dark theme in place. And right now, we don't have that. So why don't we go ahead and tackle that next? And then we're going to come back to finishing up the second column.

So in order to have a light and a dark theme, you have a variety of options. And so I'd like to talk a little bit about a newer way, instead of writing an SCSS file from scratch, using the brand.yaml functionality in Quarto to create themes.

So I'm going to say that we are going to create a new YAML field called brand. And we're going to have a light and a dark option for it. And then these blanks are supposed to be two files that we reference. Let's go ahead and create those files first. So I'm going to go ahead and I can probably just do it here. Let's see, a new folder that I might call brand. And in that new folder, I'd like to create a new file called lightbrand.yaml. And also, we're going to create a darkbrand.yaml as well.

Okay, let's start with a light one. One, something that might be a little bit easier to tackle. And let's make some choices. So some of the things that we might want to tackle here is the colors. So let's start. Let's go ahead and denote some colors.

And one nice thing that you can do in a brand.yaml file is give a palette. So you get to name your own color. So I'm going to name a light gray, a dark gray, and a blue that I want to use that matches with the UseR blue that we were using on the website for UseR. And then we can set these particular colors to particular elements of the dashboard.

So bear with me while I just write down these colors. In general, for dark, I like to use a dark gray as opposed to a black, particularly when doing these light and dark themes. I think it tends to be a little bit softer.

Okay, so now that I have encoded these colors, I can say that I want the foreground to be dark gray. So that's going to be the main text. I want the background to be white. And I want the primary, so something like the navigation bar, for example, to be light gray as well.

All right, and then what we are going to do is say this is going to be the light brand.yaml. I'm currently getting an error when I try to render this because obviously I have some syntax that doesn't make sense here. So let's go ahead and grab these same colors, put them in the dark brand, but this time change some things around.

The foreground should be light gray. The background should be dark gray. And the primary should be a medium gray. I'll add that in a second. And the secondary should be medium gray as well. So let's go ahead and add that medium gray too.

Okay, let's see if now we can render this again. See if we have gained that dark light toggle. And we have, in fact. And we can see that the color on the navigation bar is changing. The color of the background is changing. The cards themselves are getting affected. The plots look awful white in the middle of them. And it looks like we may want to play around with some more colors as well in terms of how some of these colors are presenting in front of the darker colors when we go to dark mode.

Light and dark plot renderings

Let's go ahead and tackle the plots first because that I think is going to be most important and most useful for folks. So another newer Quarto feature. Let me go ahead and get to this daily session count.

A newer Quarto feature is being able to give two plots in a code cell and then set the renderings code cell option. And we can just say this is going to be the first plot is going to be the light and the second plot is going to be the dark. So my first plot is basically this plot here. I'm going to say this is my light plot.

And my second plot, I need to make it as well. But because I'm building with ggplot, I can probably just go ahead and add more to the theme. A few things that I might want to do is change the plot background. Color, so fill should be dark gray that we've been using. The color, which is the boundary, should be dark gray that we've been using.

Another thing we may want to change is the axis text. To make it a lighter color. And also, similarly, the text in the, for the, for the panes, when we're facet them, the titles of the panes as well. Let's make those white too.

So you can see that this now is a code cell that outputs two plots. But what's going to happen is because we've used this renderings option here, it's not just going to print the two plots every time we render it, it's going to switch between the two plots depending on whether we are in dark or light mode. So here is the plot in light mode and here is the plot in dark mode.

So the way we're able to achieve a more cohesive look, it is extra work for us, but the way we're able to achieve it is simply by making that second plot as well and setting the renderings option. You can imagine we would do similar things for the plot, the second plot as well. So let's go ahead, not be lazy, and do that too for completeness.

So the way we're able to achieve a more cohesive look, it is extra work for us, but the way we're able to achieve it is simply by making that second plot as well and setting the renderings option.

Create a light and dark and say this is going to be the light. And let me go ahead and make a dark version of the plot as well.

And I'm going to go ahead and grab this. And let's see if we might just basically bring in similar theme elements. Most importantly, there are no axis text here, but most importantly, the plot background.

Now let's go ahead and render this and take a look. Here is what it looks like in the dark mode and here is what it looks like in light mode. The dark blue text that is sort of like around here looks great against light background, but it's really hard to decipher against dark background.

So chances are this is going to be an iterative process for you where you play with other aspects of the plot as you render your document in light and dark. And you might say, OK, maybe the high value should be white, not that darker blue. And white was not a color that we had saved. So we'll use ours white here.

And so now things are looking better in dark mode as well. So we have now shown that we can do this with plots.

Building the schedule tab with tab sets

I'm going to leave the second column alone for a second and move over to the second tab, the schedule, so that we can go over two things. One, tab sets and number two, how to do light and dark renderings for tables as well.

Let's go ahead and close those out and move to our schedule tab. On our schedule tab, we're going to first have some, the first row is some information. And we have a code cell there that's just creating some data sets for us to use. And then we're going to have another row that's basically all the contents. And so this row is our tab set of tables, right?

So let me go ahead and render this and see what that looks like in the rendered document. You'll see that I have gained my first row, this information text here. I can add the same treatment to this as well. That was make it a card. Expandable false.

But we can see that the rest of the document is still not working because it's not right now, not seeing that we would like that to be, that information to be organized in tab sets. Let's give some height to these. Rows. And in addition to giving them some height, let's actually denote that the content that's here is going to be organized in tab sets.

And then we're going to have a table. Organized in tab sets. So we have a row that is ready to receive some tab sets, but our original headings, these second level headings, are not defining tab sets. So we need to actually play around with the Quarto syntax a little bit more in order to get to what we want. Each of these tab sets need to be a card themselves. So let's go ahead and create a card.

And this card is going to have this title. And remove the second level heading. And we're going to do the same thing for each of these four tables, or what used to be subsections to be organized as cards that are organized in tab sets. So all I'm doing is putting this information in cards instead of in sections.

And here is the last one. So now we can see that we have tabs that identify each one of these cards. And within each tab, the information, null text, and the output of the code cell are not broken further into cards as well. So once we have defined the card manually, Quarto stops creating individual cards for the content inside of it and places everything in a single card. And because we have said that we would like to organize these as tab sets in this row, it then organizes them as tabs as opposed to stacked on top of each other.

So we are very close to our goal on the second page. Let's go ahead and look at what dark mode looks like. And we can see that some things are simply not ideal here. I can identify two things quickly that are not ideal. One of them is a bit more obvious, which is that this table is sticking around as white. And the other one is we may want a little bit more finer control over these colors because currently we can't read the black text in front of this dark gray.

Dark mode for GT tables

So let's do these in that order. The table ultimately is the output of an R cell, which means that the solution is going to be a rendering option. So we're going to say renderings, light, dark. And remember that the solution is then output two things, output the light and output the dark.

Now, if we have... Let me go ahead and do this real quick. And let me also do one thing. If we have any folks among us who are GT users, you'll know that for making GT tables, you can layer things just like with ggplot2. So I can do something like, let's go ahead and make the background color of the table dark gray, for example. Let's see how far this gets us.

I don't think it's going to be perfect just yet, but this gives us an idea of how we might go about things. So we can see that this is really not bad in terms of where we started.

But we are probably going to want some finer control over some of the aspects of this table. And that's another reason why we may want to just write yet another helper function, so that instead of having to copy paste a bunch of tab options, we can just pass this to a function.

So these helper functions, I already had one helper function here called makeSchedule. I'm going to bring in another helper function that I had made previously. And these could be saved in another file and sourced in as well, depending on how many of these you have. And all that is, is a new function called gtThemeDarkAlternative. I call this alternative because I was inspired by the gtThemeDark function and the gtExtras package, but it was doing more than what I wanted. So I grabbed the code from there. So a lot of this is just like copied from there, but using the colors that I chose. And then I removed some of the other options that it was adding. So basically, this is going to say, take your table and make a bunch of changes to it.

So let's go ahead and go down to where we had that table over here and just say, apply this option to it. So for each one of our cells, we are going to, for each one of these four tabs, we're going to add this renderings option.

And then we're going to say that this is the light and the dark is simply this and this passed on to gtThemeDarkAlt.

All right, here we go. So now our tables for each one of our tabs are updated for light and dark themes. And let's go ahead and address this one last pesky thing here. This is about changing some colors. And if you have, sorry, if you have, if you have actually used sort of an SCSS file for changing colors in something like a Quarto slides, Quarto websites, or Quarto dashboard, we can actually bring some of those SCSS rules into our brand file as well.

So I'm going to end by demonstrating that. So we're going to add to this some defaults defaults and say that we want to add some bootstrap options. And some rules. Let's go ahead and do this. So you may want to open this up in a browser window and then inspect and try to see how are we referring to these particular items. So it looks like this is a nav item, for example, or a nav tab. So let's go ahead and write some of these things. So we want nav tabs. And it was the active one that was giving us trouble active to be let's see, what shall we do something easy? What if we tried white? How would that work?

All right. So now we can see that that looks a lot better. We're actually able to read this.

Adding a logo and navigation items

There are other things you can do in brand files, such as adding a logo, for example. So why don't we go ahead and do that too? And that might be sort of where we stop for taking some questions. But I'd like to go ahead and show you how to add a logo. Although in order to do that, I am going to forgot that forgot to copy over this logo file. So this is the UseR logo. We want to make sure that we have it in the right place. So let's go ahead and add this logo.

So I'm going to name this logo, UseR logo, give it the path, it's in the images folder, and it's called logo.png. And this also allows me to write some alternative text as well. So let's UseR 2025 logo with a bull for Bull City, Durham, North Carolina, which is Durham, North Carolina, which is where we're holding the conference in Duke blue color.

And then we can say that we want our logo to be small size. You can also do large or medium, as you can imagine. And then we end up representing that name here as well. I'm going to go ahead and place this in the light brand file as well. And let's go ahead and render our document one more time to see if we're able to see.

Oh, I am not seeing the logo. Let's see what the issue might be. I would have expected I would have expected to see the logo. Let me see if I made a mistake somewhere.

Is it that it's not in the images? It's not in an image file? It's in the brand file folder? Um, maybe. I don't think so, actually. Because that is how I had it before. But let's let's give it a try. I don't think so. I think I'm missing something else. But let's see. It might be.

Well, I'll have to get back to that, I guess. It wouldn't be a real live demo if there wasn't one hiccup. So maybe as I'm taking questions, I will try to think about this a bit more to see what the issue may have been. But let me go ahead and put here.

Wrapping up and what's next

Okay, so what are some things we didn't get to? One of the things we didn't get to was sort of like tidying up our second column. But hopefully the idea is clear that we are going to add to finish this up two more of these value boxes. And then we're going to leave this plot alone, but add the dark rendering to it as well. And other things that you can do are things like adding sort of some navigation items. So I could, for example, add additional options here, something like nav buttons. I usually like adding like a GitHub link.

If I have the code somewhere for this, so I think that we actually had this link somewhere here. So let me go ahead and copy that text and add the reference here.