← Back to all sparks
M

moderndive

ANALYTICS
Velocity2.5

R package moderndive by moderndive — release notes from GitHub.

The ModernDive teaching package learns to render inside the browser that runs its own textbook

statistics-educationwebrregressionr-packageteaching-datasets
Current state
moderndive supplies the datasets, regression helpers and ggplot geoms used by the ModernDive introductory statistics textbook. Its release history is mostly dataset accumulation — much of it contributed by students in batches — punctuated by occasional function work. The latest release is different: it fixes View() so it renders inside webR, the in-browser R that powers the book's live exercises, and reworks the regression helpers to survive in-formula transformations.
Where it's heading
The package is following the textbook's second edition into the browser. webR has no pandoc, so the DT htmlwidget path the package relied on cannot produce the self-contained HTML the notebook cell needs, and the auto-print path was gated behind interactive() being false — meaning students working through the live exercises saw an explanatory message where a table should have been. Building a static HTML table and pushing it through webR's viewer hook is a small change with a direct effect on whether the book's interactive mode works at all.
Prediction
With the book's v2 datasets landed and the browser rendering path fixed, the remaining friction is most likely in other functions that assume a desktop R session.

Recent moves

  1. 12d ago

    View() renders in webR; regression helpers survive formula transforms

    View() now builds a self-contained static HTML table and pushes it through webR's viewer hook, so data displays inline in the book's browser exercises instead of printing an explanatory message. Separately, the regression helpers now handle in-formula transformations on both sides — LHS transforms no longer error, and RHS transforms stop leaking poly() basis matrices, scale() and I() wrapper columns into the points table.

    View source ↗
  2. 1y ago

    Datasets and tidy_summary() for the second edition

    Five datasets and a tidy_summary() function land in preparation for the textbook's second edition, including UN member states, Spotify genre data and coffee quality.

    View source ↗
  3. 2y ago

    Almond and flight datasets for the inference chapters

    Four more datasets for the inference chapters, two derived from the nycflights23 package.

    View source ↗
  4. 4y ago

    Ten student-curated teaching datasets

    Ten datasets curated by named student contributors — coffee quality, Amazon books, powerlifting results, maternal smoking, EV charging sessions, traffic collisions — plus a January weather subset. The contributor credits make this a teaching artifact as much as a release.

    View source ↗
  5. 4y ago

    Alaska flights subset added

    Adds an Alaska Airlines subset of the nycflights13 flights data.

    View source ↗
  6. 5y ago

    Cleaner regression tables and an explicit conf.level argument

    Regression table printing is cleaned up for non-baseline categorical levels, get_regression_table() gains an explicit conf.level argument inherited from broom, and the JOSE publication is added to the vignettes.

    View source ↗