Discover more from hrbrmstr's Daily Drop
Drop #362 (2023-10-27): Weekend Project Edition
Aren't You The Dash[board]ing One?!
Dashboarding has come to Quarto land! So, today we dive into that a bit and give you a choice between TWO WPE assignments (one is for folks who care not about dashboards).
hrbrmstr's Daily Drop is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.
Dashboarding has come along for the ride with Typst in the bleeding-edge zone (v1.4) of the Quarto multiverse. It's a more modern riff on the venerable flexdashboard that was/is available to folks who prefer R Markdown (turns out not everyone like Quarto…to each their own).
Quarto Dashboards can include embedded Shiny components, such as a plot with sliders that control its inputs, or even simple Shiny applications that include several components. Shiny, a package that makes it easy to build interactive web apps, can be integrated with Quarto to create dynamic and interactive dashboards.
Getting And Using The Right Quarto
Quarto v1.4+ is required to gain access to these dashboarding superpowers. While you could hit the Quarto site and do the download dance, Devin Pastoor has done us all a solid and made a golang CLI for managing multiple Quarto installations. It's documented well, so we'll be environmentally conscious and save a few bytes here.
I also highly suggest you start using a special YAML header field to indicate the version of Quarto any of your Qmd documents support. For Quarto dashboards, that would look like:
This ensures Quarto will fail with a sane and helpful error message vs. leave users who stumble across your creations wondering “what's wrong with me?”.
Your First OJS Quarto Dashboard
The Quarto documentation site is pretty dope, so I do not feel compelled to reiterate the specifics of layouts.
There are also tons of examples of using R for
flexdashboard (and that tracks to Quarto), so we're not writing a dashboard in R.
What we are doing is writing a Quarto dashboard using Observable JS code blocks and some data I gathered from work.
If you don't like dashboards, the
qvm utility is using a dependency that will no longer receive support from the maintainer (survey). Fork the qvm code and replace the UI ops with BubbleTea, which we vicariously used in a previous WPE. It should be a fun and relatively quick golang hack.
For those in the dashboarding spirit, there is plenty of extra data in the JSON that comes along for the ride with the WPE. Try out some other visualizations, add some tables, re-do the layout, or even convert the whole thing to python or R.
Also, make sure to check out Jeremy Allen’s recent Quarto dashboard for more inspiration.
I'm definitely going to be finding something to hack on all weekend given the current situation in my state. Be safe out there and remember to hug someone today. ☮️