If you're on social media you've probably seen a bunch of bar chart races pop up in the past couple of weeks. The folks at Flourish have a good post chronicling the "new" phenomenon. Even better, Flourish created a template which makes it pretty easy to build your own, so that's what I did. Here are my thoughts on the process, along with some suggestions for making it even better.
First, here's the one I built (it may take a moment to load - if it never does you can view it directly here):
The first thing you'll notice is that it goes on an on. I wanted a long run of data, but didn't realize how much that would make the whole visualization drag. You can play with the speed of the animation, but that doesn't seem granular enough for me, by which I mean in fact it might sometimes be useful to slog along, and at other points speed ahead. So my first wish to the folks at Flourish is to include a play bar that would allow the user to scrub forwards and backwards along the timeline. Along with that should be a pause button. Both of those could be taken care of by recording the animation and popping it into YouTube. You'll immediately lose the interactivity of being able to filter Provinces though:
Next up on the wish list is the ability to annotate the race. This would be harder knowing what I know about how I got the data into Flourish (just a spreadsheet, but more on that later), but I think it would be incredibly useful to be able to pause the video at certain spots to pop in an annotation (and why not links to more info) to explain WHY something just occurred. In my example, Why did Victoria and Vancouver, both in British Columbia, both end up with the highest price? Pretty sure it has to do with additional Provincial and Municipal taxes, but it would be nice to be able to pause the video and include a note to that effect, along with a link to something like this page. Guess that information could also easily be added as an overall annotation though.
The final wish, and this is likely way beyond what the folks at Flourish would want to worry about, would be a data transformation tool. In order to create a bar chart race you have to provide Flourish with tidy data, and that's not usually how a dataset like this would normally be delivered. As delivered, I had all the data in columns, like this:
But for it to work as a Bar Chart Race, the date variables had to run across the top, like this:
It took some fiddling with pivot tables in Excel to get the data moved around like that. I could've also done this easily in R, but I don't use it often enough to remember how to do that :-( It would be awesome if Flourish would've recognized the data I had and made the transformation for me!
As an aside, I had to do a fair bit of data cleanup in OpenRefine to get the data the way I wanted it. I sure do love that tool!
Looks like you could also build a Bar Chart Race using Observable, but I didn't see a tutorial over there, and it didn't look as straightforward to me. Kudos to Flourish on that front!
UPDATE: Here's how to build an animated Bar Chart Race in Tableau Software.