We have a nice pie chart, but we can do a bit better – let's improve it a little.
If your categorical variable is nominal, sort wedges according to their size.
In the first chapter, we had an ordinal categorical variable, which had a natural order. We should respect this order. Here we have a nominal categorical variable,
beverage, and it has no natural order. In that case, we often order variable's categories based on values related to this categorical variable.
For example, we'll arrange beverage categories in descending order (from greatest to least) according to each beverage's share of total alcohol consumption. Look at each beverage type's percentages:
1 Beer 18.803419
2 Other 1.709402
3 Spirits 23.076923
4 Wine 56.410256
We will arrange them in the following order:
Other < Beer < Spirits < Wine
We should also pay attention to the 'Other' category. This category is often the least interesting, in terms of the story we are telling. It is common to set this category at the end, regardless of its share of the whole. In this case, it is already at the end, so we don't have to change the order.