{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "5CCEPT_lXzIp" }, "source": [ "\n", "# Problem 1.1" ] }, { "cell_type": "markdown", "metadata": { "id": "6ZZb8a8NXzIu" }, "source": [ "**Integrated Energy Grids**\n", "\n", "**Problem 1.1. Analyzing solar and wind generation time series.**" ] }, { "cell_type": "markdown", "metadata": { "id": "4zUbh1xSYLs7" }, "source": [ ":::{note}\n", "If you have not yet set up Python on your computer, you can execute this tutorial in your browser via [Google Colab](https://colab.research.google.com/). Click on the rocket in the top right corner and launch \"Colab\". If that doesn't work download the `.ipynb` file and import it in [Google Colab](https://colab.research.google.com/).\n", "\n", "Then install `pandas` and `numpy` by executing the following command in a Jupyter cell at the top of the notebook.\n", "\n", "```sh\n", "!pip install pandas numpy scipy\n", "```\n", ":::" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "id": "I__ZcxJRXzIx" }, "outputs": [], "source": [ "import pandas as pd\n", "from scipy import fftpack\n", "import numpy as np\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": { "id": "_QBUMreIXzI1" }, "source": [ "# Data import" ] }, { "cell_type": "markdown", "metadata": { "id": "Jue-qPKjXzI2" }, "source": [ "In this example, wind data from [https://zenodo.org/record/3253876#.XSiVOEdS8l0](https://zenodo.org/record/3253876#.XSiVOEdS8l0) and solar PV data from [https://zenodo.org/record/2613651#.X0kbhDVS-uV](https://zenodo.org/record/3253876#.XSiVOEdS8l0) is used. The data is downloaded in csv format and saved in the 'data' folder.\n", "The Pandas package is used as a convenient way of managing the datasets.\n", "\n", "For convenience, the column including date information is converted into Datetime and set as index" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 214 }, "id": "gGUb-wrkXzI4", "outputId": "ad4dfd1e-3983-4889-9689-da1031a3c459" }, "outputs": [], "source": [ "data_pv = pd.read_csv('data/pv_optimal.csv',sep=';')\n", "data_pv.index = pd.DatetimeIndex(data_pv['utc_time'])\n", "data_wind = pd.read_csv('data/onshore_wind_1979-2017.csv',sep=';')\n", "data_wind.index = pd.DatetimeIndex(data_wind['utc_time'])" ] }, { "cell_type": "markdown", "metadata": { "id": "0tAazo-9XzI5" }, "source": [ "The data format can now be analyzed using the .head() function to show the first lines of the data set" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "id": "s3YnVhaYXzI6", "outputId": "079d977b-6e36-4a73-e516-8a31f440992a" }, "outputs": [ { "data": { "text/html": [ "
\n", " | utc_time | \n", "AUT | \n", "BEL | \n", "BGR | \n", "BIH | \n", "CHE | \n", "CYP | \n", "CZE | \n", "DEU | \n", "DNK | \n", "... | \n", "MLT | \n", "NLD | \n", "NOR | \n", "POL | \n", "PRT | \n", "ROU | \n", "SRB | \n", "SVK | \n", "SVN | \n", "SWE | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
utc_time | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
1979-01-01 00:00:00+00:00 | \n", "1979-01-01T00:00:00Z | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "... | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "
1979-01-01 01:00:00+00:00 | \n", "1979-01-01T01:00:00Z | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "... | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "
1979-01-01 02:00:00+00:00 | \n", "1979-01-01T02:00:00Z | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "... | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "
1979-01-01 03:00:00+00:00 | \n", "1979-01-01T03:00:00Z | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "... | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "
1979-01-01 04:00:00+00:00 | \n", "1979-01-01T04:00:00Z | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "... | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "
5 rows × 33 columns
\n", "