Here’s a graph that let’s you choose combinations of stuff, ie female or male, life expectancy or disability free life expectancy. So there’s four things you could look at. I’ve broken it down by the deprivation of the area people live in – poorest fifth, next poorest etc etc. The final version will turn up on the NPI site once I’ve made it look nicer.
When you click from male to female, that just does what it always does when you click, ie switch from one set of data to another. The trick here is that the data is conditional on what’s going on elsewhere, ie whether you selected LE or DFLE. So there’s an if function that refers to the thing you aren’t clicking, if that makes sense.
It’s OK, but it’s a bit limited. Currently there are 4 (2 x 2) options. If you increase that to say 6 (2 x 3, by adding in another measure of health), the amount of code you need to write also increases by (around) 50% (ish), and a lot of that would be set inside some complex, nested if function which would be prone to error and need loads of checking. So there’s no real economies of scale in the way I’ve set it up.
That’s in contrast to say, analysing by ten different types of areas, rather than 5. That would be pretty much no work at all, if I could get hold of the data.