So, there have been many bar chart race [BCR henceforth] visualisations around on the internet. The latest one was used by Formula 1 to show driver positions and visualising the entire race on a bar chart. BCRs are pretty cool. They are animated, and show the position, and progress dynamically.

In this part - I will use the easiest method to create a bar chart race - Flourish

Using Flourish is pretty nifty. But, it is better to clean and prepare the data outside to be conducive to the Flourish environment.

The data we will look to convert to a BCR is from Wikipedia: List of countries by motor vehicle production

Now let me be honest with you - I started off with creating the BCR on matplotlib (yes, I think matplotlib can do it) - but ended up trying Flourish to see its various features.

  • Step 1: Download the table from Wikipedia.
  • Step 2: Clean the table by removing references in square brackets, save it as a csv file.
  • Step 3: Read the csv file in Flourish.
  • Step 4: Go back to pandas and sort the data because Flourish reads from left to right - if the first column is year 2018 and last is 1950 - your Flourish BCR with start from 2018 and end at 1950. Hence, sort first. Save it back as a csv.
  • Step 5: Explore all the options on Flourish - add the title, and footer text appropriately.
  • Step 6: And voila - you have a BCR ready to publish or embed:

In the next post, I will try making a BCR using matplotlib.

Update:

Just a good segue from motor vehicle production - I had a look at steel production in countries over the years: