Sunday 4 December 2016

Analysis of Australian government spending across all states (part 3)


After collating the data, the next step was to present it. I did two versions.

Prototype one
My first attempt threw all the data into one chart. To reduce cognitive overload, I added interactivity so that if you clicked on the legend or one of the bars in the chart, it zooms in on that particular category.


The feedback from other people was that it was way too overwhelming and the drill down effect was not intuitive.

Prototype two
For my second version, I was lucky enough to get to pick the brains of data viz extraordinaire, Nadieh Bremer. She suggested using Small Multiples to overcome the cognitive overload from the stacked bar chart and to try a choropleth (heat map) for a high level perspective.

I much prefer this version. It's easier to see the high level perspective, compare states and still allows drill down (plus it has some interesting visual effects if you click in certain places).


Technical details
I used DimpleJS to make the chart creation process easier than it would've been had I used raw D3. For the map, I drew inspiration from this article. The code there used D3 v2 so I had to copy the azimuthal method in order to make it work with D3 v3. You can find the code on Github.

Next steps
Here's what I plan to do next:
1. Add a legend to the map
2. Turn the code into a ReactJS app as it's starting to get a bit complicated
3. Supply the data from a Ruby On Rails service (not for any good technical reason, purely because I need to learn Rails).
4. Deploy the whole to an AWS instance (same motivation as 3).

No comments: