Histograms help show distribution. In this video I show you how to build one in no time.
Join this channel to get access to perks:
Hey, it's Tim here in today's video.
I'm going to show you how to build a histogram in two minutes.
Let's get stuck in.
So here I have life expectancy data from the World Health Organization.
And I want to look at the value of life expectancy.
And to create a histogram, we typically create them because we want to look at distribution.
So let me go ahead and do something here called creating a bin.
What a bin does is essentially groups up the values in the data into grouping.
So for this, we'll group life expectancy into buckets of roughly five and go ahead and select.
OK, and that's pretty much it.
You'll see that we now have a new item just here on the top left hand side.
Let's go ahead and drag that onto columns and you'll see that we have our groupings.
Some rows have no data.
That's what now means.
And the data typically starts from 30 upwards.
So the first grouping is actually 30 to 35.
The simplest analysis we can do here is just look at all the records and see how they sit inside of our data.
And we have a histogram.
It's that simple.
But we want to do some data storytelling here because this data looks over multiple years.
If I go and drag the year onto filters, you'll see that it doesn't let me select one year on its own.
This is because this is a continuous field at the moment.
That's why we're getting everything here is to do with ranges.
So let's go ahead and hit cancel.
Go back to the year field, click on this little drop and select convert to discrete.
And now when we drag it in, it allows us to select each individual year.
We'll go ahead, select 2015, click OK, and now you can see it's filtered to the most recent year.
The other thing you can do with histograms, you can add context to them.
For example, what impact does adult mortality have on life expectancy?
So let's go ahead and create yet another bin for this one.
We'll do this in buckets of, let's say, let's do 50.
Let's do 50 because I think that makes the most sense.
Essentially, the adult mortality is measured as a percentage out of 1,000.
So if 50 out of 1,000 people are passing away, that's sort of a rough percentage, if that makes sense.
So let's go ahead and instead of putting that into another histogram, let's put it on color.
And you can see the higher the mortality, adult mortality, the lower the life expectancy tends to be.
You can see the rates over here on the right hand side.
450 per 1,000 people in the population is extremely high.
Now, the final piece of data storytelling we can do here is just move this filter up to the page of self.
The page of self allows you to play through the different years.
I'll move my face to the top left here.
And now when we hit play with tableau's animations, we can see the self-story unfolding in front of us.
And as countries lower the adult mortality rate, life expectancy is going up.
Just one of the many factors that influences that particular value.
Thanks for watching and I'll catch you in the next video.
If you're not subscribed yet, please do so and I'll see you soon.