diff --git a/examples/smarteole_example.ipynb b/examples/smarteole_example.ipynb
index ea94192..77b96b7 100644
--- a/examples/smarteole_example.ipynb
+++ b/examples/smarteole_example.ipynb
@@ -12,17 +12,19 @@
},
{
"cell_type": "code",
+ "execution_count": 1,
"id": "initial_id",
"metadata": {
- "collapsed": true,
- "jupyter": {
- "outputs_hidden": true
- },
"ExecuteTime": {
"end_time": "2024-08-16T16:35:55.164525Z",
"start_time": "2024-08-16T16:35:53.745408Z"
+ },
+ "collapsed": true,
+ "jupyter": {
+ "outputs_hidden": true
}
},
+ "outputs": [],
"source": [
"import sys\n",
"from pathlib import Path\n",
@@ -37,9 +39,7 @@
"\n",
"sys.path.append(str(PROJECTROOT_DIR))\n",
"from examples.helpers import download_zenodo_data"
- ],
- "outputs": [],
- "execution_count": 1
+ ]
},
{
"cell_type": "markdown",
@@ -51,6 +51,7 @@
},
{
"cell_type": "code",
+ "execution_count": 2,
"id": "790f0d13f228760e",
"metadata": {
"ExecuteTime": {
@@ -58,16 +59,18 @@
"start_time": "2024-08-16T16:35:55.164525Z"
}
},
+ "outputs": [],
"source": [
"import logging\n",
"import re\n",
- "from IPython.display import display, Markdown\n",
+ "\n",
+ "from IPython.display import Markdown, display\n",
"\n",
"logging.basicConfig(format=\"%(message)s\", level=logging.INFO)\n",
"\n",
"\n",
"class NotebookHandler(logging.Handler):\n",
- " def emit(self, record):\n",
+ " def emit(self, record): # noqa ANN001\n",
" message = self.format(record)\n",
" # Replace newline characters with
tags\n",
" message = re.sub(r\"\\n\", \"
\", message)\n",
@@ -77,9 +80,7 @@
"logger = logging.getLogger()\n",
"logger.handlers = [] # Clear existing handlers to avoid duplication\n",
"logger.addHandler(NotebookHandler())"
- ],
- "outputs": [],
- "execution_count": 2
+ ]
},
{
"cell_type": "markdown",
@@ -91,6 +92,7 @@
},
{
"cell_type": "code",
+ "execution_count": 3,
"id": "99dc70078535ac4d",
"metadata": {
"ExecuteTime": {
@@ -98,18 +100,13 @@
"start_time": "2024-08-16T16:35:55.171133Z"
}
},
- "source": [
- "from examples.smarteole_example import ZIP_FILENAME, CACHE_DIR\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"
@@ -122,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})"
+ ]
},
{
"cell_type": "markdown",
@@ -134,6 +135,7 @@
},
{
"cell_type": "code",
+ "execution_count": 4,
"id": "b82bcc2c9b68ecc6",
"metadata": {
"ExecuteTime": {
@@ -141,49 +143,9 @@
"start_time": "2024-08-16T16:36:53.104442Z"
}
},
- "source": [
- "from examples.smarteole_example import ANALYSIS_TIMEBASE_S, CACHE_SUBDIR, unpack_smarteole_scada\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",
"