Ever since I visited d3js.org and saw the examples of what people build with it, I was inspired and wanted to have a go – I’m pretty sure most developers are the same. But I never found the time or reason to use it until this week, (the week before my uni exams 👌), when I read about an interesting economic phenomenon called the “productivity puzzle”. I wanted to explore it more, so I figured I’d make some fun graphs.
Here’s the result: productivity-puzzle.netlify.app.
It’s hacked together and full of BS economic rationale by me who read 20% of an economics book once. But hey, it was fun to make! I decided to detox from reactivity and UI frameworks/preprocessors and just write vanilla CSS and JS for a change.
I didn’t make any fancy or out of the ordinary plots/charts, but I really enjoyed playing with animations – d3 makes them very easy. I struggled a little at first since I didn’t realise how low-level d3 is (I was expecting something more like chart.js) but I guess that was me naively missing the point; the power of d3 is in it’s aim to be a data framework not a visualisation framework. I look forward to building more with it!
Code’s on GitHub.