0:01
There are a bajillion different charts available in software like excel or numbers or sheets or
0:05
mathematica or plotly, but I recently discovered that pretty much all plotting apps - as far as I
0:09
can tell - are missing an incredibly basic type of chart! Consider this video my attempt to convince
0:15
you it's a scandal these charts are missing, and my attempt to convince software developers
0:18
to add them into their plotting software. Ok, so suppose you want to compare the climates
0:22
of London, England; London, Ontario; and London, Kentucky. Here's a table showing the average and
0:26
seasonal high and low temperatures for each London. But tables are boring. If you wanted
0:30
to plot this data by hand, you might imagine using a chart like this to show the range of
0:34
temperatures and allow you to see at a glance that the climate in London England is less extreme than
0:38
the other Londons, (which are each similarly variable but with Ontario shifted colder) - a
0:39
bar chart makes more sense than, say, a point chart since the temperatures in
0:42
these Londons can by definition be in between the minimum and maximum ones in our table.
0:47
The problem is, you can't easily make a chart like this on a computer.
0:50
You can get close with an area chart, which plots the temperatures correctly,
0:53
adds nice shading in between them, but also fills the area all the way down (or up) to the X axis,
0:57
which isn't right. You can get around the filling problem by creating a new table of
1:00
the differences between the temperatures and plotting that as a stacked area
1:03
chart... oops - we need to remove the fill from the lowest value - but it still doesn't make
1:05
sense to use a chart that draws connecting lines in a situation like this where we're
1:08
talking about discrete geographic locations. You can also get close with a stacked bar chart
1:12
(or "stacked column chart" depending on whether you think bars can be both horizontal and vertical
1:16
or if you think vertical bars have to be called columns...) anyway, a stacked bar-column chart
1:20
separates out the cities correctly but incorrectly adds the temperatures together - hence,
1:24
"stacked" - the columns are stacked together, appropriate to the name, but it's not what we
1:28
want. You can get around the stacking problem by again creating a table of the differences between
1:32
the temperatures, but then it still fills down to zero even if you want the bars to start at
1:35
some other number, and the negative values are a total nightmare" since stacked column charts
1:39
by default plot things from zero and if you enter a negative number for the first value to try to
1:43
get it to start below zero, it plots that amount below zero, but then measures the positive numbers
1:47
up from zero anyway and not from the negative number - this is because stacked column charts are
1:51
meant for things like keeping inflows and outflows separate, like, you bought 5 cats and sold 2, and
1:56
you want the total length of bars to represent the total number of transactions (7) and not the final
2:00
number of cats (3). The only reasonable way I've found to deal with negative numbers in stacked
2:04
column charts is just to add a big number to ALL the temperatures so they're not negative anymore,
2:08
make the chart, then photoshop the y axis labels to remove the big number. Which is ridiculous.
2:13
What we're actually looking for is something called a "range chart" where you enter the
2:16
top and bottom values of the range and then the program draws that for you. Specifically,
2:20
we want a "stacked range bar chart" where you can enter multiple numbers, including negative
2:24
numbers, and then draw bars between them. Is that too much to ask? I guess, I guess it is.
2:30
ps here are a few more examples of data that really would benefit from being visualized
2:33
with a stacked range bar chart but first, a big thank you to my Patreon supporters who help make
2:50
these videos possible - please consider supporting MinutePhysics at patreon.com/minutephysics. Now,
2:51
back to the benefits of stacked range bar charts! Really, any chart where the x axis is a discrete
2:55
set of things and the y axis is a range that can go below and above zero is a candidate for this
2:59
type of chart. Like, if you wanted to plot the range of latitudes of each of the continents,
3:03
or show when twilight, dusk, and daytime are at a given location. Or compare percentiles
3:07
for student grades in different classes. Or the local climate: plotting the average daily
3:11
low and average daily high temperatures for each month along with the average monthly low
3:15
and high temperatures and the record monthly low and high temperatures across a year gives you a
3:18
picture of the seasonal variation in temperature for a particular location. Yes, you can do this
3:22
with a stacked area chart, but that makes less sense than stacked columns because area implies
3:26
some sort of continuity when to create the data you are literally binning or averaging by month.