I recently came across the MLB interactive standings chart, a pretty cool visualization of team performance over time. I think time-series analysis is relatively undervalued in baseball: we generally look at a team’s performance to date, but don’t look at the ups and downs of the season as it progresses in any clear way. As far as I can tell, MLB doesn’t have one built for this season, so I thought I’d put one together (above).

The high level workflow: scrape daily win/loss data from Baseball Reference (each day is on its own page with predictable URLs, so generating the full list wasn’t too difficult); clean up the data and generate the “games above/below .500” variable; and visualize with the highcharter package, a fantastic R wrapper for the Highcharts library.

The resulting chart shows how far above or below .500 each team is on a day to day basis. You can select or de-select each series using the legend at the bottom to de-clutter.

Game-to-game progression isn’t just interesting at a team level — we can also look at how players are performing as the season goes on. The statistic I chose is OPS (on base plus slugging). OPS isn’t perfect, but it is a better representation of a player’s offensive value than batting average. The chart below shows cumulative OPS for some of the Jays, starting about a month into the season to avoid the noise of small sample sizes. For reference: 1.000 is excellent, 0.900 is great, 0.800 is above average, and 0.710 is league average.

Donaldson, Encarnacion, and Saunders are having fantastic seasons. Josh’s OPS is so good I thought it would be interesting to see how he’s doing relative to some of the top players in the MLB. I identified this group by taking the top 5 in terms of Fangraphs WAR.

In terms of OPS, Donaldson, Trout, and Altuve are clearly playing fantastic offensive baseball. Their season trajectories are quite different though. Trout recovered quickly from a slow offensive start and has consistently played at a league-leading level since early May. Altuve had a stellar start and has regressed slightly to being “only” one of the best in the game. Donaldson had a bit of a slump in May and has been on fire since then.

Update: Re-ran all charts now that the regular season is over. By the end, Trout still dominates in terms of OPS and WAR, accumulating a ridiculous 9.4 — a whole win above the next best player, Kris Bryant (8.4). Betts (7.7 WAR) and Donaldson (7.6) round out the top four.