Animating the Jolla Theme From the Postcards R Package

Recently, I came across this great tutorial by Connor Rothschild, where he teaches you how to animate the Hugo Academic theme for a blogdown website. Inspired by this post, I wanted to apply similar animations to my personal website, which was built using the postcards R package.1 Below is what the resulting animated theme looked like: If you don’t care about how I implemented this and just want to apply an animated version of the jolla theme (screenshot above), you can install a forked copy of the postcards R package from my repo using the R command remotes::install_github("

A Day in the Life of a (Biostatistics) PhD Student

Today, I thought I would share what a day in the life of a PhD student is like. Personally, I’ve always been interested in other people’s day-to-day experience at work. So I imagine that similarly, getting a glimpse into my day could be interesting and informative, particularly for students thinking about getting a PhD in biostatistics. I took two days from my third-year calendar (i.e. pre-pandemic) to give a sense of not only the typical activities I do, but also show how each day can be drastically different.

How Good is FiveThirtyEight's NBA Prediction Model?

As someone who watches basketball and enjoys sports analytics (see my previous post on estimating win probabilities live during an NBA game), I’ve been a fan of FiveThirtyEight’s NBA prediction models, which are always fun to follow and interesting to read about. Calibration vs Accuracy Recently, I came across an article by FiveThirtyEight in which they self-evaluated their prediction models. The primary metric1 they use to evaluate their model is calibration, that is, whether their forecasted probabilities match up with the actual probabilities.

Tips for a First-Time Teaching Assistant

For the last 3 years, I’ve been teaching the lab sections as a teaching assistant for the statistics sequence at the Johns Hopkins Bloomberg School of Public Health. The course is geared towards master’s level students in public health, though some PhD students and doctors/members of the JHU Medicine community also take it. As you can imagine, there can be a range of familiarity in the classroom with regard to what students know about stats, math, and coding.

Reordering geom_bar and geom_col by Count or Value

One of the things I’m always looking up with ggplot2 is how to reorder the bars in my bar charts by their length (i.e. the count/frequency or value, depending on whether you’re using geom_bar or geom_col). If you do a Google search, there are multiple different solutions, but I will document in this post what I’ve found to be the cleanest and simplest solution.1 Reordering geom_bar by count By default, the bars are arranged by the order (levels) of the factor variable.