{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Amsterdam Weather Analysis - KNMI Data\n", "\n", "Analysis of 10 years of hourly weather data from KNMI (Royal Netherlands Meteorological Institute).\n", "Data is in UTC with proper timezone handling.\n", "\n", "**Features:**\n", "- Temperature (°C) at 1.50m height\n", "- Wind speed (m/s) 10-minute average \n", "- Global horizontal irradiance (W/m²) hourly\n", "\n", "**Analysis:**\n", "1. Hourly model with daily/annual cycles\n", "2. Daily model with annual cycles\n", "3. Pairwise joint distributions\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "tags": [ "hide-input" ] }, "outputs": [], "source": [ "import matplotlib\n", "matplotlib.use('module://matplotlib_inline.backend_inline')\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "from cgmm import ConditionalGMMRegressor\n", "import warnings\n", "import os\n", "warnings.filterwarnings('ignore')\n", "\n", "# Set style\n", "plt.style.use('default')\n", "plt.rcParams['figure.figsize'] = (12, 8)\n", "plt.rcParams['font.size'] = 10\n", "\n", "# Colors\n", "colors = {'temp': '#e74c3c', 'wind': '#3498db', 'light': '#f1c40f'}\n", "\n", "os.makedirs('gallery_images', exist_ok=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load and Prepare Data\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "tags": [ "hide-input" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data: 96,432 records from 2014-01-01 00:00:00 to 2024-12-31 23:00:00\n", "Columns: ['temp_c', 'wind_ms', 'ghi_wm2', 'wind_ms_log1p', 'ghi_wm2_log1p'] (wind_ms and ghi_wm2 log1p transformed)\n" ] }, { "data": { "text/html": [ "
| \n", " | temp_c | \n", "wind_ms | \n", "ghi_wm2 | \n", "wind_ms_log1p | \n", "ghi_wm2_log1p | \n", "
|---|---|---|---|---|---|
| datetime | \n", "\n", " | \n", " | \n", " | \n", " | \n", " |
| 2014-01-01 00:00:00 | \n", "6.2 | \n", "7.0 | \n", "0.0 | \n", "2.079442 | \n", "0.0 | \n", "
| 2014-01-01 01:00:00 | \n", "5.6 | \n", "6.0 | \n", "0.0 | \n", "1.945910 | \n", "0.0 | \n", "
| 2014-01-01 02:00:00 | \n", "6.2 | \n", "6.0 | \n", "0.0 | \n", "1.945910 | \n", "0.0 | \n", "
| 2014-01-01 03:00:00 | \n", "5.2 | \n", "6.0 | \n", "0.0 | \n", "1.945910 | \n", "0.0 | \n", "
| 2014-01-01 04:00:00 | \n", "4.9 | \n", "6.0 | \n", "0.0 | \n", "1.945910 | \n", "0.0 | \n", "