How Shiny Fueled an Online Racing League!

Eric Nantz

Statistician & Podcaster

Appsilon Shiny Conference

28-April-2022

A League of Linux Nerds

Who enjoy racing!

HotShot Racing In Action

Hotshot Racing League Setup

Position Points
1 12
2 11
3 10
4 9
5 8
6 7
7 8
8 5
9 4
10 3
11 2
12 1
  1. All racers use the same car randomly selected before the race
  2. Racer with most points in each GP run (normal & mirrored) awarded overall points using same metric
  3. Racer with most points wins!

Racing is (not) Enough

🏎 This is a job for Shiny! 🏎

Random Car Picker

App: rpodcast.shinyapps.io/hotshot_random

Repo: github.com/rpodcast/hotshots.random

Community Post: community.rstudio.com/t/hotshots-racing-random-driver-car-app-shiny-contest-submission/104927

Under the Hood

  • {bslib} to create custom theme of the application
  • Reactive values essential to keep track of car selection events
  • {slickR} powers the slot-machine look

Data Collector

Repo: github.com/rpodcast/hotshots.data

Under the Hood

  • {magick} to import screenshots and prepare for analysis
  • {tesseract} to extract result text with OCR
  • {excelR} for convenient interface to make corrections
  • {pins} Store cleaned data in external repositories
  • Not meant to be glamorous, but just functional to get the job done!

HotShot Dashboard

App: rpodcast.shinyapps.io/hotshot_dashboard

Repo: github.com/rpodcast/hotshots.dashboard

Community Post: community.rstudio.com/t/the-hotshots-racing-dashboard-shiny-contest-submission/104925

Under the Hood

  • {bs4Dash} Powerful dashboard UI using Bootstrap 4
  • {fresh} Custom theming of dashboards and other UIs
  • {waiter} Show a loading screen while app is starting
  • {reactable} Interactive tables with amazing features
  • {echarts4R} Widgets to present key statistics fit for a racing league
  • {plotly} Interactive visualization with animation and styling
  • {pins} Retrieve cleaned data from external repositories

Crossing the Finish Line

  • Set yourself up for success from the beginning
    • Consistent code structure powered by {golem}
  • “It’s never just Shiny”
  • Understand the personas of your application’s customers early!

Thank You!