{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example: CO$_2$ at Mauna Loa" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the late 1950's Charles Keeling invented a accurate way to measure atmospheric CO$_2$ concentration and began taking regular measurements at the Mauna Loa observatory. Today, measurements are continuously recorded. Check out last hours measurement result [here](https://www.co2.earth/daily-co2). \n", "\n", "![Mauna Loa observatory](http://sites.gsu.edu/geog1112/files/2014/07/MaunaLoaObservatory_small-2g29jvt.png)\n", "\n", "Not much was known about how fossil fuel burning influences the climate in the late 1950s. The first couple years of data collection showed that CO$_2$ levels rose and fell following summer and winter, tracking the growth and decay of vegetation in the northern hemisphere. As multiple years passed, the steady upward trend increasingly grew into focus. With over 70 years of collected data, the Keeling curve is one of the most important climate indicators.\n", "\n", "The history behind these measurements and their influence on climatology today and other interesting reading:\n", "\n", "- http://scrippsco2.ucsd.edu/history_legacy/early_keeling_curve#\n", "- https://scripps.ucsd.edu/programs/keelingcurve/2016/05/23/why-has-a-drop-in-global-co2-emissions-not-caused-co2-levels-in-the-atmosphere-to-stabilize/#more-1412\n", "- http://cdiac.ornl.gov/\n", "\n", "Let's load in the data, tidy it up, and have a look. The [raw data set is located here](http://scrippsco2.ucsd.edu/data/atmospheric_co2/mlo). This notebook uses the [Bokeh package](http://bokeh.pydata.org/en/latest/) for plots that benefit from interactivity." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Preparing the data" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2017-09-18T04:07:29.657111Z", "start_time": "2017-09-18T04:07:29.636254Z" } }, "outputs": [ { "data": { "text/html": [ "\n", "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/javascript": [ "\n", "(function(global) {\n", " function now() {\n", " return new Date();\n", " }\n", "\n", " var force = true;\n", "\n", " if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", " window._bokeh_onload_callbacks = [];\n", " window._bokeh_is_loading = undefined;\n", " }\n", "\n", "\n", " \n", " if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n", " window._bokeh_timeout = Date.now() + 5000;\n", " window._bokeh_failed_load = false;\n", " }\n", "\n", " var NB_LOAD_WARNING = {'data': {'text/html':\n", " \"\\n\"+\n", " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", " \"
\\n\"+\n", " \"\\n\"+\n",
" \"from bokeh.resources import INLINE\\n\"+\n",
" \"output_notebook(resources=INLINE)\\n\"+\n",
" \"
\\n\"+\n",
" \"\n", " | CO2 | \n", "seasonaly_adjusted | \n", "fit | \n", "seasonally_adjusted_fit | \n", "CO2_filled | \n", "seasonally_adjusted_filled | \n", "
---|---|---|---|---|---|---|
1958-03-15 | \n", "315.69 | \n", "314.43 | \n", "316.18 | \n", "314.90 | \n", "315.69 | \n", "314.43 | \n", "
1958-04-15 | \n", "317.46 | \n", "315.15 | \n", "317.30 | \n", "314.98 | \n", "317.46 | \n", "315.15 | \n", "
1958-05-15 | \n", "317.50 | \n", "314.73 | \n", "317.84 | \n", "315.06 | \n", "317.50 | \n", "314.73 | \n", "
1958-07-15 | \n", "315.86 | \n", "315.17 | \n", "315.87 | \n", "315.22 | \n", "315.86 | \n", "315.17 | \n", "
1958-08-15 | \n", "314.93 | \n", "316.17 | \n", "314.01 | \n", "315.29 | \n", "314.93 | \n", "316.17 | \n", "