0:00Hey, it's Tim here. In today's video, I'm
0:01going to show you how to build a scatter
0:03plot in just two
0:04minutes. I'm looking at life expectancy
0:06data again, and this time we're going to
0:09look at some
0:09slightly different sort of comparisons. We
0:11're going to take adult mortality, put it up
0:13on columns,
0:14and we'll take life expectancy and put it
0:16on rows. Now we get one data point, and
0:18technically this is
0:19already a scatterplot. It's not telling us
0:22much though, so let's add more context to
0:24the chart.
0:25If we go ahead and put country on detail,
0:27you'll see that we get a dot for each and
0:29every country.
0:30And now we're starting to see a bit more of
0:32a story. However, it's important to notice
0:34that
0:34Tableau is aggregating this. That's the
0:36default aggregation, a sum. You can change
0:38the default
0:39aggregation in Tableau, but I'll just
0:41change it here in the chart by just going
0:42to average.
0:43I'll go there to select average again, and
0:45now what this is doing is it's averaging
0:47all the
0:47values because this data does span multiple
0:50years. If I want to put the years on this
0:52chart as well,
0:54you can notice here that they're continuous
0:55. What I can do is I can actually convert
0:57that to discrete.
0:58Go ahead, put year on detail, and now we
1:01get more dots that convey the story a
1:03little bit better.
1:04And so if we look at this, we've got adult
1:06mortality going up here on the right-hand
1:08side.
1:08The higher the value, the worse the
1:10mortality rate, and life expectancy going
1:12up. This is a
1:13bit of a weird way to look at this. Really
1:14what we should have, I think, is if I just
1:16flip the chart
1:17round like this, this makes more sense.
1:20Mortality going up on the left and life
1:23expectancy going
1:24sort of down on the bottom. To me, life
1:26expectancy as the x-axis makes sense
1:27because it's almost like
1:28a scale going from left to right. There's
1:30something about that just makes a little
1:32bit more sense.
1:33Now what we can do is we can format this a
1:34little bit. You can see it's set to
1:36automatic,
1:36and it's using multiple shapes. We don't
1:38need that. We can just have one circle.
1:40That will do
1:40us fine. We'll make this a little bit
1:42smaller, and what we'll notice is there's
1:44quite a bit of overlap
1:45with the data. So I'll bring this down to
1:47about 78 percent, and I'll make a dark
1:49border. Actually,
1:50with this one, I can make a white border so
1:52all the dots are a little bit easier to see
1:53.
1:53Now this is something you'd only ever see
1:56in a scatter plot. It's quite convenient
1:58that there
1:59seems to be no data falling around the 60
2:01mark, 70 mark, and even the 80 mark, and
2:04then again at 100,
2:05and some of these other sort of groupings.
2:07And so what this might suggest is there's a
2:09little bit of
2:09something's going on with the data
2:11collection or the data storage that means
2:14that I think those
2:15data data points are being filtered out. It
2:17's too coincidental that those lines are a
2:19bit sort of
2:20disparate. Now one thing you could do to
2:22tell a story with this is actually try and
2:24add a little
2:24bit more context. Let's say I wanted to
2:26analyze a particular set of countries. In
2:29this case,
2:29I'll go choose United States and United
2:32Kingdom. So let's go ahead and choose those
2:34two,
2:34and I want to compare them versus every
2:36other country. What I've done there is I've
2:38created a
2:38set. I'll put the set on color, and you can
2:41see that it colors each and every one of
2:43those dots
2:43that represents those countries in the
2:45visualization. They're just here at the
2:46bottom.
2:47You can just see them. The next thing I can
2:49do is I can add a trend line. So if I show
2:51trend lines,
2:52what the trend line will do is we'll look
2:54for see what's on the color pane and
2:56actually use
2:56those to split the trend line. So the blue
2:59is the United States and United Kingdom,
3:01and the gray is
3:02every other country. And because we're
3:03looking at averages, this is now starting
3:05to tell us a bit
3:06more of a story. Typically, United States
3:09and United Kingdom have had fairly low
3:11adult mortality
3:12rates, which means that the more they've
3:14improved adult mortality, the less of
3:16effect has had on
3:17life expectancy, whereas for some countries
3:20, pretty much every other country in the
3:21world,
3:22there's a much, much higher correlation
3:24there, and you can see that effect
3:25happening.
3:26That's pretty much it. I've run out of time
3:28. Thanks for watching. And if you haven't
3:29subscribed yet,
3:30please subscribe, and I'll catch you in the
3:32next video.
3:32Transcribed by https://otter.ai
3:38[ Silence ]