Summer is just about here and baseball is back in full swing (no pun intended). With summer nights under the bright lights and yet another year to be added to history there also comes a maniacal analysis and freakish infatuation with every baseball statistic that can possibly be tracked. Of course, this brings us to fantasy baseball.
The first thing I did was figure out what I wanted these graphs to look like. I wanted to compare the weekly progress of each team for each different category and I ended up with a simple multi-line graph. Eventually I found this great example (thanks to Bob Monteverde). I then altered the D3 code a touch to create a reusable function that would fit my needs. I did this for both a week-by-week look as well as a cumulative view. I was quite pleased with the end result:
Note a spike in week 16 due the elongated “week” after the all-star break as well as the final two matchups that are each two weeks long for the playoffs.
There is certainly more that can be done to smooth out the UI. I would love to get to having a simple dropdown to choose the year and category accompanied by nice D3 transitions. There’s always more to do!
To continue discussion or comment, please reach out on Twitter.