co2

parent 89af08be
...@@ -706,7 +706,7 @@ ...@@ -706,7 +706,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.7.3" "version": "3.6.4"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
{ {
"cells": [], "cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# CO2 Data Analysis at Mauna Loa Observatory\n",
"\n",
"This notebook provides an analysis of atmospheric CO2 concentrations measured at the Mauna Loa Observatory, Hawaii. The dataset includes monthly CO2 measurements, both raw and adjusted, from various years.\n",
"\n",
"## Dataset Information\n",
"\n",
"- **Year**: Year of measurement.\n",
"- **Month**: Month of measurement.\n",
"- **Day_Count**: Identifier related to the day count (potentially not relevant for this analysis).\n",
"- **Decimal_Year**: Year in decimal format.\n",
"- **CO2**: Raw CO2 measurement (ppm).\n",
"- **Seasonally_Adjusted_CO2**: CO2 measurement with seasonal adjustment.\n",
"- **Smoothed_CO2**: Smoothed CO2 measurement.\n",
"- **Smoothed_Seasonally_Adjusted_CO2**: Smoothed and seasonally adjusted CO2 measurement.\n",
"- **Interpolated_CO2**: CO2 measurement with missing values filled in.\n",
"- **Interpolated_Seasonally_Adjusted_CO2**: Seasonally adjusted CO2 with missing values filled in.\n",
"- **Station_ID**: Station identifier."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"# Load the dataset\n",
"file_path = 'monthly_in_situ_co2_mlo.csv'\n",
"co2_data = pd.read_csv(file_path, skiprows=100)\n",
"\n",
"# Adjust the column names for clarity\n",
"co2_data.columns = [\n",
" 'Year', 'Month', 'Day_Count', 'Decimal_Year', 'CO2', \n",
" 'Seasonally_Adjusted_CO2', 'Smoothed_CO2', 'Smoothed_Seasonally_Adjusted_CO2',\n",
" 'Interpolated_CO2', 'Interpolated_Seasonally_Adjusted_CO2', 'Station_ID'\n",
"]\n",
"\n",
"co2_data.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Explore basic statistics of the dataset\n",
"co2_data.describe()\n",
"\n",
"# Check for missing values\n",
"co2_data.isnull().sum()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Plot CO2 over time\n",
"plt.figure(figsize=(14, 8))\n",
"sns.lineplot(x='Decimal_Year', y='CO2', data=co2_data, label='Raw CO2')\n",
"sns.lineplot(x='Decimal_Year', y='Seasonally_Adjusted_CO2', data=co2_data, label='Seasonally Adjusted CO2')\n",
"plt.title('CO2 Concentrations Over Time at Mauna Loa Observatory')\n",
"plt.xlabel('Year')\n",
"plt.ylabel('CO2 (ppm)')\n",
"plt.legend()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3", "display_name": "Python 3",
...@@ -16,10 +101,9 @@ ...@@ -16,10 +101,9 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.6.3" "version": "3.6.4"
} }
}, },
"nbformat": 4, "nbformat": 4,
"nbformat_minor": 2 "nbformat_minor": 2
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment