Build-a-Dashboard Workshop
Duke University
Posit, PBC
2024-08-12
Make sure that you’ve completed the setup steps at
pos.it/quarto-dashboards-24 > Setup
Dr. Mine Çetinkaya-Rundel
Professor, Statistical Science, Duke University
Developer Educator, Posit
Carlos Schedigger,
Software Engineer, Posit
Alex Chisholm,
Product Manager, Posit
Ron Blum,
QA Engineer, Posit
Please share with the person next to / nearby you…
03:00
One link for all materials
Quarto!
Time | Activity |
---|---|
09:00 - 10:30 | Hello, dashboards! |
10:30 - 11:00 | ☕ Coffee break |
11:00 - 12:30 | Dashboard components |
12:30 - 13:30 | 🍽️ Lunch break |
13:30 - 15:00 | Theming and styling |
15:00 - 15:30 | ☕ Coffee break |
15:30 - 17:00 | Parameters, interactivity, and deployment |
16:30 - 17:00 | Quarto Q & A |
Coffee breaks: Levels 3, 5, 6 & 7
Lunch: Regency Ballroom on Level 7
Username: Posit Conf 2024
Password: conf2024
The Code of Conduct can be found at https://posit.co/code-of-conduct.
Please review it carefully. You can report Code of Conduct violations in person, by email, or by phone. Please see the policy linked above for contact information.
There are gender-neutral bathrooms located on floors 3, 4, 5, 6, and 7.
The meditation and prayer room is Room 503. Available Mon & Tues 7am - 7pm, and Wed 7am - 5pm.
The lactation room is located in 509, same timings as above.
Participants who do not wish to be photographed have red lanyards; please note everyone’s lanyard colors before taking a photo and respect their choices.
I’m stuck
I’m done
I have a general question
You should have received an email with an invitation and instructions for joining the conference’s discord server.
This workshop has a private channel under Workshops:
#workshop-quarto-dashboards
This is a great place to ask questions, share responses to exercises, post resources, memes, or most anything else before, during, and after the workshop.
If you’d like to use your own system, please see pos.it/quarto-dashboards-24 > Setup.
You can use the following link to join the workshops Posit Cloud space:
Once you have joined, navigate to Contents on the top menu.
I’ll assume you
know some R and/or Python
have worked in RStudio and/or VS Code
have worked with Quarto
want to learn about Quarto Dashboards
I’ll teach you
basics of a Quarto Dashboard
making your dashboards dashing ✨
some R and/or Python tips along the way
Have you completed the following?
pos.it/quarto-dashboards-24 > Setup
Let’s get started!
With Quarto you can weave together narrative text and code to produce elegantly formatted output as documents, web pages, blog posts, books, and more…
Since Quarto 1.4!
Dashboards are composed of cards.
Cards are arranged into rows and columns.
Pages, tabsets, and sidebars allow for more advanced layouts.
Let’s make a dashboard, step-by-step
First with R
Then with Python
format: dashboard
format: dashboard
dashboard-py.qmd
dashboard-py.qmd
dashboard-py.qmd
---
title: "My first Quarto dashboard"
format: dashboard
---
```{python}
from plotnine import ggplot, aes, geom_point, geom_bar
from plotnine.data import mpg
```
```{python}
#| title: Highway vs. city mileage
(
ggplot(mpg, aes(x = "cty", y = "hwy"))
+ geom_point()
)
```
```{python}
#| title: Drive types
(
ggplot(mpg, aes(x = "drv"))
+ geom_bar()
)
```
dashboard-py.qmd
---
title: "My first Quarto dashboard"
format: dashboard
---
```{python}
from plotnine import ggplot, aes, geom_point, geom_bar
from plotnine.data import mpg
```
```{python}
#| title: Highway vs. city mileage
(
ggplot(mpg, aes(x = "cty", y = "hwy"))
+ geom_point()
)
```
```{python}
#| title: Drive types
(
ggplot(mpg, aes(x = "drv"))
+ geom_bar()
)
```
Option 1 - Cloud: Go to Posit Cloud for the workshop, open project titled 1 - Hello, Dashboards!
.
Option 2 - Local: Clone the GitHub repo posit-conf-2024/olympicdash
(https://github.com/posit-conf-2024/olympicdash) and work on olympicdash-r-1.qmd.
Python - Local: Clone the GitHub repo posit-conf-2024/olympicdash
(https://github.com/posit-conf-2024/olympicdash) and work on olympicdash-py-1.qmd.
Your goal is to create one of the following dashboards.
title
s to code cells.05:00
images
folder.05:00
Reorganize the cards into rows and columns as shown below.
05:00