diff --git a/examples/smarteole_example.ipynb b/examples/smarteole_example.ipynb index 78939e1..386abf3 100644 --- a/examples/smarteole_example.ipynb +++ b/examples/smarteole_example.ipynb @@ -14,17 +14,15 @@ }, { "cell_type": "code", + "execution_count": 1, "id": "initial_id", "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, "ExecuteTime": { "end_time": "2024-09-06T09:13:33.848463Z", "start_time": "2024-09-06T09:13:32.278143Z" } }, + "outputs": [], "source": [ "import sys\n", "from pathlib import Path\n", @@ -39,9 +37,7 @@ "\n", "sys.path.append(str(PROJECTROOT_DIR))\n", "from examples.helpers import download_zenodo_data" - ], - "outputs": [], - "execution_count": 1 + ] }, { "cell_type": "markdown", @@ -53,6 +49,7 @@ }, { "cell_type": "code", + "execution_count": 2, "id": "790f0d13f228760e", "metadata": { "ExecuteTime": { @@ -60,6 +57,7 @@ "start_time": "2024-09-06T09:13:33.849090Z" } }, + "outputs": [], "source": [ "import logging\n", "import re\n", @@ -80,9 +78,7 @@ "logger = logging.getLogger()\n", "logger.handlers = [] # Clear existing handlers to avoid duplication\n", "logger.addHandler(NotebookHandler())" - ], - "outputs": [], - "execution_count": 2 + ] }, { "cell_type": "markdown", @@ -94,6 +90,7 @@ }, { "cell_type": "code", + "execution_count": 3, "id": "99dc70078535ac4d", "metadata": { "ExecuteTime": { @@ -101,18 +98,15 @@ "start_time": "2024-09-06T09:13:33.854832Z" } }, - "source": [ - "from examples.smarteole_example import CACHE_DIR, ZIP_FILENAME\n", - "\n", - "download_zenodo_data(record_id=\"7342466\", output_dir=CACHE_DIR, filenames={ZIP_FILENAME})" - ], "outputs": [ { "data": { + "text/markdown": [ + "Beginning file download from Zenodo: SMARTEOLE-WFC-open-dataset.zip..." + ], "text/plain": [ "" - ], - "text/markdown": "Beginning file download from Zenodo: SMARTEOLE-WFC-open-dataset.zip..." + ] }, "metadata": {}, "output_type": "display_data" @@ -125,7 +119,11 @@ ] } ], - "execution_count": 3 + "source": [ + "from examples.smarteole_example import CACHE_DIR, ZIP_FILENAME\n", + "\n", + "download_zenodo_data(record_id=\"7342466\", output_dir=CACHE_DIR, filenames={ZIP_FILENAME}, cache_overwrite=True)" + ] }, { "cell_type": "markdown", @@ -137,6 +135,7 @@ }, { "cell_type": "code", + "execution_count": 4, "id": "b82bcc2c9b68ecc6", "metadata": { "ExecuteTime": { @@ -144,55 +143,9 @@ "start_time": "2024-09-06T09:14:02.583774Z" } }, - "source": [ - "import warnings\n", - "\n", - "from scipy.stats._axis_nan_policy import SmallSampleWarning\n", - "\n", - "from examples.smarteole_example import ANALYSIS_TIMEBASE_S, CACHE_SUBDIR, unpack_smarteole_scada\n", - "\n", - "warnings.filterwarnings(\"ignore\", category=SmallSampleWarning)\n", - "\n", - "CACHE_SUBDIR.mkdir(exist_ok=True, parents=True)\n", - "scada_df = unpack_smarteole_scada(ANALYSIS_TIMEBASE_S)\n", - "scada_df.head()" - ], "outputs": [ { "data": { - "text/plain": [ - " TurbineName ActivePowerMean ActivePowerSD \\\n", - "TimeStamp_StartFormat \n", - "2020-02-17 16:30:00 SMV1 2017.8566 57.0837 \n", - "2020-02-17 16:40:00 SMV1 1946.2472 91.7614 \n", - "2020-02-17 16:50:00 SMV1 1946.5069 98.3934 \n", - "2020-02-17 17:00:00 SMV1 1828.9365 139.5910 \n", - "2020-02-17 17:10:00 SMV1 1751.7035 170.2128 \n", - "\n", - " WindSpeedMean WindSpeedSD YawAngleMean YawAngleMin \\\n", - "TimeStamp_StartFormat \n", - "2020-02-17 16:30:00 13.6164 1.2411 247.884662 239.930 \n", - "2020-02-17 16:40:00 13.0139 1.0178 259.686000 259.686 \n", - "2020-02-17 16:50:00 12.5818 0.9482 259.686000 259.686 \n", - "2020-02-17 17:00:00 11.6641 0.9244 252.924035 249.808 \n", - "2020-02-17 17:10:00 11.3144 1.0116 249.808000 249.808 \n", - "\n", - " YawAngleMax PitchAngleMean GenRpmMean AmbientTemp \\\n", - "TimeStamp_StartFormat \n", - "2020-02-17 16:30:00 259.686 6.0648 1800.5394 11.6191 \n", - "2020-02-17 16:40:00 259.686 3.5153 1798.7652 11.5493 \n", - "2020-02-17 16:50:00 259.686 2.1367 1799.5171 11.4929 \n", - "2020-02-17 17:00:00 259.686 0.8526 1799.4533 11.4735 \n", - "2020-02-17 17:10:00 249.808 0.2404 1799.2136 11.3937 \n", - "\n", - " ShutdownDuration \n", - "TimeStamp_StartFormat \n", - "2020-02-17 16:30:00 0 \n", - "2020-02-17 16:40:00 0 \n", - "2020-02-17 16:50:00 0 \n", - "2020-02-17 17:00:00 0 \n", - "2020-02-17 17:10:00 0 " - ], "text/html": [ "
\n", "