2.8 Getting Fancier with Bar Plots: Adding Another Variable
When depicting data with barplots, we are not confined to the use of just two variables. As the plot below will show, we can go beyond two dimensions with such a plot type. The example below shows Day of Week as the x-axis variable, unique visitors on the y-axis, and a separate coloring (hue) to indicate whether a particular day included fireworks.
While the plot shown beforehand might have misled us into thinking that fireworks draw more visitors to Lobster Land, the plot shown below paints a more complete picture – it appears that fireworks were more likely to be offered on the busier nights. When we control the day of the week, and then compare visitor counts, it appears that the inclusion of fireworks has only a minor impact on attendance.
