{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Concentration de CO2 dans l'atmosphère depuis 1958\n", "\n", "Ce document analyse l'évolution de la concentration de CO2 dans l'atmosphère depuis 1958 à aujourd'hui, en se basant sur les données disponibles sur le site du [Scripps CO2 Program](https://scrippsco2.ucsd.edu/data/atmospheric_co2/primary_mlo_co2_record.html). Les données utilisées proviennent de relevés mensuels effectués à la station de Mauna Loa.\n", "\n", "Pour plus d'informations, vous pouvez consulter :\n", "\n", "_C. D. Keeling, S. C. Piper, R. B. Bacastow, M. Wahlen, T. P. Whorf, M. Heimann, and H. A. Meijer, Exchanges of atmospheric CO2 and 13CO2 with the terrestrial biosphere and oceans from 1978 to 2000. I. Global aspects, SIO Reference Series, No. 01-06, Scripps Institution of Oceanography, San Diego, 88 pages, 2001._\n" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ " %matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import pandas as pd\n", "import isoweek\n", "import os\n", "import urllib" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Le fichier `csv` contenant les données est disponible à l'adresse suivante :" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "data_url = \"https://scrippsco2.ucsd.edu/assets/data/atmospheric/stations/in_situ_co2/monthly/monthly_in_situ_co2_mlo.csv\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " Nous conservons les données dans un fichier local, afin que la conservation du fichier sur lequel nous effectuons notre analyse soit robuste aux défaillances du site Sentiweb. À cette fin également, nous ne retéléchargeons pas automatiquement une nouvelle version à chaque exécution, mais seulement si le fichier local est manquant." ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "if not os.path.exists(\"monthly_in_situ_co2_mlo.csv\"):\n", " urllib.request.urlretrieve(data_url, \"monthly_in_situ_co2_mlo.csv\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }