Loading Libraries

Loading Data

Loaded 2 dataset from “datahub.io”:

  1. Global CO2 Emissions from Fossil Fuels since 1751 
  2. Global Temperature Time Series

Global CO2 Emissions

Global CO2 Emissions from fossil-fuels annually since 1751 till 2014.

source: https://datahub.io/core/co2-fossil-global

Global Temperature Time Series

Global Temperature Time Series. Data are included from the GISS Surface Temperature (GISTEMP) analysis and the global component of Climate at a Glance (GCAG). Two datasets are provided: 1) global monthly mean and 2) annual mean temperature anomalies in degrees Celsius from 1880 to the present.

source: https://datahub.io/core/global-temp

Data Cleansing

We have to filter ‘Global CO2 Emissions’ for years after 1880 because ‘Global Temperature’ data is after 1880.

We have to filter ‘Global Temperature’ for years before 2010 because ‘Global CO2 Emissions’ data is until 2010.

For ‘Global CO2 Emissions’ keep only ‘Total’ column and drop others, set the index to ‘Year’ Column and sort data by index(Year).


For ‘Global CO2 Emissions’ dataset, separating two sources (GCAG, GISTEMP), then drop the source and set the index on ‘Year’ column and sort data by index (Year)

Insights

Set a color for each data set and plot data to visually check our datasets.

There are some differences between GCAG, and GISTEMP data, comparing two datasets’s histogram.

Plot a scatter plot for each dataset (GCAG, GISTEMP) with CO2.

Visually we can see a correlation between our datasets, but know we check the numbers

We can the there is a strong relationship between ‘Global CO2 Emissions’ & ‘Global Temperature’.

Linear Regression Models

Using Seaborn 'regplot'

Predict 2011-2021