Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go

Box Plot Distributions

Raw

\includegraphics[width=\textwidth]{figures/onepager/ggplot2:box_plot-1}

ds                                                                    %>%
  mutate(year=factor(format(ds$date, "%Y")))                          %>%
  ggplot(aes(x=year, y=max_temp, fill=year))                           +
  geom_boxplot(notch=TRUE)                                             +
  theme(legend.position="none")

A box plot, also known as a box and whiskers plot, shows the median (the second quartile) within a box which extends to the first and third quartiles. We note that each quartile delimits one quarter of the dataset and hence the box itself contains half the dataset.

Colour is added simply to improve the visual appeal of the plot rather than to convey new information. Since we include fill= we also turn off the otherwise included legend.

Here we observe the overall change in the maximum temperature over the years. Notice the first and last plots which probably reflect truncated data, providing motivation to confirm this in the data, before making significant statements regarding these observations.


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.