Here’s a mortality rate visualisation for Australians I made the other month. This wouldn’t have been possible without a huge amount of help and patience from everyone in the forums, in particular from @p-himik, who tirelessly answered all my dumbass questions.
This was made from a desire to give some perspective to COVID-19, regardless of what opinions you might hold towards it. When learning about the virus I found myself questioning at what rates do people normally die from different causes, and this tries to answer that question.
Initially this was drafted with only the heatmap as normal people find heatmaps intuitive but I realised line graphs are better at depicting probabilities, so we’ve got both. Choosing the heatmap’s color scale was tricky as elderly mortality rates increase more rapidly than expected, and we need to compromise between:
- proportional differences being easy to accurately perceive
- small differences in lower values being easy to distinguish
- colours intuitively representing life and death
A log scale would’ve worked, but that would’ve been too confusing for normal people. I ended up using a modified CET_CBTL1 from Colorcet, adding a little green and transitioning faster through low values.
There’s still one thing that’d be nice to improve: I couldn’t work out how to make the line graph adapt to the selected gender. @p-himik nearly got me there on the forums, but frankly by that stage I was too tired to learn more JavaScript, and I had already asked too much of everyone here. If anyone can be bothered figuring out the code I’d be very grateful.
Also, the line graph tooltips for muted lines are hidden, which is a new Bokeh feature @p-himik and @Bryan instantaneously rolled out when I asked how to do this. Thank you both very much!