A Look at Global Warming

Dan Anderson
8 min readJan 10, 2020

I recently began my journey into the world of data science as a member of Lambda School’s Data Science “DSPT4” cohort. Lambda School is an awesome online coding school where learners can dive into user experience design, full-stack web app & mobile app development, and of course data science. It’s been a great ride of coding, statistics, data wrangling and community. Sounds good? It gets better — students can pay nothing until they land that killa new job.

At this juncture, a course milestone is to apply our early learnings to a data-driven problem or issue. The question of global climate change is probably one of the most intriguing of our age and unfortunately one that is divisive both socially and politically. Why not jump into the deep end of the pool!

Global Climate — Possible Drivers

Our planet’s climate and weather processes are some of the most complex systems humans will ever analyze. My humble goal is to do a (very) high-level comparison of two potential drivers of global climate: 1) CO2 driven global warming and 2) a lesser-known concept known as the cosmic ray hypothesis.

CO2 Driven Global Warming

The dominant explanation of global warming and climate change focuses on increases in atmospheric carbon dioxide (CO2). CO2 is a known “greenhouse gas”. CO2 molecules absorb energy in the form of photons from the sun causing their oxygen atoms to vibrate, increasing the energy of the molecule and surrounding molecules and then releasing a photon back into the atmosphere where the dynamic continues. This process on a large scale generates warming.

As fossil fuel consumption has dramatically increased over the last 120 years or so, the amount of CO2 in the atmosphere (CO2 concentration) has risen sharply from around 300 parts per million (ppm) to just over 400 ppm. More CO2 in the atmosphere (from anthropogenic or human-induced greenhouse gas emissions) means more energy absorption which leads to more atmospheric warming and a warmer and possibly more chaotic global climate.

Cosmic Ray Hypothesis of Global Climate

What the heck is this “cosmic ray”, Flash Gordon stuff — anybody “memba” the planet Mongo and Ming the Merciless?

Some compelling reasons exist to look for other climate factors including the nature of energy absorption by CO2, an observed decade long warming “hiatus”, and historical periods of both cooling and warming which featured low CO2 concentration.

CO2 Energy Absorption: All things being equal a doubling of CO2 concentration translates to a roughly 1C increase in warming. Due to this effect, the next batch of CO2 to enter the atmosphere should have less of a warming effect than the last batch — unless there are other forces at play.

A Warming Hiatus?: Some observers note that satellite temperature measurements indicate a “hiatus” or pause in warming between the years 1998 and 2013. This pause has not been clearly explained and remains controversial.

Warming Hiatus? 1998–2013

Historical Cooling & Warming Periods: Also prior to the industrial age and the increase in fossil fuel burning, there were distinct periods of both warming & cooling such as the Medieval Warm Period — MWP (~950 to ~1250) and the Little Ice Age — LIA (~1350 to 1850). The MWP exhibited warming similar to the 20th Century and is thought to have enabled Norse exploration of Greenland and North America. The LIA surfaced dramatic cooling historically depicted in accounts of the harsh winter at Valley Forge during the American Revolution and the routine winter freezing of the Thames River. Both of these periods occurred during a time with low atmospheric CO2 concentrations.

Alternative theories have been explored including the Cosmic Ray Hypothesis. Cosmic Rays are atomic particles that pound the earth expelled from stars outside of the Earth’s solar system.

At a high level, the mechanics work in this way. The sun as the dominant energy source in the solar system includes energy in the form of light, infrared radiation, and other forms of electromagnetic radiation. The power of the sun goes in cycles. In times of increased solar activity, the Sun emits high levels of energy pulses that shield the Earth from cosmic rays and in periods of low activity allows more cosmic rays to bombard the planet.

Cosmic rays “seed” cloud cover by ionizing molecules in the Earth’s atmosphere. These charged molecules clump together which enables water vapor to condense around them and produce clouds. Low solar activity leads to a relative increase in cosmic rays which leads to increase cloud cover and cooling.

High solar activity does the reverse — leading to a relative decrease in cosmic rays and cloud seeding and therefore more warming. Sunspots are a visible proxy for this type of solar activity so more sunspots mean higher solar activity and fewer sunspots mean relatively lower solar activity.

Let’s Compare the Theories

So let’s use some basic quantitative methods from the data science world to contrast the theories. We’ll start by grabbing some data: Global Temperature, atmospheric CO2 Concentration, and sunspot observations through history.

Our goal is to get as much data over as long of a time period as possible — ideally hundreds of years.

  • GLOBAL TEMPERATURE DATA — We’ll grab data from the Berkeley Earth Surface Temperature Study which includes “1.6 billion temperature reports from 16 preexisting data archives”. What’s great about this data set is that constructed data goes back to the early 1700s. The temperature data comes in the form of anomalies. That is the observations are not absolute temperature readings (e.g. 21C) but differences (-0.4 C, 1.1C, etc.) from a baseline. In our case, the baseline value is the average temperature from January 1951 to December 1980 (data)
  • ATMOSPHERIC CO2 CONCENTRATION — fetched data from SeaLevel.info which combines ice core data and CO2 measurements from the Mauna Loa Observatory. This dataset includes observations from 1800 to the present (data)
  • HISTORICAL SUNSPOT OBSERVATIONS — since historically measuring the sun’s electromagnetic flux is not feasible, we’ll use sunspot observations as a proxy data sourced from the WDC-SILSO (Sunspot Index and Long-term Solar Observations) directorate of the Royal Observatory of Belgium. This organization’s mission is to “to preserve, develop and diffuse the knowledge of the long-term variations of solar activity”. Even better it provides observations from 1700 (data)

Wrangle The Data

The real world is messy and data describing the real world is even messier so we’ll need to wrangle our data a bit. Even though we have some data from 1700, we only have CO2 concentration data from 1800. And for that data, the first few decades have ice core data every five years. So one bit of wrangling is to “fill in” the prorated CO2 concentration (in ppm) for that missing data.

Our temperature data is in monthly observations. Because CO2 concentration and the sunspot count are annual data points, I’ve calculated yearly average temperature values.

Visualize the Data

Let’s see what we got by generating some basic data plots.

CO2 concentration, sunspot counts, and average global temperature anomalies since 1800
Simple Plots: CO2, Sunspot Cycles, Temperature Anomalies

On the left-hand side, we have CO2 concentration increasing in a nice smooth curve from 280 ppm to over 400 ppm and see clearly that sunspot observations (and presumably solar activity) move in a very cyclical manner — known to be an 11-year cycle.

On the right-hand side is a plot of our yearly global temperature anomalies. Near 1800 the anomalies appear to be below our baseline as the Earth comes out of the Little Ice age. The temperate anomalies move into positive values depicting a warming planet and the anomalies seem to get “tighter” or less variable but indicate accelerating warming.

Correlate the Potential Drivers with Global Warming

Now that we’ve got a sense of the data: global warming occurring, CO2 concentration rising sharply, and cyclical sunspot activity, let’s see how warming correlates with our potential factors.

Data visualizations may help so let’s look at some simple scatterplots comparing temperature anomalies and CO2 concentration & sunspot observations.

Scatterplots: CO2 vs. Temperature Anomalies & Sunspots vs. Temperature Anomalies

From the scatterplots, it looks pretty clear that the average yearly global temperature anomalies have some sort of correlation with CO2 concentration over time. The correlation looks fairly weak between the temperature data and sunspot observations.

The numbers support our visual assessment. The pairwise correlation between temperature anomalies and CO2 concentration is 0.8642 over the entire time period — indicating a strong positive correlation.

The correlation between temperature anomalies and sunspot observations is 0.0550 — a weak relationship.

Drawing Conclusions

This an extremely simple exercise addressing an exceedingly complex system. But can we draw any conclusions? I think we can. The planet is warming and that phenomenon has brought at least large parts of the planet out of a cooling period commonly known as the Little Ice Age. That warming appears to have accelerated as CO2 concentration has increased.

The correlation between sunspots and global warming appears very weak. Obviously a more in-depth analysis is needed to understand a deeply complex global system.

A Final (Odd?) Note

The visualizations have been helpful but looking back at the scatterplot between temperature and CO2 yields an early phase of dispersed scatter points and a later phase of a more linear relationship.

Breaking up the pairwise correlation into two time periods expresses what we’re seeing. Before 1900, the correlation coefficient is 0.2309, a relatively weak correlation. After 1900, the correlation coefficient is strong: 0.9242. The question is why would the relationship between temperature and CO2 concentration differ over time. Possible reasons could be due to raw data capture, data processing, and wrangling. Other possible reasons could be the nature of the physical energy absorption process at the molecular level which is not specifically linear. At this point, this will have to remain a potential question for another post.

CO2 Concentration vs. Global Temperature Anomalies: 1800 to 1899
CO2 Concentration vs. Global Temperature Anomalies: 1900+

Thanks for joining me on this milestone in my data science journey. More to come! (Check out my Google Colab Notebook)

--

--

Dan Anderson

Product development mensch. I dig Go, Angular, MongoDB, and Lean Startup. Studying Data Science at Lambda School (DSPT4)