2
$\begingroup$

I have ≈90 000 medical cases with ≈250 distinct diagnoses between them, distributed over 20 years; the most common of which applies to roughly half, and the least common applies to a handful.

ETA: Each patient can have multiple diagnoses associated.

I'd like to generate some sort of temporal overview by year, so less technically minded people can appreciate the medical qualities of the dataset, but I haven't got a good way to do this other than a 250 by 20 table.

I was wondering if there was some interesting way of presenting this kind of data? (I.e. many sparse binary variables.)

$\endgroup$
8
  • $\begingroup$ Are these diagnoses mutually exclusive, or is a patient 'able' (in your data that is) to have had multiple diagnoses during this 20 year period? $\endgroup$ – IWS Jun 30 '17 at 8:09
  • $\begingroup$ @IWS patients can have multiple diagnoses associated. $\endgroup$ – Karl Damgaard Asmussen Jun 30 '17 at 8:19
  • $\begingroup$ If you had only a few diagnoses (or diagnosis groups) I would recommend you to plot the proportion of patients with a certain disease per year. With time on the x-axis and the proportion our count on the y-axis. You could set the y-axis scale to a logarithmic one to accommodate the small and large groups in one graph. With 250 diagnoses however, I can see this becoming a mess... Is there no way to group these diagnoses? Or in other words: do you need to show all 250? $\endgroup$ – IWS Jun 30 '17 at 8:25
  • $\begingroup$ @IWS there is a hierarchy to the diagnostic codes, but one of the goals is to also use the rarer and more specific things in a clinically significant manner. Perhaps I should make something interactive in an SVG or something... $\endgroup$ – Karl Damgaard Asmussen Jun 30 '17 at 8:28
  • $\begingroup$ That would definitively be better. You could have the user start out with the top hierarchy, and provide options to zoom in on certain groups. $\endgroup$ – IWS Jun 30 '17 at 8:30
3
$\begingroup$

Sounds like you've already simplified your sparse binary data to 250 x 20 counts, which is still a lot, but a stacked area chart is a good starting point.

enter image description here

From here you can label each of the most common diseases to the right of the chart. That will provide a good sense of the overall trend and the most common diagnoses. Details on the others are largely lost (except for hover details) and they might as well be all colored gray or colored by diagnostic group.

If you want to show more detail for the rare diagnoses, you can make a second version of the same chart that excludes the more common diagnoses.

(If anyone wants to experiment with random data like this, my formula for count is Random Poisson( 40 / (diagnosis ^ 1.5) * (year + 30)), with diagnosis in 1..250 and year in 1..20.)

$\endgroup$
1
  • $\begingroup$ This is also an excellent solution! Will investigate! $\endgroup$ – Karl Damgaard Asmussen Jul 3 '17 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.