Tidy Tuesday Week 33: A simple brms model for predicting spam emails

Usings BRMS and Shiny to create an interactive spam prediction app.
Data-Viz
R
TidyTuesday
Shiny
Bayesian
Author

Rahim Jutha

Published

September 5, 2023

Creating a Shiny UI in a Quarto document

For this week’s Tidy Tuesday I experimented with integrating shiny widgets in Quarto files. I took inspiration from Albert Rapp’s article, 3MW (Combining Shiny and Quarto), which introduced the idea to me of using Quarto instead of R Markdown (Rapp 2023). Quarto is an open-source scientific and technical publishing system that utilizes markdown to produce production quality articles, presentations, websites, etc.

Using Quarto as an alternative to R Markdown

I’m not aware of all the major differences between Quarto and R Markdown but I’ve been experimenting with Quarto more recently, so much so that I created this blog. I’m enjoying the aesthetic and customization of Quarto and plan to incorporate it into my workflow. I’ve been reading up on all the features on their website that they’ve added to boost functionality (Quarto 2023). Noteworthy features for me so far are the table of contents, collapsible code blocks, and embedding tools which combined together generate a clean display. It’s also interesting that Quarto can be used for projects coded in other languages like Python further expanding its versatility.

Hosting on shinyapps.io

Since the website contains interactive shiny widgets, they cannot be rendered on github pages. To share the document I hosted the app on shinyapps.io and embedded the link below. The app can be viewed via this link. The website contains a short and sweet model building task and allows users to input their own observation for prediction.

Final Remarks

Integrating Quarto and Shiny is a straightforward process that enhances both aesthetics and functionality, making it an excellent choice for enhancing a project’s usability. I’m eager to delve deeper into customizing it further with HTML and CSS themes, as well as learning more ways to take advantage of the framework of Quarto.

References

Quarto. 2023. “Guide - Computations - Using R).” https://quarto.org/docs/computations/r.html.
Rapp, Albert. 2023. “3MW (Combining Shiny and Quarto).” https://3mw.albert-rapp.de/p/shiny-and-quarto.

Citation

BibTeX citation:
@online{jutha2023,
  author = {Rahim Jutha},
  title = {Tidy {Tuesday} {Week} 33: {A} Simple Brms Model for
    Predicting Spam Emails},
  date = {2023-09-05},
  url = {https://rjutha.github.io/posts/2023-08-15-Spam/},
  langid = {en}
}
For attribution, please cite this work as:
Rahim Jutha. 2023. “Tidy Tuesday Week 33: A Simple Brms Model for Predicting Spam Emails.” September 5, 2023. https://rjutha.github.io/posts/2023-08-15-Spam/.