Code Projects
R Packages
stackcallr: This package contains a few static-analysis utilities for Shiny applications and R packages. The primary function,
call_stack(), parses functions and prints a plain-text call tree showing how functions relate to one another — with no need to run the app. I’ve found this helps when writing documentation or submitting issues. [Repo]glockr: R package wrapper for
scc(Sloc, Cloc and Code) for counting blank lines, comment lines, and physical lines of source code. Written in pure Go [Repo]shinypak: Quickly access the Shiny applications in the Shiny App-Packages (book) [Repo]
dopingdata: Contains data from the United States Anti-Doping Agency for exploration, modeling, and visualizations. The datasets in this package are derived from the USADA website and the World Anti-Doping Agency (WADA) banned substances list [Repo]
fmggp2: Support package for ggplot2: field manual. Holds the late 90s themed
ggplot2themes (theme_toysrus(),theme_netscape(),theme_freshprince(), etc.) and the helper functions used throughout the book, so every chapter loads the same tested code. [Repo]gerp: A teaching package for ‘Good Enough R Practices’, based on the excellent paper Good Enough Practices in Scientific Computing. Includes functions for project setup, file/folder naming, and literate programming. [Repo]
Python Packages
baseball-trajectory: Shiny for Python app-package for visualizing a baseball player’s career arc on a single metric (OPS, OBP, SLG, AVG, HR, or ISO for batters; ERA, WHIP, K/9, BB/9, or HR/9 for pitchers). Per-season stats come from the MLB Stats API, and the app fits a weighted quadratic aging curve with a 95% confidence band and a marked peak age. [Repo]
pyap: A collection of Python Shiny App-Packages with the code examples for Shiny for Python App-Packages. Each branch holds the app at a specific stage of development, using
uvfor environment management andpytestfor testing. [Repo]nostalgia_index: Python package and Shiny for Python app that measures which childhood toys, games, and athletes people are still looking up on Wikipedia. Pageviews from the Wikimedia REST API are normalized by total Wikipedia traffic, smoothed with a rolling median, and scaled so each article’s first 12 months equal 100. Includes a
nostalgiacommand line interface (nostalgia fetchandnostalgia run). [Repo]
Books & Sites
DevOps for Data Science: Lab Solutions: Twelve labs covering the infrastructure and deployment side of data science: versioning models with
vetiver, building APIs with FastAPI andplumber2, logging, CI/CD with GitHub Actions, Docker, AWS, SSH, Linux user management, instance sizing, and accessibility. [Repo]ggplot2: field manual: A field manual for building common (and less common) graphs with
ggplot2. Every example uses simulated data with a 90s throwback and a matching theme fromfmggp2. [Repo]Shiny for Python App-Packages: A book on building Shiny for Python applications as Python packages. Covers flat and src layouts, dependencies, data, documentation, testing with
pytest(modules, system tests, and test suites), debugging, logging, GitHub Actions, Docker, and deploying to shinyapps.io and PyPI. The code examples are inpyap. [Repo]Shiny Frameworks: Shiny app demos with three popular frameworks (
golem,leprechaun, andrhino) [Repo]
Shiny Apps/Packages
dfdiffs: R package/Shiny app that implements SAS
proc compare. Compares two datasets and tells you 1) what rows are here now that weren’t here before? 2) What rows were here before that aren’t here now? and 3) What values have been changed? [Repo]stocktipr: Shiny app-package for demonstrating tool-tip/hover info options [Repo]
stocktipr6: Similar to
stocktipr, but this Shiny app-package usesR6objects to demonstrate various tool-tip/hover info options [Repo]ttdviewer: Shiny app-package with downloadable #TidyTuesday dataset and reports [Repo]
Apps/packages for testing
noap Testing a Shiny app (not in an R package) with
testthat[Repo]utap Unit testing app package: Unit testing Shiny app-package for demonstrating
shinyutility function unit testing withtestthat[Repo]tsap t
estServer()app package: Shiny app-package for demonstrating integration tests with shiny’stestServer()function [Repo]
Mastering Shiny App-Packages (for testing)
These are Shiny app-packages I’ve developed for various testing patterns. All use the code/apps covered in Mastering Shiny.
Mastering Shiny t
estServer()app-package (mstsap) is a collection of tests usingtestthatandshiny::testServer()The modules and application inmstsapcome from the Shiny modules chapter of Mastering Shiny [Repo]Mastering Shiny shinytest2 app-package (msst2ap) demonstrates how to test a Shiny app-package using
testthatandshinytest2. All examples come from the Modules chapter of Mastering Shiny. [Repo]