Update: this article was featured in The Boston Globe.

As I approached my 24th birthday, I realized that my driver's license was about to expire. I'd have to go to the RMV. These agencies are notorious for long wait times so naturally I wondered when the best time to go would be. Certainly not lunch hours, probably not close of business either - perhaps right before then?

Fortunately, MassDOT posts its wait times for licensing and registration; for example, the Boston RMV location is posted here. But it only gives you a point in time - it doesn't tell you how the wait time has changed over time.

I decided this would be a pretty simple task, starting with a Python script. Query all RMV location websites every minute and store that in a database (eg. .csv file), host that database on Amazon EC2, run an R Shiny server on it and have an R Shiny webapp auto-update with the database.

For simplicity, I wondered what a "typical" week looked like - the following R Shiny app takes the entire database and averages each minute for each weekday, Monday through Friday. Here are the results (click on the image to see the live webapp - about 30s load time):