0:00Hey, it's Tim here. In today's video, I'm
0:01going to show you how to build a histogram
0:03in two minutes.
0:04Let's get stuck in. So here I have life
0:06expectancy data from the World Health
0:08Organization,
0:09and I want to look at the value of life
0:11expectancy. And to create a histogram, we
0:13typically create
0:14them because we want to look at
0:15distribution. So let me go ahead and do
0:17something here
0:18called creating a bin. What a bin does is
0:20essentially groups up the values in the
0:23data
0:23into grouping. So for this, we'll group
0:25life expectancy into buckets of roughly
0:27five,
0:28and go ahead and select OK. And that's
0:30pretty much it, you'll see that we now have
0:31a new item
0:32just here on the top left hand side. Let's
0:34go ahead and drag that onto columns. And
0:36you'll see
0:36that we have our groupings. Some rows have
0:38no data, that's what now means. And the
0:40data typically
0:41starts from 30 upwards. So the first
0:43grouping is actually 30 to 35. The simplest
0:45analysis we can do
0:46here is just look at the all the records
0:48and see how they sit inside of our data.
0:51And we have a
0:51histogram. It's that simple. But we want to
0:53do some data storytelling here because this
0:55data looks
0:56over multiple years. If I go and drag the
0:58year onto filters, you'll see that it doesn
1:00't let me
1:01select one year on its own. This is because
1:03this is a continuous field at the moment.
1:05That's why
1:05we're getting everything here is to do with
1:07ranges. So let's go ahead and hit cancel.
1:09Go back to the year field, click on this
1:11little drop option, and select convert to
1:14discrete. And
1:14now when we drag it in, it allows us to
1:16select each individual year, we'll go ahead
1:18select 2015,
1:19click OK. And now you can see it's filtered
1:21to the most recent year. The other thing
1:24you can do with
1:24histograms, you can add context to them.
1:27For example, what impact does adult
1:29mortality have
1:30on life expectancy. So let's go ahead and
1:32create yet another bin for this one. We'll
1:35do this in
1:36buckets of let's say, let's do 50. Let's do
1:3850. Because I think that makes the most
1:40sense.
1:41Essentially, the adult mortality is
1:43measured as a percentage out of 1000. So if
1:4650 out of 1000,
1:47people are passing away, that's sort of a
1:48rough percentage, if that makes sense. So
1:50let's go
1:51ahead and instead of putting that into
1:52another histogram, let's put it on colour.
1:54And you can see
1:56the higher the mortality adult mortality,
1:58the lower the life expectancy tends to be,
2:00you can see
2:00that the rates over here on the right hand
2:02side 450 per 1000 people in the population
2:06is extremely
2:06high. Now the final piece of data
2:08storytelling we can do here is just move
2:11this filter up to the
2:12page itself, the page itself allows you to
2:14play through the different years, I'll move
2:16my face to
2:17the top left here. And now when we hit play
2:19with tableau's animations, we can see the
2:21story
2:22unfolding in front of us. And as countries
2:24lower their adult mortality rates, life
2:26expectancy is
2:27going up just one of the many factors that
2:29influences that particular value. Thanks
2:32for
2:32watching, and I'll catch you in the next
2:33video. If you're not subscribed yet, please
2:35do so and I'll
2:35see you soon. Transcribed by https://otter.
2:37ai
2:37Transcribed by https://otter.ai
2:41[ Silence ]