- Hello, data geeks, thanks for joining me.
And today I'm gonna be breaking down some
climate change data to figure out if there's an
algorithm we can use to actually save the planet.
So, Bloomberg put out this really awesome
graph and analysis here.
I'm gonna go through it step by step,
then I'm gonna show you my own analysis
to figure out what we can do about it.
They wanted to figure out,
what's really causing climate change,
or global warming?
What's actually causing the temperature to rise?
And you can see on the chart here
that this is the land-ocean temperature,
the observed temperature,
and how it's been going up since 1880.
And if you go through their list here, they have
all these fantastic graphics about,
what could possibly be doing it?
Is it the earth's orbit?
You can see the orbital changes.
And, basically, no, it is pretty flat.
Is it the sun? Is it the solar flares?
Is there something happening there?
No, it's just flat.
Volcanoes, maybe volcanoes are to blame, who knows?
No, it's flat again.
And so you go through these,
you combine all of them, you say,
okay, what about all these natural factors?
What if you added them all up?
Still no, they're practically flat
in terms of their activity
compared to the actual temperature rising.
So, what about other things?
What about deforestation?
That's actually gone down slightly,
so that's not it.
What about ozone pollution?
The ozone is a very fragile, thin layer protecting us all.
Again, still pretty flat.
Aerosol?
Remember back in the 80s when we had this big thing,
you don't want to use hairspray anymore?
You can see that's gone down,
specifically, since the 80s there.
It's greenhouse gas is the answer,
and you can see that in this simple trend.
How it correlates really tightly with the
increase in temperature on the planet.
And if you go down and you take a look,
you can combine all of these things,
they mirror them almost exactly.
So, the increase in global temperature
almost exactly aligns with
the increase or the effect of our human effect here,
the factors of being human.
So what about me?
I did some analysis, too.
Let's take a look at that.
And, first, what I want to look at is
the total CO2 emissions.
And I'm just going back from 1990 to 2008.
So, not even that long go.
And you can see here, we have the total CO2 emissions.
In 1990, we had just over 15 million parts,
and then back in 2008, we have an 80% increase,
80% jump in only 18 years, that's insane.
So, to say that humans aren't doing anything,
when you compare this data to everything else,
is kind of ignorant, it's kind of stupid.
So what about by country, though?
So if we wanted to actually solve this,
if we looked at all of the countries broken down,
you can see that China and The United States
make up for nearly half of all CO2 pollution
on the planet.
If you add in India, we're really, really close
to 50% of all CO2 in the world is emitted
by these two countries.
Why? Well, we both have a ton of people.
And in China, they manufacture
a ton of goods that are sold throughout the world,
United States being the ones that consume
the majority of those goods.
You have the country that's making all the stuff
and the country that's consuming all the stuff,
are the ones that are really killing the planet.
Now how can we solve this? What can we do?
Well, we can take a look
and use an algorithm called Clustering.
And this algorithm is really the k-means algorithm,
and it's a method of combining data into similar groups
based on some variables you provide.
And how does it work?
Well, we start by laying out all of our data points,
and we create some axes, and I'll show you
what that looks like in second,
and then we try to find the centers.
Where are these clusters within our data points?
Where are the data points grouping together?
And what will this do for us?
It'll help us find that
actual countries, besides the biggest polluters,
that we can really target as people that need
to change their behavior
to help reduce CO2 emissions.
So once you put some centers on there,
then we start to calculate things.
We iterate through it, we say,
how close are each one of these points?
And then, how far away are each one of these points?
And then you come up with these zones,
these kind of clustering zones.
Then once you have your zone,
you find out, where is the center of the zone?
And you move the center of that cluster
to adjust for all the data that's in your graph.
So this is based on this
Calinski-Harabasz criterion.
And we have SSB and SSW, that's the
between cluster variance,
and the within cluster variance.
Then you have that, multiplied
by N minus K over K minus one.
K is the number of clusters that we figured out
in our analysis,
and N is the number of data points.
In our analysis, we're only gonna have about
200 or so data points because
that's how many countries we have in the world.
Okay, so let's apply
this algorithm to our data.
Now, the question we're trying to answer are,
who are the worst polluters?
Well, if we group them into four different categories:
extreme polluters, high polluters, medium polluters, and
low polluters, you can see what the graph looks like here.
Obviously, China and The United States are
in the extreme category.
But other countries
that you may not have thought about here:
Qatar, Trinidad, Tobago,
Kuwait, The United Arab Emirates.
Even Australia and Canada are in the high category.
So, when we want to make a policy
and we want to think about change in the world,
something like the Paris Agreement, which was great,
didn't really need to happen.
You didn't need every single country in the world
to agree to something
just to make a little bit of change.
If you can get China and The United States,
and some of these other ones in here
in the extreme category: Qatar, Trinidad, Tobago, Kuwait,
for them to actually start to do this as well,
we can have a serious, meaningful impact on the world,
all using just a little bit of data science here.
Hey, thanks for checking out my video here.
As you can see, we've got a lot of work to do
in figuring out how all the data behind everything
actually affects our everyday lives.
So, stay tuned.
Every week, I've got a new video coming
here on this channel, as well as my blog
at bensullins.com, where you can find code samples
and all other kinds of articles and stuff there.
So, thanks again for watching,
and I'll see you back here soon.