The topic of data visualization is incredibly broad.
And there's many good books written about it.
We'll take a look at a few basic plots, introduce terminology, and set us on the path
to using these tools effectively.
It's tempting to think we don't need to study visualization.
We can easily read a bad plot, and still figure out what's going on.
In fact, your next forum posting for this course, should be to find a bad plot,
upload it to the forums, and identify what's bad about it.
Others in the forum can comment about it too.
It takes a lot of work to make a good plot in computer software.
You have to often substantially change the default settings.
Why make a good plot?
People have to make decisions based on our engineering plots.
If we can make that easier for them, we can save time, and we also look good.
Many of you will find yourself developing plots that are used by people
in mission-critical areas: think of a nuclear power plant,
or someone processing very valuable material, or making decisions
from the plot that impact safety.
If they are making split-second decisions, they have to made unambiguously and with confidence.
The first plot we will consider are time-series plots.
These are two-dimensional, with a horizontal time axis (or sequence order).
The vertical axis represents the numeric value of the data.
The human eye is incredibly good at dealing with a high density of data.
Our brain quickly processes this data: picking up sinusoids, spikes, and other patterns.
We quickly separate noise from signal.
We also easily disregard outliers which contaminate the data.
Let's show a few examples of good and bad time-series plots.
This first one shows s CPU temperature over time.
Pause the video now, and identify all the bad features in the plot.
There are quite a few of them.
Bad labelling on the x-axis is just the first of them.
The second is the hard-to-see difference between red raw data and the smoothed green line.
Always ask yourself with any plot: what is it's intention?
My best guess here is that it is for monitoring CPU temperature.
When monitoring something, we not only want to track the trend, but also the variability.
Here's a redrawn version of the plot: notice, I've not changed anything, except the colours.
I have not added or removed any pixels.
Now the noise can be seen, as well as the main trends.
The message of the plot is quite different to the prior version.
This idea of changing a plot's message, can be done with any type
of plot, not just time-series plots.
Another bad time-series plot is when we have multiple lines
on a plot that cross over each other.
It makes picking out trends very hard.
Pause the video now, and determine any trends you see.
Did you notice the correlation between the blue and green lines?
They move up and down together.
Did you notice the inverse correlation between the orange line and the others?
When the orange trend goes up, the others go down.
This next plot shows the same data, on 3 separate axes.
These trends are now far more apparent.
It took me a while though to draw this plot.
I've also not used colour, because we can't assume the plot will ultimately be shown
on a device capable of colour display,
and we can't assume the reader can differentiate all the colours that were used.
Now we can take this data and compress it even smaller.
We call these sparklines.
I highly recommending reading this weblink to learn more about them.
Sparklines are showing up far more on various website and software tools.
They are also incredibly useful for small cellphone and tablet displays.
They exploit the fact that our eye can distinguish 250 pints per linear inch,
or around 650 points per square inch.
That's our eye's resolution ability.
Sparklines are not a new invention, they have been used on medical charts for decades.
Further advice on time series plots is to use a constant spacing on the x-axis.
This helps keeps the interpretation of the plot consistent.
If you need to zoom in on a particular part of the plot, rather redraw the part
of the plot a second time, illustrating the zoomed
in portion on its own linearly spaced axis.
One other way that people are dishonest with time-series plots that show money,
is they omit to rescale the plot for inflation.
When data are shown over many years, the effect of inflation must be accounted for.
Think about that the next time your read a stock price chart.
Visiting this link leads to a website that shows this nicely.
Here automotive sales appear
to have consistently increased year on year between 1970 till 1995.
The consumer price index, CPI, shown in red, is a measure of inflation.
It has also increased.
If we divide raw data by the CPI value, we get a more honest view of the data.
Now we see sales between 1970 and 1980 were mostly flat.
That's because of a prolonged recession during that period.
The author of this website shows here how to rescale the data in a spreadsheet.
If you are astute, you'll also notice a seasonal effect:
higher sales in the summer than the winter.
Notice how this seasonality is emphasized once the data are rescaled.
One final piece of advice is to always provide some context to the user.
The first plot shows the rising trend in this stock price,
but with context we get a more honest reflection of has happened.
Remember time-series plots are about historical data; so you must provide enough of it
to give the person using your plot the insight to make an accurate decision.
So that's it for a summary of time-series plots; remember avoid using colours,
shows data on separate axes when possible, and don't forget to exploit the ability
of the human eye to pick out detail and to use high density graphics.