1
$\begingroup$

I'm trying to take the data on large coronavirus clusters in the US and visualize them to show the sizes and the different settings (prisons, healthcare facilities, etc). I want to show the difference between the different settings.

If the sizes were more similar, I'd try to show a stacked bar chart (with size as horizontal axis and count as vertical axis). Unfortunately, that's not working well because some clusters are much bigger than others.

The first few lines of my data look like (there are lots of aged care facilities with 50 cases):

size category
50 agedcare
50 agedcare
50 agedcare
50 agedcare
50 agedcare
50 agedcare
50 agedcare

and the bottom looks like (the prisons and meat packing facilities have huge outbreaks)

931 prisons
981 prisons
1028 prisons
1031 meat
1051 prisons
1065 prisons
1098 meat
1107 prisons
1283 prisons
1362 prisons
1374 prisons
1791 prisons
2439 prisons

Here is a visualization of the smaller sizes enter image description here

I can do some binning and I get this:

enter image description here

But it's still hard to immediately see that some of these setting types have small outbreaks while others have much larger ones.

Any suggestions on how to visualize would help (I use python primarily if that matters)

$\endgroup$
1
$\begingroup$

How about a small multiples style visualization? A nice 2 x 3 grid would cover the six categories here. Size on X, frequency on Y.

This approach is one of the clearest ways to show this kind of data. The stacked histogram is difficult to interpret because the bars of the same color do not have common starting points. If you make six histograms arranged in a rectangle with common scale on the Y, you can quickly visualize the distribution for each category.

Here is a plot made with some simulated data like yours. The top image has all six categories on one plot, like yours. The bottom image facets each category into its own histogram with common scale. You can much more easily compare the six categories.

simulated data for six categories on one stacked histogram

simulated data for six categories on faceted histograms

$\endgroup$

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.