From 59e28f341da23a947b5f80ae47de7e28e60e5d87 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Fri, 20 Oct 2023 16:07:08 +0200 Subject: [PATCH 01/13] add jupyter notebook for india --- examples/get_india_data.ipynb | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 examples/get_india_data.ipynb diff --git a/examples/get_india_data.ipynb b/examples/get_india_data.ipynb new file mode 100644 index 0000000..a2813e9 --- /dev/null +++ b/examples/get_india_data.ipynb @@ -0,0 +1,55 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Use the PVOutput API library to retrieve metadata for all available systems in India\n", + "\n", + "**2023-10-20**" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setup" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "import pandas as pd\n", + "import geopandas as gpd\n", + "from matplotlib import pyplot as plt\n", + "\n", + "sys.path.append(\"..\")\n", + "from pvoutput.grid_search import GridSearch\n", + "from pvoutput import PVOutput" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 5d704b373d7446ec43cfcb0f27c1c418d90d6009 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 23 Oct 2023 18:50:24 +0200 Subject: [PATCH 02/13] add india notebook --- examples/get_india_data.ipynb | 110 ++++++++++++++++++++++++++++++++-- 1 file changed, 105 insertions(+), 5 deletions(-) diff --git a/examples/get_india_data.ipynb b/examples/get_india_data.ipynb index a2813e9..5ed2d9e 100644 --- a/examples/get_india_data.ipynb +++ b/examples/get_india_data.ipynb @@ -18,11 +18,12 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "import sys\n", + "import requests\n", "import pandas as pd\n", "import geopandas as gpd\n", "from matplotlib import pyplot as plt\n", @@ -35,19 +36,118 @@ { "cell_type": "markdown", "metadata": {}, - "source": [] + "source": [ + "### Sites to get data from:\n", + "\n", + "Jaycee: 85738; BMT: 56151; 25 FM Grid Tie: 87410; FlinEnergy Infini 5k: 78186; Ind Moz: 10045; Little Tree: 90559; Solar 183: 60294" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [], + "source": [ + "api_key = \"3f784ff6cfa27c44436f88da0c429b410687ad14\"\n", + "system_id = \"68732\"\n", + "date = \"20230801\"\n", + "site_id = \"\"\n", + "data_service_url = \"https://pvoutput.org/data/r2/getsystemstatus.jsp\"\n", + "# pv = PVOutput(api_key, system_id, data_service_url=data_service_url)" + ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 29, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "CACHE_DIR = \"/tmp\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Working curl request\n", + "\n", + "curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [ + { + "ename": "SyntaxError", + "evalue": "invalid syntax (2245105558.py, line 3)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m Cell \u001b[0;32mIn[38], line 3\u001b[0;36m\u001b[0m\n\u001b[0;31m curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" + ] + } + ], + "source": [ + "# Get the data from PVOutput\n", + "# sites = [85738, 56151, 87410, 78186, 100451, 90559, 60294]\n", + "request = curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\n", + "dfs = []\n", + "url = \"https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\"\n", + "headers = {api_key, system_id}\n", + "r = requests.get(url, headers=headers)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "ename": "JSONDecodeError", + "evalue": "Expecting value: line 1 column 1 (char 0)", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)", + "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/site-packages/requests/models.py:971\u001b[0m, in \u001b[0;36mResponse.json\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 970\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m--> 971\u001b[0m \u001b[39mreturn\u001b[39;00m complexjson\u001b[39m.\u001b[39;49mloads(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mtext, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n\u001b[1;32m 972\u001b[0m \u001b[39mexcept\u001b[39;00m JSONDecodeError \u001b[39mas\u001b[39;00m e:\n\u001b[1;32m 973\u001b[0m \u001b[39m# Catch JSON-related errors and raise as requests.JSONDecodeError\u001b[39;00m\n\u001b[1;32m 974\u001b[0m \u001b[39m# This aliases json.JSONDecodeError and simplejson.JSONDecodeError\u001b[39;00m\n", + "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/__init__.py:346\u001b[0m, in \u001b[0;36mloads\u001b[0;34m(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)\u001b[0m\n\u001b[1;32m 343\u001b[0m \u001b[39mif\u001b[39;00m (\u001b[39mcls\u001b[39m \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m object_hook \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m\n\u001b[1;32m 344\u001b[0m parse_int \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m parse_float \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m\n\u001b[1;32m 345\u001b[0m parse_constant \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m object_pairs_hook \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m \u001b[39mnot\u001b[39;00m kw):\n\u001b[0;32m--> 346\u001b[0m \u001b[39mreturn\u001b[39;00m _default_decoder\u001b[39m.\u001b[39;49mdecode(s)\n\u001b[1;32m 347\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mcls\u001b[39m \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n", + "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/decoder.py:337\u001b[0m, in \u001b[0;36mJSONDecoder.decode\u001b[0;34m(self, s, _w)\u001b[0m\n\u001b[1;32m 333\u001b[0m \u001b[39m\u001b[39m\u001b[39m\"\"\"Return the Python representation of ``s`` (a ``str`` instance\u001b[39;00m\n\u001b[1;32m 334\u001b[0m \u001b[39mcontaining a JSON document).\u001b[39;00m\n\u001b[1;32m 335\u001b[0m \n\u001b[1;32m 336\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m--> 337\u001b[0m obj, end \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mraw_decode(s, idx\u001b[39m=\u001b[39;49m_w(s, \u001b[39m0\u001b[39;49m)\u001b[39m.\u001b[39;49mend())\n\u001b[1;32m 338\u001b[0m end \u001b[39m=\u001b[39m _w(s, end)\u001b[39m.\u001b[39mend()\n", + "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/decoder.py:355\u001b[0m, in \u001b[0;36mJSONDecoder.raw_decode\u001b[0;34m(self, s, idx)\u001b[0m\n\u001b[1;32m 354\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mStopIteration\u001b[39;00m \u001b[39mas\u001b[39;00m err:\n\u001b[0;32m--> 355\u001b[0m \u001b[39mraise\u001b[39;00m JSONDecodeError(\u001b[39m\"\u001b[39m\u001b[39mExpecting value\u001b[39m\u001b[39m\"\u001b[39m, s, err\u001b[39m.\u001b[39mvalue) \u001b[39mfrom\u001b[39;00m \u001b[39mNone\u001b[39;00m\n\u001b[1;32m 356\u001b[0m \u001b[39mreturn\u001b[39;00m obj, end\n", + "\u001b[0;31mJSONDecodeError\u001b[0m: Expecting value: line 1 column 1 (char 0)", + "\nDuring handling of the above exception, another exception occurred:\n", + "\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/get_india_data.ipynb Cell 9\u001b[0m line \u001b[0;36m3\n\u001b[1;32m 1\u001b[0m r\u001b[39m.\u001b[39mstatus_code\n\u001b[1;32m 2\u001b[0m r\u001b[39m.\u001b[39mtext\n\u001b[0;32m----> 3\u001b[0m r\u001b[39m.\u001b[39;49mjson()\n", + "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/site-packages/requests/models.py:975\u001b[0m, in \u001b[0;36mResponse.json\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 971\u001b[0m \u001b[39mreturn\u001b[39;00m complexjson\u001b[39m.\u001b[39mloads(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39mtext, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n\u001b[1;32m 972\u001b[0m \u001b[39mexcept\u001b[39;00m JSONDecodeError \u001b[39mas\u001b[39;00m e:\n\u001b[1;32m 973\u001b[0m \u001b[39m# Catch JSON-related errors and raise as requests.JSONDecodeError\u001b[39;00m\n\u001b[1;32m 974\u001b[0m \u001b[39m# This aliases json.JSONDecodeError and simplejson.JSONDecodeError\u001b[39;00m\n\u001b[0;32m--> 975\u001b[0m \u001b[39mraise\u001b[39;00m RequestsJSONDecodeError(e\u001b[39m.\u001b[39mmsg, e\u001b[39m.\u001b[39mdoc, e\u001b[39m.\u001b[39mpos)\n", + "\u001b[0;31mJSONDecodeError\u001b[0m: Expecting value: line 1 column 1 (char 0)" + ] + } + ], + "source": [ + "r.status_code\n", + "r.text\n", + "r.json()\n", + "\n" + ] } ], "metadata": { + "kernelspec": { + "display_name": "pvoutput-venv", + "language": "python", + "name": "python3" + }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.12" } }, "nbformat": 4, From 84773df6090c3879c91be841c271eb921fc363b1 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Wed, 25 Oct 2023 14:37:43 +0200 Subject: [PATCH 03/13] india notebook pulling data --- examples/get_india_data.ipynb | 118 ++++++++++++++++++---------------- pvoutput/pvoutput.py | 15 +++-- 2 files changed, 71 insertions(+), 62 deletions(-) diff --git a/examples/get_india_data.ipynb b/examples/get_india_data.ipynb index 5ed2d9e..5945b42 100644 --- a/examples/get_india_data.ipynb +++ b/examples/get_india_data.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -30,7 +30,7 @@ "\n", "sys.path.append(\"..\")\n", "from pvoutput.grid_search import GridSearch\n", - "from pvoutput import PVOutput" + "from pvoutput.pvoutput import PVOutput" ] }, { @@ -44,25 +44,15 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "api_key = \"3f784ff6cfa27c44436f88da0c429b410687ad14\"\n", "system_id = \"68732\"\n", "date = \"20230801\"\n", - "site_id = \"\"\n", - "data_service_url = \"https://pvoutput.org/data/r2/getsystemstatus.jsp\"\n", - "# pv = PVOutput(api_key, system_id, data_service_url=data_service_url)" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [], - "source": [ - "CACHE_DIR = \"/tmp\"" + "data_service_url = \"https://pvoutput.org\"\n", + "pv = PVOutput(api_key=api_key, system_id=system_id, data_service_url=data_service_url)\n" ] }, { @@ -76,59 +66,77 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 184, "metadata": {}, - "outputs": [ - { - "ename": "SyntaxError", - "evalue": "invalid syntax (2245105558.py, line 3)", - "output_type": "error", - "traceback": [ - "\u001b[0;36m Cell \u001b[0;32mIn[38], line 3\u001b[0;36m\u001b[0m\n\u001b[0;31m curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n" - ] - } - ], + "outputs": [], "source": [ - "# Get the data from PVOutput\n", - "# sites = [85738, 56151, 87410, 78186, 100451, 90559, 60294]\n", - "request = curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\n", - "dfs = []\n", - "url = \"https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410\"\n", - "headers = {api_key, system_id}\n", - "r = requests.get(url, headers=headers)\n" + "CACHE_DIR = \"/tmp\"" ] }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 10, "metadata": {}, "outputs": [ { - "ename": "JSONDecodeError", - "evalue": "Expecting value: line 1 column 1 (char 0)", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)", - "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/site-packages/requests/models.py:971\u001b[0m, in \u001b[0;36mResponse.json\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 970\u001b[0m \u001b[39mtry\u001b[39;00m:\n\u001b[0;32m--> 971\u001b[0m \u001b[39mreturn\u001b[39;00m complexjson\u001b[39m.\u001b[39;49mloads(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mtext, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n\u001b[1;32m 972\u001b[0m \u001b[39mexcept\u001b[39;00m JSONDecodeError \u001b[39mas\u001b[39;00m e:\n\u001b[1;32m 973\u001b[0m \u001b[39m# Catch JSON-related errors and raise as requests.JSONDecodeError\u001b[39;00m\n\u001b[1;32m 974\u001b[0m \u001b[39m# This aliases json.JSONDecodeError and simplejson.JSONDecodeError\u001b[39;00m\n", - "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/__init__.py:346\u001b[0m, in \u001b[0;36mloads\u001b[0;34m(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)\u001b[0m\n\u001b[1;32m 343\u001b[0m \u001b[39mif\u001b[39;00m (\u001b[39mcls\u001b[39m \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m object_hook \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m\n\u001b[1;32m 344\u001b[0m parse_int \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m parse_float \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m\n\u001b[1;32m 345\u001b[0m parse_constant \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m object_pairs_hook \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m \u001b[39mnot\u001b[39;00m kw):\n\u001b[0;32m--> 346\u001b[0m \u001b[39mreturn\u001b[39;00m _default_decoder\u001b[39m.\u001b[39;49mdecode(s)\n\u001b[1;32m 347\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mcls\u001b[39m \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n", - "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/decoder.py:337\u001b[0m, in \u001b[0;36mJSONDecoder.decode\u001b[0;34m(self, s, _w)\u001b[0m\n\u001b[1;32m 333\u001b[0m \u001b[39m\u001b[39m\u001b[39m\"\"\"Return the Python representation of ``s`` (a ``str`` instance\u001b[39;00m\n\u001b[1;32m 334\u001b[0m \u001b[39mcontaining a JSON document).\u001b[39;00m\n\u001b[1;32m 335\u001b[0m \n\u001b[1;32m 336\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[0;32m--> 337\u001b[0m obj, end \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mraw_decode(s, idx\u001b[39m=\u001b[39;49m_w(s, \u001b[39m0\u001b[39;49m)\u001b[39m.\u001b[39;49mend())\n\u001b[1;32m 338\u001b[0m end \u001b[39m=\u001b[39m _w(s, end)\u001b[39m.\u001b[39mend()\n", - "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/json/decoder.py:355\u001b[0m, in \u001b[0;36mJSONDecoder.raw_decode\u001b[0;34m(self, s, idx)\u001b[0m\n\u001b[1;32m 354\u001b[0m \u001b[39mexcept\u001b[39;00m \u001b[39mStopIteration\u001b[39;00m \u001b[39mas\u001b[39;00m err:\n\u001b[0;32m--> 355\u001b[0m \u001b[39mraise\u001b[39;00m JSONDecodeError(\u001b[39m\"\u001b[39m\u001b[39mExpecting value\u001b[39m\u001b[39m\"\u001b[39m, s, err\u001b[39m.\u001b[39mvalue) \u001b[39mfrom\u001b[39;00m \u001b[39mNone\u001b[39;00m\n\u001b[1;32m 356\u001b[0m \u001b[39mreturn\u001b[39;00m obj, end\n", - "\u001b[0;31mJSONDecodeError\u001b[0m: Expecting value: line 1 column 1 (char 0)", - "\nDuring handling of the above exception, another exception occurred:\n", - "\u001b[0;31mJSONDecodeError\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/get_india_data.ipynb Cell 9\u001b[0m line \u001b[0;36m3\n\u001b[1;32m 1\u001b[0m r\u001b[39m.\u001b[39mstatus_code\n\u001b[1;32m 2\u001b[0m r\u001b[39m.\u001b[39mtext\n\u001b[0;32m----> 3\u001b[0m r\u001b[39m.\u001b[39;49mjson()\n", - "File \u001b[0;32m~/anaconda3/envs/pvoutput-venv/lib/python3.10/site-packages/requests/models.py:975\u001b[0m, in \u001b[0;36mResponse.json\u001b[0;34m(self, **kwargs)\u001b[0m\n\u001b[1;32m 971\u001b[0m \u001b[39mreturn\u001b[39;00m complexjson\u001b[39m.\u001b[39mloads(\u001b[39mself\u001b[39m\u001b[39m.\u001b[39mtext, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs)\n\u001b[1;32m 972\u001b[0m \u001b[39mexcept\u001b[39;00m JSONDecodeError \u001b[39mas\u001b[39;00m e:\n\u001b[1;32m 973\u001b[0m \u001b[39m# Catch JSON-related errors and raise as requests.JSONDecodeError\u001b[39;00m\n\u001b[1;32m 974\u001b[0m \u001b[39m# This aliases json.JSONDecodeError and simplejson.JSONDecodeError\u001b[39;00m\n\u001b[0;32m--> 975\u001b[0m \u001b[39mraise\u001b[39;00m RequestsJSONDecodeError(e\u001b[39m.\u001b[39mmsg, e\u001b[39m.\u001b[39mdoc, e\u001b[39m.\u001b[39mpos)\n", - "\u001b[0;31mJSONDecodeError\u001b[0m: Expecting value: line 1 column 1 (char 0)" + "name": "stdout", + "output_type": "stream", + "text": [ + "change is happening\n", + " datetime cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2023-08-01 05:55:00 4.0 51.0 \n", + "1 2023-08-01 06:00:00 30.0 315.0 \n", + "2 2023-08-01 06:05:00 81.0 613.0 \n", + "3 2023-08-01 06:10:00 164.0 996.0 \n", + "4 2023-08-01 06:15:00 273.0 1303.0 \n", + ".. ... ... ... \n", + "334 2023-08-01 19:20:00 25960.0 0.0 \n", + "335 2023-08-01 19:25:00 25960.0 0.0 \n", + "336 2023-08-01 19:30:00 25960.0 0.0 \n", + "337 2023-08-01 19:35:00 25960.0 0.0 \n", + "338 2023-08-01 19:40:00 25960.0 0.0 \n", + "\n", + " temperature_C voltage system_id \n", + "0 NaN NaN 85738 \n", + "1 NaN NaN 85738 \n", + "2 NaN NaN 85738 \n", + "3 NaN NaN 85738 \n", + "4 NaN NaN 85738 \n", + ".. ... ... ... \n", + "334 26.0 NaN 87410 \n", + "335 26.0 NaN 87410 \n", + "336 26.0 NaN 87410 \n", + "337 26.0 NaN 87410 \n", + "338 25.0 NaN 87410 \n", + "\n", + "[339 rows x 6 columns]\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/pvoutput/prcoess.py:93: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n", + " one_pv_system_status[\"time\"] = pd.to_datetime(one_pv_system_status[\"time\"]).dt.strftime(\n", + "/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/pvoutput/prcoess.py:93: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n", + " one_pv_system_status[\"time\"] = pd.to_datetime(one_pv_system_status[\"time\"]).dt.strftime(\n" ] } ], "source": [ - "r.status_code\n", - "r.text\n", - "r.json()\n", - "\n" + "# Get output for list of sites\n", + "sites = [\"87410\", \"85738\"]\n", + "df = pv.get_system_status(pv_system_ids=sites, date=date, use_data_service=True)\n", + "df.to_csv(f\"/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/pv_data/pv_data.csv\", index=False)\n", + "print(df)\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -147,7 +155,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.6" } }, "nbformat": 4, diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 0e4ea35..f4b1701 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -70,9 +70,9 @@ def __init__( """ self.api_key = api_key self.system_id = system_id - self.rate_limit_remaining = None - self.rate_limit_total = None - self.rate_limit_reset_time = None + self.rate_limit_remaining = 600 + self.rate_limit_total = 600 + self.rate_limit_reset_time = 600 self.data_service_url = data_service_url # Set from config file if None @@ -1007,12 +1007,12 @@ def _get_api_response(self, service: str, api_params: Dict) -> requests.Response self._check_api_params() # Create request headers headers = { - "X-Rate-Limit": "1", + "X-Rate-Limit": "5", "X-Pvoutput-Apikey": self.api_key, "X-Pvoutput-SystemId": self.system_id, } - api_url = urljoin(BASE_URL, "service/r2/{}.jsp".format(service)) + api_url = urljoin(BASE_URL, "/data/r2/{}.jsp".format(service)) return _get_response(api_url, api_params, headers) @@ -1033,7 +1033,7 @@ def _get_data_service_response(self, service: str, api_params: Dict) -> requests api_params["key"] = self.api_key api_params["sid"] = self.system_id - api_url = urljoin(self.data_service_url, "data/r2/{}.jsp".format(service)) + api_url = urljoin(self.data_service_url, "/data/r2/{}.jsp".format(service)) return _get_response(api_url, api_params, headers) @@ -1049,7 +1049,8 @@ def _set_rate_limit_params(self, headers): setattr(self, param_name, header_value) self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp(self.rate_limit_reset_time) - self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc") + print("change is happening") + self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc") _LOG.debug("%s", self.rate_limit_info()) From 295d78f92eb64d37ce3dedad37edb6366b965536 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 30 Oct 2023 19:23:30 +0100 Subject: [PATCH 04/13] get system_ids for india --- examples/get_india_data.ipynb | 538 +++++++++++++++++++++++++++++++--- pvoutput/pvoutput.py | 228 +++++++++++--- 2 files changed, 676 insertions(+), 90 deletions(-) diff --git a/examples/get_india_data.ipynb b/examples/get_india_data.ipynb index 5945b42..70a5472 100644 --- a/examples/get_india_data.ipynb +++ b/examples/get_india_data.ipynb @@ -18,7 +18,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -29,7 +29,7 @@ "from matplotlib import pyplot as plt\n", "\n", "sys.path.append(\"..\")\n", - "from pvoutput.grid_search import GridSearch\n", + "# from pvoutput.grid_search import GridSearch\n", "from pvoutput.pvoutput import PVOutput" ] }, @@ -44,12 +44,12 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ - "api_key = \"3f784ff6cfa27c44436f88da0c429b410687ad14\"\n", - "system_id = \"68732\"\n", + "api_key = \"c5c7c5c232f68e2f6223bd45f536b17555ad04ba\"\n", + "system_id = \"93186\"\n", "date = \"20230801\"\n", "data_service_url = \"https://pvoutput.org\"\n", "pv = PVOutput(api_key=api_key, system_id=system_id, data_service_url=data_service_url)\n" @@ -66,7 +66,7 @@ }, { "cell_type": "code", - "execution_count": 184, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -75,60 +75,502 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 33, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "change is happening\n", - " datetime cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", - "0 2023-08-01 05:55:00 4.0 51.0 \n", - "1 2023-08-01 06:00:00 30.0 315.0 \n", - "2 2023-08-01 06:05:00 81.0 613.0 \n", - "3 2023-08-01 06:10:00 164.0 996.0 \n", - "4 2023-08-01 06:15:00 273.0 1303.0 \n", - ".. ... ... ... \n", - "334 2023-08-01 19:20:00 25960.0 0.0 \n", - "335 2023-08-01 19:25:00 25960.0 0.0 \n", - "336 2023-08-01 19:30:00 25960.0 0.0 \n", - "337 2023-08-01 19:35:00 25960.0 0.0 \n", - "338 2023-08-01 19:40:00 25960.0 0.0 \n", - "\n", - " temperature_C voltage system_id \n", - "0 NaN NaN 85738 \n", - "1 NaN NaN 85738 \n", - "2 NaN NaN 85738 \n", - "3 NaN NaN 85738 \n", - "4 NaN NaN 85738 \n", - ".. ... ... ... \n", - "334 26.0 NaN 87410 \n", - "335 26.0 NaN 87410 \n", - "336 26.0 NaN 87410 \n", - "337 26.0 NaN 87410 \n", - "338 25.0 NaN 87410 \n", - "\n", - "[339 rows x 6 columns]\n" + "getting metadata for in for 20000 to 40000\n", + "getting metadata for in for 40000 to 60000\n", + "getting metadata for in for 60000 to 80000\n", + "getting metadata for in for 80000 to 100000\n", + " system_id \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 No \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 Low \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", + "\n", + " system_DC_capacity_W \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150120.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20180505.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230105.0 \n", + "\n", + " postcode \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 18.498465 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 22.554795 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 18.496093 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 16.474609 \n", + "\n", + " num_panels \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 73.802870 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 72.963779 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 73.820738 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 80.701103 \n", + "\n", + " panel_capacity_W_each \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5\\n35987 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5\\n59838 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5\\n79612 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 15\\n99833 \n", + "\n", + " num_inverters \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 4200 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 100000 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3090 \n", + "\n", + " inverter_capacity_W \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 NaN \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 NaN \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 NaN \n", + "\n", + " orientation \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 8 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 14 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 400 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 6 \n", + "\n", + " array_tilt_degrees \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 250 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 300 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 250 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 515 \n", + "\n", + " shade \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 1 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 1 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 1 \n", + "\n", + " install_date \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000-01-01 00:00:00 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5000 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 20000 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3000 \n", + "\n", + " latitude \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 S \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 S \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 N \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 N \n", + "\n", + " longitude \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 28.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 0.0 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 0.0 \n", + "\n", + " status_interval_minutes \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 Low \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 No \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", + "\n", + " secondary_num_panels \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150323.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20170101.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230613.0 \n", + "\n", + " secondary_panel_capacity_W_each \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 12.970980 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 18.547855 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 8.462700 \n", + "\n", + " secondary_orientation \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 80.119504 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 73.788976 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 76.930325 \n", + "\n", + " secondary_array_tilt_degrees \n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 5 \n" ] }, { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/pvoutput/prcoess.py:93: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n", - " one_pv_system_status[\"time\"] = pd.to_datetime(one_pv_system_status[\"time\"]).dt.strftime(\n", - "/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/pvoutput/prcoess.py:93: UserWarning: Could not infer format, so each element will be parsed individually, falling back to `dateutil`. To ensure parsing is consistent and as-expected, please specify a format.\n", - " one_pv_system_status[\"time\"] = pd.to_datetime(one_pv_system_status[\"time\"]).dt.strftime(\n" - ] + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
system_idsystem_DC_capacity_Wpostcodenum_panelspanel_capacity_W_eachnum_invertersinverter_capacity_Worientationarray_tilt_degreesshadeinstall_datelatitudelongitudestatus_interval_minutessecondary_num_panelssecondary_panel_capacity_W_eachsecondary_orientationsecondary_array_tilt_degrees
3043221600NaN7230064000S1.0NoNaNNaNNaN5\\n35948400NaN22001600S15.5No20150120.018.49846573.8028705\\n359872000NaN825012000-01-01 00:00:00S1.0No20150323.012.97098080.1195045
4562850NaN150150NNaNNoNaNNaNNaN5\\n467325300NaN2026516000S15.0No20180505.022.55479572.9637795\\n598384200NaN1430015000S28.0Low20170101.018.54785573.7889765
602945120NaN1632015120S1.0LowNaN12.98048377.6907435\\n606021950NaN632515000S20.0LowNaN18.49609373.8207385\\n79612100000NaN400250120000N0.0NoNaNNaNNaN5
814082370NaN639513000SE5.0Medium202101019.71413376.3230515\\n820263080NaN838513000S0.0No20230105.016.47460980.70110315\\n998333090NaN651513000N0.0No20230613.08.46270076.9303255
\n", + "
" + ], + "text/plain": [ + " system_id \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 No \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 Low \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", + "\n", + " system_DC_capacity_W \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150120.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20180505.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230105.0 \n", + "\n", + " postcode \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 18.498465 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 22.554795 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 18.496093 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 16.474609 \n", + "\n", + " num_panels \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 73.802870 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 72.963779 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 73.820738 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 80.701103 \n", + "\n", + " panel_capacity_W_each \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5\\n35987 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5\\n59838 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5\\n79612 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 15\\n99833 \n", + "\n", + " num_inverters \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 4200 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 100000 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3090 \n", + "\n", + " inverter_capacity_W \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 NaN \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 NaN \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 NaN \n", + "\n", + " orientation \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 8 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 14 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 400 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 6 \n", + "\n", + " array_tilt_degrees \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 250 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 300 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 250 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 515 \n", + "\n", + " shade \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 1 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 1 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 1 \n", + "\n", + " install_date \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000-01-01 00:00:00 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5000 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 20000 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3000 \n", + "\n", + " latitude \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 S \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 S \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 N \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 N \n", + "\n", + " longitude \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 28.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 0.0 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 0.0 \n", + "\n", + " status_interval_minutes \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 Low \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 No \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", + "\n", + " secondary_num_panels \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150323.0 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20170101.0 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230613.0 \n", + "\n", + " secondary_panel_capacity_W_each \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 12.970980 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 18.547855 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 8.462700 \n", + "\n", + " secondary_orientation \\\n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 80.119504 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 73.788976 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 76.930325 \n", + "\n", + " secondary_array_tilt_degrees \n", + "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5 \n", + "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5 \n", + "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5 \n", + "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 5 " + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "# Get output for list of sites\n", - "sites = [\"87410\", \"85738\"]\n", - "df = pv.get_system_status(pv_system_ids=sites, date=date, use_data_service=True)\n", - "df.to_csv(f\"/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/pv_data/pv_data.csv\", index=False)\n", - "print(df)\n" + "\n", + "# pvoutput.org has a limit of a maximum of 20000 range for system ids\n", + "# here we create a range of possible system ids to query or a range in which system ids might exist\n", + "def create_list_start(r1, r2, r3):\n", + " return [number for number in range(r1, r2, r3)]\n", + "def create_list_end(r1, r2, r3):\n", + " return [number for number in range(r1, r2, r3)]\n", + "start_id_range = create_list_start(0, 100000, 20000)\n", + "end_id_range = create_list_end(20000, 120000, 20000)\n", + "\n", + "def create_df(start_id_range=start_id_range, end_id_range=end_id_range):\n", + " frames = []\n", + " i = 0\n", + " while i < len(start_id_range)-1 and i < len(end_id_range)-1:\n", + " i += 1\n", + " df = pv.get_metadata_for_country(country_code=\"in\", start_id_range=start_id_range[i], end_id_range=end_id_range[i], use_data_service=True)\n", + " frames.append(df)\n", + " df= pd.concat(frames)\n", + " print(df)\n", + " df.to_csv(f\"/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/pv_data/pv_data_india.csv\", index=False)\n", + " return df\n", + "\n", + "create_df(start_id_range=start_id_range, end_id_range=end_id_range)\n", + "\n", + "\n" ] }, { diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index f4b1701..0d3c2fd 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -70,9 +70,9 @@ def __init__( """ self.api_key = api_key self.system_id = system_id - self.rate_limit_remaining = 600 - self.rate_limit_total = 600 - self.rate_limit_reset_time = 600 + self.rate_limit_remaining = None + self.rate_limit_total = None + self.rate_limit_reset_time = None self.data_service_url = data_service_url # Set from config file if None @@ -161,7 +161,9 @@ def search( if lat is not None and lon is not None: api_params["ll"] = "{:f},{:f}".format(lat, lon) - pv_systems_text = self._api_query(service="search", api_params=api_params, **kwargs) + pv_systems_text = self._api_query( + service="search", api_params=api_params, **kwargs + ) pv_systems = pd.read_csv( StringIO(pv_systems_text), @@ -277,7 +279,7 @@ def get_status( # add timezone if timezone is not None: - pv_system_status = pv_system_status.tz_localize(timezone).tz_convert("UTC") + pv_system_status = pv_system_status.tz_convert(timezone).tz_convert("UTC") return pv_system_status @@ -314,7 +316,9 @@ def get_system_status( temperature_C, voltage, """ - _LOG.info(f"system_ids {pv_system_ids}: Requesting batch system status for %s", date) + _LOG.info( + f"system_ids {pv_system_ids}: Requesting batch system status for %s", date + ) date = date_to_pvoutput_str(date) _check_date(date) @@ -332,7 +336,9 @@ def get_system_status( ) except NoStatusFound: - _LOG.info(f"system_id {all_pv_system_id}: No status found for date %s", date) + _LOG.info( + f"system_id {all_pv_system_id}: No status found for date %s", date + ) pv_system_status_text = "no status found" # each pv system is on a new line @@ -340,7 +346,6 @@ def get_system_status( pv_system_status = [] for pv_system_status_text in pv_systems_status_text: - try: one_pv_system_status = process_system_status( pv_system_status_text=pv_system_status_text, date=date @@ -360,7 +365,7 @@ def get_system_status( if timezone is not None: pv_system_status["datetime"] = ( pd.DatetimeIndex(pv_system_status["datetime"]) - .tz_localize(timezone) + .tz_convert(timezone) .tz_convert("UTC") ) @@ -416,10 +421,17 @@ def get_batch_status( for retry in range(max_retries): try: pv_system_status_text = self._api_query( - service="getbatchstatus", api_params=api_params, use_data_service=True, **kwargs + service="getbatchstatus", + api_params=api_params, + use_data_service=True, + **kwargs, ) except NoStatusFound: - _LOG.info("system_id %d: No status found for date_to %s", pv_system_id, date_to) + _LOG.info( + "system_id %d: No status found for date_to %s", + pv_system_id, + date_to, + ) pv_system_status_text = "" break @@ -431,7 +443,8 @@ def get_batch_status( time.sleep(1) else: _print_and_log( - "Call get_batch_status again in a minute to see if" " results are ready." + "Call get_batch_status again in a minute to see if" + " results are ready." ) else: break @@ -517,6 +530,85 @@ def get_metadata(self, pv_system_id: int, **kwargs) -> pd.Series: pv_metadata.name = pv_system_id return pv_metadata + def get_metadata_for_country( + self, country_code: str, start_id_range: int, end_id_range: int, **kwargs + ) -> pd.DataFrame: + """Get metadata for a single PV system. + + Args: + country_code: str, + start_id_range: int, + end_id_range: int, + + Returns: + pd.Dataframe. Index is: + system_id, + system_DC_capacity_W, + postcode, + num_panels, + panel_capacity_W_each, + num_inverters, + inverter_capacity_W, + orientation, + array_tilt_degrees, + shade, + install_date, + latitude, + longitude, + status_interval_minutes, + secondary_num_panels, + secondary_panel_capacity_W_each, + secondary_orientation, + secondary_array_tilt_degrees + """ + pv_metadata_text = self._api_query( + service="getcountrysystem", + api_params={ + "c": country_code, # Provide data about secondary array, if present. + "from": start_id_range, + "to": end_id_range, + }, + **kwargs, + ) + + _LOG.debug( + f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" + ) + print( + f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" + ) + + pv_metadata_for_country = pd.read_csv( + StringIO(pv_metadata_text), + lineterminator=";", + names=[ + "system_id", + "system_DC_capacity_W", + "postcode", + "num_panels", + "panel_capacity_W_each", + "num_inverters", + "inverter_capacity_W", + "orientation", + "array_tilt_degrees", + "shade", + "install_date", + "latitude", + "longitude", + "status_interval_minutes", + "secondary_num_panels", + "secondary_panel_capacity_W_each", + "secondary_orientation", + "secondary_array_tilt_degrees", + ], + parse_dates=["install_date"], + nrows=1, + ) + pv_metadata_for_country["system_id"] = pv_metadata_for_country["system_id"] + # pv_metadata_for_country["system_id"] = [start_id_range, end_id_range] + # pv_metadata_for_country.name = [start_id_range, end_id_range] + return pv_metadata_for_country + def get_statistic( self, pv_system_id: int, @@ -596,8 +688,12 @@ def get_statistic( else: pv_metadata.index = [pv_system_id] - pv_metadata["query_date_from"] = pd.Timestamp(date_from) if date_from else pd.NaT - pv_metadata["query_date_to"] = pd.Timestamp(date_to) if date_to else pd.Timestamp.now() + pv_metadata["query_date_from"] = ( + pd.Timestamp(date_from) if date_from else pd.NaT + ) + pv_metadata["query_date_to"] = ( + pd.Timestamp(date_to) if date_to else pd.Timestamp.now() + ) return pv_metadata def _get_statistic_with_cache( @@ -644,7 +740,9 @@ def _get_fresh_statistic(): return stats try: - stats = pd.read_hdf(store_filename, key="statistics", where="index=pv_system_id") + stats = pd.read_hdf( + store_filename, key="statistics", where="index=pv_system_id" + ) except (FileNotFoundError, KeyError): return _get_fresh_statistic() @@ -710,7 +808,9 @@ def download_multiple_systems_to_disk( n = len(system_ids) for i, pv_system_id in enumerate(system_ids): _LOG.info("**********************") - msg = "system_id {:d}: {:d} of {:d} ({:%})".format(pv_system_id, i + 1, n, (i + 1) / n) + msg = "system_id {:d}: {:d} of {:d} ({:%})".format( + pv_system_id, i + 1, n, (i + 1) / n + ) _LOG.info(msg) print("\r", msg, end="", flush=True) @@ -722,7 +822,10 @@ def download_multiple_systems_to_disk( # How much data is actually available? date_ranges_to_download = self._filter_date_range( - output_filename, pv_system_id, date_ranges_to_download, min_data_availability + output_filename, + pv_system_id, + date_ranges_to_download, + min_data_availability, ) if not date_ranges_to_download: @@ -841,9 +944,13 @@ def _filter_date_range( _LOG.info("system_id %d: Stats say there is no data!", system_id) return [] - timeseries_date_range = DateRange(stats["actual_date_from"], stats["actual_date_to"]) + timeseries_date_range = DateRange( + stats["actual_date_from"], stats["actual_date_to"] + ) - data_availability = stats["num_outputs"] / (timeseries_date_range.total_days() + 1) + data_availability = stats["num_outputs"] / ( + timeseries_date_range.total_days() + 1 + ) if data_availability < min_data_availability: _LOG.info( @@ -861,7 +968,11 @@ def _filter_date_range( return new_date_ranges def _download_multiple_using_get_batch_status( - self, output_filename, pv_system_id, date_ranges_to_download, timezone: Optional[str] = None + self, + output_filename, + pv_system_id, + date_ranges_to_download, + timezone: Optional[str] = None, ): years = merge_date_ranges_to_years(date_ranges_to_download) dates_to = [year.end_date for year in years] @@ -875,7 +986,11 @@ def _download_multiple_using_get_batch_status( sort_and_de_dupe_pv_system(store, pv_system_id) def _download_multiple_using_get_status( - self, output_filename, pv_system_id, date_ranges_to_download, timezone: Optional[str] = None + self, + output_filename, + pv_system_id, + date_ranges_to_download, + timezone: Optional[str] = None, ): for date_range in date_ranges_to_download: dates = date_range.date_range() @@ -904,7 +1019,9 @@ def _download_multiple_worker( timeseries = self.get_batch_status(pv_system_id, date_to=date_to_load) if timeseries.empty: _LOG.info( - "system_id %d: Got empty timeseries back for %s", pv_system_id, date_to_load + "system_id %d: Got empty timeseries back for %s", + pv_system_id, + date_to_load, ) if use_get_status: _append_missing_date_range( @@ -924,8 +1041,8 @@ def _download_multiple_worker( ) else: total_rows += len(timeseries) - _LOG.info(f'Adding timezone {timezone} to {total_rows} rows') - timeseries = timeseries.tz_localize(timezone) + _LOG.info(f"Adding timezone {timezone} to {total_rows} rows") + timeseries = timeseries.tz_convert(timezone) _LOG.info( "system_id: %d: %d rows retrieved: %s to %s", pv_system_id, @@ -974,7 +1091,9 @@ def _api_query( RateLimitExceeded """ get_response_func = ( - self._get_data_service_response if use_data_service else self._get_api_response + self._get_data_service_response + if use_data_service + else self._get_api_response ) try: @@ -986,13 +1105,16 @@ def _api_query( try: return self._process_api_response(response) except RateLimitExceeded: - msg = "PVOutput.org API rate limit exceeded!" " Rate limit will be reset at {}".format( - self.rate_limit_reset_time + msg = ( + "PVOutput.org API rate limit exceeded!" + " Rate limit will be reset at {}".format(self.rate_limit_reset_time) ) _print_and_log(msg) if wait_if_rate_limit_exceeded: self.wait_for_rate_limit_reset() - return self._api_query(service, api_params, wait_if_rate_limit_exceeded=False) + return self._api_query( + service, api_params, wait_if_rate_limit_exceeded=False + ) raise RateLimitExceeded(response, msg) @@ -1007,16 +1129,18 @@ def _get_api_response(self, service: str, api_params: Dict) -> requests.Response self._check_api_params() # Create request headers headers = { - "X-Rate-Limit": "5", + "X-Rate-Limit": "1", "X-Pvoutput-Apikey": self.api_key, "X-Pvoutput-SystemId": self.system_id, } - api_url = urljoin(BASE_URL, "/data/r2/{}.jsp".format(service)) + api_url = urljoin(BASE_URL, "service/r2/{}.jsp".format(service)) return _get_response(api_url, api_params, headers) - def _get_data_service_response(self, service: str, api_params: Dict) -> requests.Response: + def _get_data_service_response( + self, service: str, api_params: Dict + ) -> requests.Response: """ Get the data service response from pvoutput.org @@ -1033,7 +1157,7 @@ def _get_data_service_response(self, service: str, api_params: Dict) -> requests api_params["key"] = self.api_key api_params["sid"] = self.system_id - api_url = urljoin(self.data_service_url, "/data/r2/{}.jsp".format(service)) + api_url = urljoin(self.data_service_url, "data/r2/{}.jsp".format(service)) return _get_response(api_url, api_params, headers) @@ -1048,8 +1172,9 @@ def _set_rate_limit_params(self, headers): header_value = int(headers[header_key]) setattr(self, param_name, header_value) - self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp(self.rate_limit_reset_time) - print("change is happening") + self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp( + self.rate_limit_reset_time + ) self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc") _LOG.debug("%s", self.rate_limit_info()) @@ -1123,7 +1248,9 @@ def wait_for_rate_limit_reset(self, do_sleeping: bool = True) -> int: # retry_time_local = retry_time_utc.tz_convert(tz=datetime.now(tzlocal()).tzname()) retry_time_local = retry_time_utc _print_and_log( - "Waiting {:.0f} seconds. Will retry at {} UTC".format(secs_to_wait, retry_time_local) + "Waiting {:.0f} seconds. Will retry at {} UTC".format( + secs_to_wait, retry_time_local + ) ) if do_sleeping: time.sleep(secs_to_wait) @@ -1192,9 +1319,12 @@ def check_pv_system_status(pv_system_status: pd.DataFrame, requested_date: date) def _append_missing_date_range( - output_filename, pv_system_id, missing_start_date, missing_end_date, datetime_of_api_request + output_filename, + pv_system_id, + missing_start_date, + missing_end_date, + datetime_of_api_request, ): - data = { "missing_start_date_PV_localtime": pd.Timestamp(missing_start_date), "missing_end_date_PV_localtime": pd.Timestamp(missing_end_date), @@ -1209,14 +1339,25 @@ def _append_missing_date_range( missing_end_date, ) with pd.HDFStore(output_filename, mode="a", complevel=9) as store: - store.append(key="missing_dates", value=new_missing_date_range, data_columns=True) + store.append( + key="missing_dates", value=new_missing_date_range, data_columns=True + ) -def _record_gaps(output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request): +def _record_gaps( + output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request +): dates_of_data = ( - timeseries["instantaneous_power_gen_W"].dropna().resample("D").mean().dropna().index.date + timeseries["instantaneous_power_gen_W"] + .dropna() + .resample("D") + .mean() + .dropna() + .index.date ) - dates_requested = pd.date_range(date_to - timedelta(days=365), date_to, freq="D").date + dates_requested = pd.date_range( + date_to - timedelta(days=365), date_to, freq="D" + ).date missing_dates = set(dates_requested) - set(dates_of_data) missing_date_ranges = _convert_consecutive_dates_to_date_ranges(list(missing_dates)) _LOG.info( @@ -1259,7 +1400,10 @@ def _convert_consecutive_dates_to_date_ranges(missing_dates): end_date = missing_dates[-1] new_missing.append( - {"missing_start_date_PV_localtime": start_date, "missing_end_date_PV_localtime": end_date} + { + "missing_start_date_PV_localtime": start_date, + "missing_end_date_PV_localtime": end_date, + } ) return pd.DataFrame(new_missing) From 60ad2ef3de9d00f4ebf1b4eaf9f2f5ffea5edc5f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:29:23 +0000 Subject: [PATCH 05/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvoutput/mapscraper.py | 1 + pvoutput/pvoutput.py | 91 +++++++++------------------------- scripts/fetch_pv_timeseries.py | 11 ++-- 3 files changed, 30 insertions(+), 73 deletions(-) diff --git a/pvoutput/mapscraper.py b/pvoutput/mapscraper.py index c64f1f1..9c0c8d1 100644 --- a/pvoutput/mapscraper.py +++ b/pvoutput/mapscraper.py @@ -350,6 +350,7 @@ def clean_soup(soup): """Function to clean scraped soup object. Note that the downloaded soup could change over time. + Args: soup: bs4.BeautifulSoup diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 0d3c2fd..8fdf49d 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -161,9 +161,7 @@ def search( if lat is not None and lon is not None: api_params["ll"] = "{:f},{:f}".format(lat, lon) - pv_systems_text = self._api_query( - service="search", api_params=api_params, **kwargs - ) + pv_systems_text = self._api_query(service="search", api_params=api_params, **kwargs) pv_systems = pd.read_csv( StringIO(pv_systems_text), @@ -316,9 +314,7 @@ def get_system_status( temperature_C, voltage, """ - _LOG.info( - f"system_ids {pv_system_ids}: Requesting batch system status for %s", date - ) + _LOG.info(f"system_ids {pv_system_ids}: Requesting batch system status for %s", date) date = date_to_pvoutput_str(date) _check_date(date) @@ -336,9 +332,7 @@ def get_system_status( ) except NoStatusFound: - _LOG.info( - f"system_id {all_pv_system_id}: No status found for date %s", date - ) + _LOG.info(f"system_id {all_pv_system_id}: No status found for date %s", date) pv_system_status_text = "no status found" # each pv system is on a new line @@ -443,8 +437,7 @@ def get_batch_status( time.sleep(1) else: _print_and_log( - "Call get_batch_status again in a minute to see if" - " results are ready." + "Call get_batch_status again in a minute to see if" " results are ready." ) else: break @@ -571,12 +564,8 @@ def get_metadata_for_country( **kwargs, ) - _LOG.debug( - f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" - ) - print( - f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" - ) + _LOG.debug(f"getting metadata for {country_code} for {start_id_range} to {end_id_range}") + print(f"getting metadata for {country_code} for {start_id_range} to {end_id_range}") pv_metadata_for_country = pd.read_csv( StringIO(pv_metadata_text), @@ -688,12 +677,8 @@ def get_statistic( else: pv_metadata.index = [pv_system_id] - pv_metadata["query_date_from"] = ( - pd.Timestamp(date_from) if date_from else pd.NaT - ) - pv_metadata["query_date_to"] = ( - pd.Timestamp(date_to) if date_to else pd.Timestamp.now() - ) + pv_metadata["query_date_from"] = pd.Timestamp(date_from) if date_from else pd.NaT + pv_metadata["query_date_to"] = pd.Timestamp(date_to) if date_to else pd.Timestamp.now() return pv_metadata def _get_statistic_with_cache( @@ -740,9 +725,7 @@ def _get_fresh_statistic(): return stats try: - stats = pd.read_hdf( - store_filename, key="statistics", where="index=pv_system_id" - ) + stats = pd.read_hdf(store_filename, key="statistics", where="index=pv_system_id") except (FileNotFoundError, KeyError): return _get_fresh_statistic() @@ -808,9 +791,7 @@ def download_multiple_systems_to_disk( n = len(system_ids) for i, pv_system_id in enumerate(system_ids): _LOG.info("**********************") - msg = "system_id {:d}: {:d} of {:d} ({:%})".format( - pv_system_id, i + 1, n, (i + 1) / n - ) + msg = "system_id {:d}: {:d} of {:d} ({:%})".format(pv_system_id, i + 1, n, (i + 1) / n) _LOG.info(msg) print("\r", msg, end="", flush=True) @@ -944,13 +925,9 @@ def _filter_date_range( _LOG.info("system_id %d: Stats say there is no data!", system_id) return [] - timeseries_date_range = DateRange( - stats["actual_date_from"], stats["actual_date_to"] - ) + timeseries_date_range = DateRange(stats["actual_date_from"], stats["actual_date_to"]) - data_availability = stats["num_outputs"] / ( - timeseries_date_range.total_days() + 1 - ) + data_availability = stats["num_outputs"] / (timeseries_date_range.total_days() + 1) if data_availability < min_data_availability: _LOG.info( @@ -1091,9 +1068,7 @@ def _api_query( RateLimitExceeded """ get_response_func = ( - self._get_data_service_response - if use_data_service - else self._get_api_response + self._get_data_service_response if use_data_service else self._get_api_response ) try: @@ -1105,16 +1080,13 @@ def _api_query( try: return self._process_api_response(response) except RateLimitExceeded: - msg = ( - "PVOutput.org API rate limit exceeded!" - " Rate limit will be reset at {}".format(self.rate_limit_reset_time) + msg = "PVOutput.org API rate limit exceeded!" " Rate limit will be reset at {}".format( + self.rate_limit_reset_time ) _print_and_log(msg) if wait_if_rate_limit_exceeded: self.wait_for_rate_limit_reset() - return self._api_query( - service, api_params, wait_if_rate_limit_exceeded=False - ) + return self._api_query(service, api_params, wait_if_rate_limit_exceeded=False) raise RateLimitExceeded(response, msg) @@ -1138,9 +1110,7 @@ def _get_api_response(self, service: str, api_params: Dict) -> requests.Response return _get_response(api_url, api_params, headers) - def _get_data_service_response( - self, service: str, api_params: Dict - ) -> requests.Response: + def _get_data_service_response(self, service: str, api_params: Dict) -> requests.Response: """ Get the data service response from pvoutput.org @@ -1172,9 +1142,7 @@ def _set_rate_limit_params(self, headers): header_value = int(headers[header_key]) setattr(self, param_name, header_value) - self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp( - self.rate_limit_reset_time - ) + self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp(self.rate_limit_reset_time) self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc") _LOG.debug("%s", self.rate_limit_info()) @@ -1248,9 +1216,7 @@ def wait_for_rate_limit_reset(self, do_sleeping: bool = True) -> int: # retry_time_local = retry_time_utc.tz_convert(tz=datetime.now(tzlocal()).tzname()) retry_time_local = retry_time_utc _print_and_log( - "Waiting {:.0f} seconds. Will retry at {} UTC".format( - secs_to_wait, retry_time_local - ) + "Waiting {:.0f} seconds. Will retry at {} UTC".format(secs_to_wait, retry_time_local) ) if do_sleeping: time.sleep(secs_to_wait) @@ -1339,25 +1305,14 @@ def _append_missing_date_range( missing_end_date, ) with pd.HDFStore(output_filename, mode="a", complevel=9) as store: - store.append( - key="missing_dates", value=new_missing_date_range, data_columns=True - ) + store.append(key="missing_dates", value=new_missing_date_range, data_columns=True) -def _record_gaps( - output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request -): +def _record_gaps(output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request): dates_of_data = ( - timeseries["instantaneous_power_gen_W"] - .dropna() - .resample("D") - .mean() - .dropna() - .index.date + timeseries["instantaneous_power_gen_W"].dropna().resample("D").mean().dropna().index.date ) - dates_requested = pd.date_range( - date_to - timedelta(days=365), date_to, freq="D" - ).date + dates_requested = pd.date_range(date_to - timedelta(days=365), date_to, freq="D").date missing_dates = set(dates_requested) - set(dates_of_data) missing_date_ranges = _convert_consecutive_dates_to_date_ranges(list(missing_dates)) _LOG.info( diff --git a/scripts/fetch_pv_timeseries.py b/scripts/fetch_pv_timeseries.py index ac7d4a6..39b6eda 100644 --- a/scripts/fetch_pv_timeseries.py +++ b/scripts/fetch_pv_timeseries.py @@ -21,14 +21,15 @@ or create and use a ~/.pvoutput.yml file as described in the PVOutput library documentation """ -from pvoutput import * - -import click as cl import datetime as dt +import logging +import pathlib import sys + +import click as cl import pandas as pd -import pathlib -import logging + +from pvoutput import * @cl.command() From d9d0ad15cdae0f598d1dd2cdc96e8c59117c4438 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 6 Nov 2023 13:20:27 +0100 Subject: [PATCH 06/13] add updated get_india_data --- examples/get_india_data.ipynb | 560 +++------------------------------- 1 file changed, 40 insertions(+), 520 deletions(-) diff --git a/examples/get_india_data.ipynb b/examples/get_india_data.ipynb index 70a5472..fb48d13 100644 --- a/examples/get_india_data.ipynb +++ b/examples/get_india_data.ipynb @@ -4,9 +4,18 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Use the PVOutput API library to retrieve metadata for all available systems in India\n", + "## Get metadata for all systems in a country \n", "\n", - "**2023-10-20**" + "#### (excluding AU, US, NL, UK and DE) \n", + "\n", + "- Makes a request to the Get Country System Service - World.\n", + "- For more information on this route, [see pvoutput.org API documentation](https://pvoutput.org/help/data_services.html#get-country-system-service). \n", + "\n", + "- The request being run by this notebook looks like this: ```https://pvoutput.org/data/r2/getcountrysystem.jsp?c={country_code}&from={start_id_range}&to={end_id_range}```, where ```country_code``` is the code for the country found in the docs and ```from``` and ```to``` are a range queried for system ids. \n", + "\n", + "- NB: The maximum range of the \"from\" and \"to\" parameters is 20000.\n", + "\n", + "**2023-11-06**" ] }, { @@ -18,567 +27,78 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import sys\n", - "import requests\n", "import pandas as pd\n", - "import geopandas as gpd\n", - "from matplotlib import pyplot as plt\n", "\n", "sys.path.append(\"..\")\n", - "# from pvoutput.grid_search import GridSearch\n", "from pvoutput.pvoutput import PVOutput" ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": 2, "metadata": {}, + "outputs": [], "source": [ - "### Sites to get data from:\n", - "\n", - "Jaycee: 85738; BMT: 56151; 25 FM Grid Tie: 87410; FlinEnergy Infini 5k: 78186; Ind Moz: 10045; Little Tree: 90559; Solar 183: 60294" + "# set up pvoutput environment variables \n", + "# API_KEY is the key provided via the pvoutput.org account used\n", + "# SYSTEM_ID is the system_id connected to your account on pvoutput.org\n", + "api_key = \"API_KEY\"\n", + "system_id = \"SYSTEM_ID\"\n", + "data_service_url = \"https://pvoutput.org\"\n", + "country_code=\"COUNTRY_CODE\" # get from pvoutput.org, e.g. \"in\" for India\n", + "pv = PVOutput(api_key=api_key, system_id=system_id, data_service_url=data_service_url)\n" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ - "api_key = \"c5c7c5c232f68e2f6223bd45f536b17555ad04ba\"\n", - "system_id = \"93186\"\n", - "date = \"20230801\"\n", - "data_service_url = \"https://pvoutput.org\"\n", - "pv = PVOutput(api_key=api_key, system_id=system_id, data_service_url=data_service_url)\n" + "# set up a directory locally to store data \n", + "CACHE_DIR = \"../examples/pv_data\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "#### Working curl request\n", + "#### Create csv file with metadata from country systems. \n", "\n", - "curl -H \"X-Pvoutput-Apikey: 3f784ff6cfa27c44436f88da0c429b410687ad14\" -H \"X-Pvoutput-SystemId: 68732\" https://pvoutput.org/data/r2/getsystemstatus.jsp\\?dt\\=20230801\\&sid1\\=87410" + "Could be useful to check the Get Country System Service [documentation](https://pvoutput.org/help/data_services.html#get-country-system-service) for data specifications." ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "CACHE_DIR = \"/tmp\"" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "getting metadata for in for 20000 to 40000\n", - "getting metadata for in for 40000 to 60000\n", - "getting metadata for in for 60000 to 80000\n", - "getting metadata for in for 80000 to 100000\n", - " system_id \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 No \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 Low \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", - "\n", - " system_DC_capacity_W \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150120.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20180505.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230105.0 \n", - "\n", - " postcode \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 18.498465 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 22.554795 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 18.496093 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 16.474609 \n", - "\n", - " num_panels \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 73.802870 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 72.963779 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 73.820738 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 80.701103 \n", - "\n", - " panel_capacity_W_each \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5\\n35987 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5\\n59838 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5\\n79612 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 15\\n99833 \n", - "\n", - " num_inverters \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 4200 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 100000 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3090 \n", - "\n", - " inverter_capacity_W \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 NaN \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 NaN \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 NaN \n", - "\n", - " orientation \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 8 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 14 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 400 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 6 \n", - "\n", - " array_tilt_degrees \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 250 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 300 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 250 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 515 \n", - "\n", - " shade \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 1 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 1 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 1 \n", - "\n", - " install_date \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000-01-01 00:00:00 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5000 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 20000 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3000 \n", - "\n", - " latitude \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 S \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 S \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 N \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 N \n", - "\n", - " longitude \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 28.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 0.0 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 0.0 \n", - "\n", - " status_interval_minutes \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 Low \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 No \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", - "\n", - " secondary_num_panels \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150323.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20170101.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230613.0 \n", - "\n", - " secondary_panel_capacity_W_each \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 12.970980 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 18.547855 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 8.462700 \n", - "\n", - " secondary_orientation \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 80.119504 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 73.788976 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 76.930325 \n", - "\n", - " secondary_array_tilt_degrees \n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 5 \n" - ] - }, - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
system_idsystem_DC_capacity_Wpostcodenum_panelspanel_capacity_W_eachnum_invertersinverter_capacity_Worientationarray_tilt_degreesshadeinstall_datelatitudelongitudestatus_interval_minutessecondary_num_panelssecondary_panel_capacity_W_eachsecondary_orientationsecondary_array_tilt_degrees
3043221600NaN7230064000S1.0NoNaNNaNNaN5\\n35948400NaN22001600S15.5No20150120.018.49846573.8028705\\n359872000NaN825012000-01-01 00:00:00S1.0No20150323.012.97098080.1195045
4562850NaN150150NNaNNoNaNNaNNaN5\\n467325300NaN2026516000S15.0No20180505.022.55479572.9637795\\n598384200NaN1430015000S28.0Low20170101.018.54785573.7889765
602945120NaN1632015120S1.0LowNaN12.98048377.6907435\\n606021950NaN632515000S20.0LowNaN18.49609373.8207385\\n79612100000NaN400250120000N0.0NoNaNNaNNaN5
814082370NaN639513000SE5.0Medium202101019.71413376.3230515\\n820263080NaN838513000S0.0No20230105.016.47460980.70110315\\n998333090NaN651513000N0.0No20230613.08.46270076.9303255
\n", - "
" - ], - "text/plain": [ - " system_id \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 No \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 Low \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", - "\n", - " system_DC_capacity_W \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150120.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20180505.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230105.0 \n", - "\n", - " postcode \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 18.498465 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 22.554795 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 18.496093 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 16.474609 \n", - "\n", - " num_panels \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 73.802870 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 72.963779 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 73.820738 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 80.701103 \n", - "\n", - " panel_capacity_W_each \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5\\n35987 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5\\n59838 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5\\n79612 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 15\\n99833 \n", - "\n", - " num_inverters \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 4200 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 100000 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3090 \n", - "\n", - " inverter_capacity_W \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 NaN \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 NaN \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 NaN \n", - "\n", - " orientation \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 8 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 14 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 400 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 6 \n", - "\n", - " array_tilt_degrees \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 250 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 300 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 250 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 515 \n", - "\n", - " shade \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 1 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 1 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 1 \n", - "\n", - " install_date \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 2000-01-01 00:00:00 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5000 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 20000 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 3000 \n", - "\n", - " latitude \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 S \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 S \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 N \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 N \n", - "\n", - " longitude \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 1.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 28.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 0.0 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 0.0 \n", - "\n", - " status_interval_minutes \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 No \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 Low \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 No \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 No \n", - "\n", - " secondary_num_panels \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 20150323.0 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 20170101.0 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 20230613.0 \n", - "\n", - " secondary_panel_capacity_W_each \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 12.970980 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 18.547855 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 8.462700 \n", - "\n", - " secondary_orientation \\\n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 80.119504 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 73.788976 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 NaN \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 76.930325 \n", - "\n", - " secondary_array_tilt_degrees \n", - "30432 21600 NaN 72 300 6 4000 S 1.0 No NaN NaN NaN 5\\n35948 400 NaN 2 200 1 600 S 15.5 5 \n", - "45628 50 NaN 1 50 1 50 N NaN No NaN NaN NaN 5\\n46732 5300 NaN 20 265 1 6000 S 15.0 5 \n", - "60294 5120 NaN 16 320 1 5120 S 1.0 Low NaN 12.980483 77.690743 5\\n60602 1950 NaN 6 325 1 5000 S 20.0 5 \n", - "81408 2370 NaN 6 395 1 3000 SE 5.0 Medium 20210101 9.714133 76.323051 5\\n82026 3080 NaN 8 385 1 3000 S 0.0 5 " - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "\n", - "# pvoutput.org has a limit of a maximum of 20000 range for system ids\n", - "# here we create a range of possible system ids to query or a range in which system ids might exist\n", - "def create_list_start(r1, r2, r3):\n", - " return [number for number in range(r1, r2, r3)]\n", - "def create_list_end(r1, r2, r3):\n", - " return [number for number in range(r1, r2, r3)]\n", - "start_id_range = create_list_start(0, 100000, 20000)\n", - "end_id_range = create_list_end(20000, 120000, 20000)\n", + "# set up a list of ranges to check for system ids and metadat\n", + "start_id_range = list(range(1, 120000, 20000))\n", + "end_id_range = list(range(20000, 140000, 20000))\n", "\n", - "def create_df(start_id_range=start_id_range, end_id_range=end_id_range):\n", + "# get system metadata for a country\n", + "def get_system_metadata_by_country(start_id_range=start_id_range, end_id_range=end_id_range):\n", " frames = []\n", - " i = 0\n", - " while i < len(start_id_range)-1 and i < len(end_id_range)-1:\n", - " i += 1\n", - " df = pv.get_metadata_for_country(country_code=\"in\", start_id_range=start_id_range[i], end_id_range=end_id_range[i], use_data_service=True)\n", + " i=0\n", + " while i < len(start_id_range) and i < len(end_id_range):\n", + " df = pv.get_metadata_for_country(country_code={country_code}, start_id_range=start_id_range[i], end_id_range=end_id_range[i], use_data_service=True)\n", " frames.append(df)\n", + " i+=1\n", " df= pd.concat(frames)\n", - " print(df)\n", - " df.to_csv(f\"/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/pv_data/pv_data_india.csv\", index=False)\n", + " df.to_csv(f\"{CACHE_DIR}/example.csv\", index=False)\n", " return df\n", "\n", - "create_df(start_id_range=start_id_range, end_id_range=end_id_range)\n", + "get_system_metadata_by_country(start_id_range=start_id_range, end_id_range=end_id_range)\n", "\n", "\n" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { From b7b2916d38392f18bc3d42b871d05aa8e8410b5d Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 6 Nov 2023 13:22:49 +0100 Subject: [PATCH 07/13] add updated PVOutput class --- pvoutput/pvoutput.py | 88 ++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 0d3c2fd..6434662 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -543,10 +543,10 @@ def get_metadata_for_country( Returns: pd.Dataframe. Index is: system_id, - system_DC_capacity_W, + system_size_W, postcode, num_panels, - panel_capacity_W_each, + panel_power_W, num_inverters, inverter_capacity_W, orientation, @@ -575,18 +575,18 @@ def get_metadata_for_country( f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" ) print( - f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" + f"Getting metadata for country code: {country_code} for {start_id_range} to {end_id_range}" ) pv_metadata_for_country = pd.read_csv( StringIO(pv_metadata_text), - lineterminator=";", + lineterminator="\n", names=[ "system_id", - "system_DC_capacity_W", + "system_size_W", "postcode", "num_panels", - "panel_capacity_W_each", + "panel_power_W", "num_inverters", "inverter_capacity_W", "orientation", @@ -602,11 +602,7 @@ def get_metadata_for_country( "secondary_array_tilt_degrees", ], parse_dates=["install_date"], - nrows=1, ) - pv_metadata_for_country["system_id"] = pv_metadata_for_country["system_id"] - # pv_metadata_for_country["system_id"] = [start_id_range, end_id_range] - # pv_metadata_for_country.name = [start_id_range, end_id_range] return pv_metadata_for_country def get_statistic( @@ -933,39 +929,39 @@ def _filter_date_range( if not date_ranges: return date_ranges - stats = self._get_statistic_with_cache( - store_filename, - system_id, - date_to=date_ranges[-1].end_date, - wait_if_rate_limit_exceeded=True, - ).squeeze() - - if pd.isnull(stats["actual_date_from"]) or pd.isnull(stats["actual_date_to"]): - _LOG.info("system_id %d: Stats say there is no data!", system_id) - return [] - - timeseries_date_range = DateRange( - stats["actual_date_from"], stats["actual_date_to"] - ) - - data_availability = stats["num_outputs"] / ( - timeseries_date_range.total_days() + 1 - ) - - if data_availability < min_data_availability: - _LOG.info( - "system_id %d: Data availability too low! Only %.0f %%.", - system_id, - data_availability * 100, - ) - return [] - - new_date_ranges = [] - for date_range in date_ranges: - new_date_range = date_range.intersection(timeseries_date_range) - if new_date_range: - new_date_ranges.append(new_date_range) - return new_date_ranges + # stats = self._get_statistic_with_cache( + # store_filename, + # system_id, + # date_to=date_ranges[-1].end_date, + # wait_if_rate_limit_exceeded=True, + # ).squeeze() + + # if pd.isnull(stats["actual_date_from"]) or pd.isnull(stats["actual_date_to"]): + # _LOG.info("system_id %d: Stats say there is no data!", system_id) + # return [] + + # timeseries_date_range = DateRange( + # stats["actual_date_from"], stats["actual_date_to"] + # ) + + # data_availability = stats["num_outputs"] / ( + # timeseries_date_range.total_days() + 1 + # ) + + # if data_availability < min_data_availability: + # _LOG.info( + # "system_id %d: Data availability too low! Only %.0f %%.", + # system_id, + # data_availability * 100, + # ) + # return [] + + # new_date_ranges = [] + # for date_range in date_ranges: + # new_date_range = date_range.intersection(timeseries_date_range) + # if new_date_range: + # new_date_ranges.append(new_date_range) + # return new_date_ranges def _download_multiple_using_get_batch_status( self, @@ -1063,6 +1059,7 @@ def _download_multiple_worker( timeseries["datetime_of_API_request"] = datetime_of_api_request timeseries["query_date"] = pd.Timestamp(date_to_load) key = system_id_to_hdf_key(pv_system_id) + print(key) with pd.HDFStore(output_filename, mode="a", complevel=9) as store: with warnings.catch_warnings(): warnings.simplefilter("ignore", tables.NaturalNameWarning) @@ -1175,7 +1172,10 @@ def _set_rate_limit_params(self, headers): self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp( self.rate_limit_reset_time ) - self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc") + if self.rate_limit_reset_time.tzinfo is None: + self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc") + else: + self.rate_limit_reset_time = self.rate_limit_reset_time.tz_convert("utc") _LOG.debug("%s", self.rate_limit_info()) From 9f17bb84740d3bfd80db1af4620a432c944601d1 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 6 Nov 2023 13:25:15 +0100 Subject: [PATCH 08/13] add updated fetch_pv_timeseries script --- scripts/fetch_pv_timeseries.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/fetch_pv_timeseries.py b/scripts/fetch_pv_timeseries.py index ac7d4a6..6287b06 100644 --- a/scripts/fetch_pv_timeseries.py +++ b/scripts/fetch_pv_timeseries.py @@ -26,6 +26,7 @@ import click as cl import datetime as dt import sys +import os import pandas as pd import pathlib import logging @@ -36,7 +37,8 @@ "-s", "--systemfile", "systemfile_path", - envvar="SYSTEMFILE", + envvar=os.environ.get("SYSTEM_FILE"), + default='./examples/pv_data/PVOutput_India_systems.csv', required=True, type=cl.Path(exists=True), ) @@ -44,8 +46,8 @@ "-o", "--outdir", "output_directory", - envvar="OUTDIR", - default="/mnt/storage_b/data/ocf/solar_pv_nowcasting/nowcasting_dataset_pipeline/PV/PVOutput.org", + envvar=os.environ.get("OUTDIR"), + default="./examples/pv_data", type=cl.Path(exists=False, dir_okay=True), ) @cl.option( @@ -53,8 +55,8 @@ ) @cl.option("--enddate", "end_date", envvar="ENDDATE", default="2019-08-20", type=cl.DateTime()) @cl.option("--data_service_url", envvar="DATA_SERVICE_URL") -@cl.option("--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", required=True, type=str) -@cl.option("--pvo_apikey", envvar="PVOUTPUT_AUTH_APIKEY", required=True, type=str) +@cl.option("--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", default="68732", required=True, type=str) +@cl.option("--pvo_apikey", envvar="PVOUTPUT_AUTH_APIKEY", default="3f784ff6cfa27c44436f88da0c429b410687ad14",required=True, type=str) def run( output_directory: str, systemfile_path: str, @@ -79,7 +81,7 @@ def run( pv_systems: pd.DataFrame = pd.read_csv(systemfile_path, index_col="system_id") # Write output file - filename: str = pathlib.Path(systemfile_path).stem.replace("systems", "timeseries") + ".hdf" + filename: str = pathlib.Path(systemfile_path).stem.replace("systems", "timeseries") + ".hdf5" logging.info(f"Writing to {output_directory}/{filename}") pv.download_multiple_systems_to_disk( system_ids=pv_systems.index, From f3837e1cee0e26828d86612896d299098cd8ec85 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 6 Nov 2023 15:53:58 +0100 Subject: [PATCH 09/13] comment out call to get_statistic_route because unavailable --- pvoutput/pvoutput.py | 82 ++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index 6434662..e8c23e2 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -816,13 +816,13 @@ def download_multiple_systems_to_disk( output_filename, pv_system_id, start_date, end_date ) - # How much data is actually available? - date_ranges_to_download = self._filter_date_range( - output_filename, - pv_system_id, - date_ranges_to_download, - min_data_availability, - ) + # # How much data is actually available? + # date_ranges_to_download = self._filter_date_range( + # output_filename, + # pv_system_id, + # date_ranges_to_download, + # min_data_availability, + # ) if not date_ranges_to_download: _LOG.info("system_id %d: No data left to download :)", pv_system_id) @@ -929,39 +929,39 @@ def _filter_date_range( if not date_ranges: return date_ranges - # stats = self._get_statistic_with_cache( - # store_filename, - # system_id, - # date_to=date_ranges[-1].end_date, - # wait_if_rate_limit_exceeded=True, - # ).squeeze() - - # if pd.isnull(stats["actual_date_from"]) or pd.isnull(stats["actual_date_to"]): - # _LOG.info("system_id %d: Stats say there is no data!", system_id) - # return [] - - # timeseries_date_range = DateRange( - # stats["actual_date_from"], stats["actual_date_to"] - # ) - - # data_availability = stats["num_outputs"] / ( - # timeseries_date_range.total_days() + 1 - # ) - - # if data_availability < min_data_availability: - # _LOG.info( - # "system_id %d: Data availability too low! Only %.0f %%.", - # system_id, - # data_availability * 100, - # ) - # return [] - - # new_date_ranges = [] - # for date_range in date_ranges: - # new_date_range = date_range.intersection(timeseries_date_range) - # if new_date_range: - # new_date_ranges.append(new_date_range) - # return new_date_ranges + stats = self._get_statistic_with_cache( + store_filename, + system_id, + date_to=date_ranges[-1].end_date, + wait_if_rate_limit_exceeded=True, + ).squeeze() + + if pd.isnull(stats["actual_date_from"]) or pd.isnull(stats["actual_date_to"]): + _LOG.info("system_id %d: Stats say there is no data!", system_id) + return [] + + timeseries_date_range = DateRange( + stats["actual_date_from"], stats["actual_date_to"] + ) + + data_availability = stats["num_outputs"] / ( + timeseries_date_range.total_days() + 1 + ) + + if data_availability < min_data_availability: + _LOG.info( + "system_id %d: Data availability too low! Only %.0f %%.", + system_id, + data_availability * 100, + ) + return [] + + new_date_ranges = [] + for date_range in date_ranges: + new_date_range = date_range.intersection(timeseries_date_range) + if new_date_range: + new_date_ranges.append(new_date_range) + return new_date_ranges def _download_multiple_using_get_batch_status( self, @@ -1060,7 +1060,7 @@ def _download_multiple_worker( timeseries["query_date"] = pd.Timestamp(date_to_load) key = system_id_to_hdf_key(pv_system_id) print(key) - with pd.HDFStore(output_filename, mode="a", complevel=9) as store: + with pd.HDFStore(output_filename, mode="a") as store: with warnings.catch_warnings(): warnings.simplefilter("ignore", tables.NaturalNameWarning) store.append(key=key, value=timeseries, data_columns=True) From ec8cdbffb8e98d17c73a598e7bd7d18f35f46f9c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:01:06 +0000 Subject: [PATCH 10/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvoutput/pvoutput.py | 87 +++++++++------------------------- scripts/fetch_pv_timeseries.py | 17 +++++-- 2 files changed, 35 insertions(+), 69 deletions(-) diff --git a/pvoutput/pvoutput.py b/pvoutput/pvoutput.py index e8c23e2..a34c893 100644 --- a/pvoutput/pvoutput.py +++ b/pvoutput/pvoutput.py @@ -161,9 +161,7 @@ def search( if lat is not None and lon is not None: api_params["ll"] = "{:f},{:f}".format(lat, lon) - pv_systems_text = self._api_query( - service="search", api_params=api_params, **kwargs - ) + pv_systems_text = self._api_query(service="search", api_params=api_params, **kwargs) pv_systems = pd.read_csv( StringIO(pv_systems_text), @@ -316,9 +314,7 @@ def get_system_status( temperature_C, voltage, """ - _LOG.info( - f"system_ids {pv_system_ids}: Requesting batch system status for %s", date - ) + _LOG.info(f"system_ids {pv_system_ids}: Requesting batch system status for %s", date) date = date_to_pvoutput_str(date) _check_date(date) @@ -336,9 +332,7 @@ def get_system_status( ) except NoStatusFound: - _LOG.info( - f"system_id {all_pv_system_id}: No status found for date %s", date - ) + _LOG.info(f"system_id {all_pv_system_id}: No status found for date %s", date) pv_system_status_text = "no status found" # each pv system is on a new line @@ -443,8 +437,7 @@ def get_batch_status( time.sleep(1) else: _print_and_log( - "Call get_batch_status again in a minute to see if" - " results are ready." + "Call get_batch_status again in a minute to see if" " results are ready." ) else: break @@ -571,9 +564,7 @@ def get_metadata_for_country( **kwargs, ) - _LOG.debug( - f"getting metadata for {country_code} for {start_id_range} to {end_id_range}" - ) + _LOG.debug(f"getting metadata for {country_code} for {start_id_range} to {end_id_range}") print( f"Getting metadata for country code: {country_code} for {start_id_range} to {end_id_range}" ) @@ -684,12 +675,8 @@ def get_statistic( else: pv_metadata.index = [pv_system_id] - pv_metadata["query_date_from"] = ( - pd.Timestamp(date_from) if date_from else pd.NaT - ) - pv_metadata["query_date_to"] = ( - pd.Timestamp(date_to) if date_to else pd.Timestamp.now() - ) + pv_metadata["query_date_from"] = pd.Timestamp(date_from) if date_from else pd.NaT + pv_metadata["query_date_to"] = pd.Timestamp(date_to) if date_to else pd.Timestamp.now() return pv_metadata def _get_statistic_with_cache( @@ -736,9 +723,7 @@ def _get_fresh_statistic(): return stats try: - stats = pd.read_hdf( - store_filename, key="statistics", where="index=pv_system_id" - ) + stats = pd.read_hdf(store_filename, key="statistics", where="index=pv_system_id") except (FileNotFoundError, KeyError): return _get_fresh_statistic() @@ -804,9 +789,7 @@ def download_multiple_systems_to_disk( n = len(system_ids) for i, pv_system_id in enumerate(system_ids): _LOG.info("**********************") - msg = "system_id {:d}: {:d} of {:d} ({:%})".format( - pv_system_id, i + 1, n, (i + 1) / n - ) + msg = "system_id {:d}: {:d} of {:d} ({:%})".format(pv_system_id, i + 1, n, (i + 1) / n) _LOG.info(msg) print("\r", msg, end="", flush=True) @@ -940,13 +923,9 @@ def _filter_date_range( _LOG.info("system_id %d: Stats say there is no data!", system_id) return [] - timeseries_date_range = DateRange( - stats["actual_date_from"], stats["actual_date_to"] - ) + timeseries_date_range = DateRange(stats["actual_date_from"], stats["actual_date_to"]) - data_availability = stats["num_outputs"] / ( - timeseries_date_range.total_days() + 1 - ) + data_availability = stats["num_outputs"] / (timeseries_date_range.total_days() + 1) if data_availability < min_data_availability: _LOG.info( @@ -1088,9 +1067,7 @@ def _api_query( RateLimitExceeded """ get_response_func = ( - self._get_data_service_response - if use_data_service - else self._get_api_response + self._get_data_service_response if use_data_service else self._get_api_response ) try: @@ -1102,16 +1079,13 @@ def _api_query( try: return self._process_api_response(response) except RateLimitExceeded: - msg = ( - "PVOutput.org API rate limit exceeded!" - " Rate limit will be reset at {}".format(self.rate_limit_reset_time) + msg = "PVOutput.org API rate limit exceeded!" " Rate limit will be reset at {}".format( + self.rate_limit_reset_time ) _print_and_log(msg) if wait_if_rate_limit_exceeded: self.wait_for_rate_limit_reset() - return self._api_query( - service, api_params, wait_if_rate_limit_exceeded=False - ) + return self._api_query(service, api_params, wait_if_rate_limit_exceeded=False) raise RateLimitExceeded(response, msg) @@ -1135,9 +1109,7 @@ def _get_api_response(self, service: str, api_params: Dict) -> requests.Response return _get_response(api_url, api_params, headers) - def _get_data_service_response( - self, service: str, api_params: Dict - ) -> requests.Response: + def _get_data_service_response(self, service: str, api_params: Dict) -> requests.Response: """ Get the data service response from pvoutput.org @@ -1169,9 +1141,7 @@ def _set_rate_limit_params(self, headers): header_value = int(headers[header_key]) setattr(self, param_name, header_value) - self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp( - self.rate_limit_reset_time - ) + self.rate_limit_reset_time = pd.Timestamp.utcfromtimestamp(self.rate_limit_reset_time) if self.rate_limit_reset_time.tzinfo is None: self.rate_limit_reset_time = self.rate_limit_reset_time.tz_localize("utc") else: @@ -1248,9 +1218,7 @@ def wait_for_rate_limit_reset(self, do_sleeping: bool = True) -> int: # retry_time_local = retry_time_utc.tz_convert(tz=datetime.now(tzlocal()).tzname()) retry_time_local = retry_time_utc _print_and_log( - "Waiting {:.0f} seconds. Will retry at {} UTC".format( - secs_to_wait, retry_time_local - ) + "Waiting {:.0f} seconds. Will retry at {} UTC".format(secs_to_wait, retry_time_local) ) if do_sleeping: time.sleep(secs_to_wait) @@ -1339,25 +1307,14 @@ def _append_missing_date_range( missing_end_date, ) with pd.HDFStore(output_filename, mode="a", complevel=9) as store: - store.append( - key="missing_dates", value=new_missing_date_range, data_columns=True - ) + store.append(key="missing_dates", value=new_missing_date_range, data_columns=True) -def _record_gaps( - output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request -): +def _record_gaps(output_filename, pv_system_id, date_to, timeseries, datetime_of_api_request): dates_of_data = ( - timeseries["instantaneous_power_gen_W"] - .dropna() - .resample("D") - .mean() - .dropna() - .index.date + timeseries["instantaneous_power_gen_W"].dropna().resample("D").mean().dropna().index.date ) - dates_requested = pd.date_range( - date_to - timedelta(days=365), date_to, freq="D" - ).date + dates_requested = pd.date_range(date_to - timedelta(days=365), date_to, freq="D").date missing_dates = set(dates_requested) - set(dates_of_data) missing_date_ranges = _convert_consecutive_dates_to_date_ranges(list(missing_dates)) _LOG.info( diff --git a/scripts/fetch_pv_timeseries.py b/scripts/fetch_pv_timeseries.py index d4aafdc..3512b62 100644 --- a/scripts/fetch_pv_timeseries.py +++ b/scripts/fetch_pv_timeseries.py @@ -23,9 +23,10 @@ import datetime as dt import logging +import os import pathlib import sys -import os + import pandas as pd from pvoutput import * @@ -37,7 +38,7 @@ "--systemfile", "systemfile_path", envvar=os.environ.get("SYSTEM_FILE"), - default='./examples/pv_data/PVOutput_India_systems.csv', + default="./examples/pv_data/PVOutput_India_systems.csv", required=True, type=cl.Path(exists=True), ) @@ -54,8 +55,16 @@ ) @cl.option("--enddate", "end_date", envvar="ENDDATE", default="2019-08-20", type=cl.DateTime()) @cl.option("--data_service_url", envvar="DATA_SERVICE_URL") -@cl.option("--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", default="68732", required=True, type=str) -@cl.option("--pvo_apikey", envvar="PVOUTPUT_AUTH_APIKEY", default="3f784ff6cfa27c44436f88da0c429b410687ad14",required=True, type=str) +@cl.option( + "--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", default="68732", required=True, type=str +) +@cl.option( + "--pvo_apikey", + envvar="PVOUTPUT_AUTH_APIKEY", + default="3f784ff6cfa27c44436f88da0c429b410687ad14", + required=True, + type=str, +) def run( output_directory: str, systemfile_path: str, From d44b86c3a3fa0378e1958c4b4dde3b3f2cd8d7f0 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Tue, 7 Nov 2023 11:18:11 +0100 Subject: [PATCH 11/13] remove ocf-research account data --- scripts/fetch_pv_timeseries.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/fetch_pv_timeseries.py b/scripts/fetch_pv_timeseries.py index d4aafdc..f19a22d 100644 --- a/scripts/fetch_pv_timeseries.py +++ b/scripts/fetch_pv_timeseries.py @@ -26,6 +26,7 @@ import pathlib import sys import os +import click as cl import pandas as pd from pvoutput import * @@ -36,8 +37,7 @@ "-s", "--systemfile", "systemfile_path", - envvar=os.environ.get("SYSTEM_FILE"), - default='./examples/pv_data/PVOutput_India_systems.csv', + envvar="SYSTEM_FILE", required=True, type=cl.Path(exists=True), ) @@ -45,17 +45,16 @@ "-o", "--outdir", "output_directory", - envvar=os.environ.get("OUTDIR"), - default="./examples/pv_data", + envvar="OUTDIR", type=cl.Path(exists=False, dir_okay=True), ) @cl.option( - "--startdate", "start_date", envvar="STARTDATE", default="2019-05-20", type=cl.DateTime() + "--startdate", "start_date", envvar="STARTDATE", default="2020-05-20", type=cl.DateTime() ) -@cl.option("--enddate", "end_date", envvar="ENDDATE", default="2019-08-20", type=cl.DateTime()) -@cl.option("--data_service_url", envvar="DATA_SERVICE_URL") -@cl.option("--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", default="68732", required=True, type=str) -@cl.option("--pvo_apikey", envvar="PVOUTPUT_AUTH_APIKEY", default="3f784ff6cfa27c44436f88da0c429b410687ad14",required=True, type=str) +@cl.option("--enddate", "end_date", envvar="ENDDATE", default="2023-08-20", type=cl.DateTime()) +@cl.option("--data_service_url", envvar="DATA_SERVICE_URL", default="https://pvoutput.org") +@cl.option("--pvo_systemid", envvar="PVOUTPUT_AUTH_SYSTEMID", required=True, type=str) +@cl.option("--pvo_apikey", envvar="PVOUTPUT_AUTH_APIKEY", required=True, type=str) def run( output_directory: str, systemfile_path: str, @@ -80,7 +79,7 @@ def run( pv_systems: pd.DataFrame = pd.read_csv(systemfile_path, index_col="system_id") # Write output file - filename: str = pathlib.Path(systemfile_path).stem.replace("systems", "timeseries") + ".hdf5" + filename: str = pathlib.Path(systemfile_path).stem.replace("systems", "timeseries") + ".hdf" logging.info(f"Writing to {output_directory}/{filename}") pv.download_multiple_systems_to_disk( system_ids=pv_systems.index, From 7afeb06fe3fc32f996d6c590b73891359dce5b50 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 10:20:15 +0000 Subject: [PATCH 12/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/fetch_pv_timeseries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch_pv_timeseries.py b/scripts/fetch_pv_timeseries.py index 970cc98..4d15774 100644 --- a/scripts/fetch_pv_timeseries.py +++ b/scripts/fetch_pv_timeseries.py @@ -26,7 +26,7 @@ import os import pathlib import sys -import os + import click as cl import pandas as pd From 386fe5ec88ce0e6a20382c7afc98b817e140c400 Mon Sep 17 00:00:00 2001 From: Rachel Tipton Date: Mon, 13 Nov 2023 17:06:09 +0100 Subject: [PATCH 13/13] add Gant chart of data availability --- examples/analyse_india_data.ipynb | 2987 +++++++++++++++++++++++++++++ 1 file changed, 2987 insertions(+) create mode 100644 examples/analyse_india_data.ipynb diff --git a/examples/analyse_india_data.ipynb b/examples/analyse_india_data.ipynb new file mode 100644 index 0000000..ac11e24 --- /dev/null +++ b/examples/analyse_india_data.ipynb @@ -0,0 +1,2987 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import plotly as py\n", + "import plotly.express as px\n", + "import plotly.graph_objects as go\n", + "\n", + "output_filename = \"/Users/dragonflyiterations/Desktop/open-climate-fix/pvoutput/pvoutput/examples/pv_data/PVOutput_India_timeseries_one.hdf5\"\n", + "\n", + "with pd.HDFStore(output_filename, mode=\"r\", complevel=9) as store:\n", + " keys = store.keys()\n", + " print(keys)\n", + "\n", + " df = store.get(key=\"/timeseries/100451\")\n", + "print(df.head())\n", + "\n", + " \n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "#### Histogram of site capacities" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# get csv file with system metadata from pvoutput\n", + "# get plotly to work\n", + "# system id and capacity\n", + "# plot the data as histogram in plotly\n", + "import plotly.express as px\n", + "\n", + "file = \"../examples/pv_data/PVOutput_India_systems.csv\"\n", + "data = pd.read_csv(file)\n", + "df = pd.DataFrame(data, columns=[\"system_id\", \"system_size_W\"])\n", + "df[\"system_id\"] = df[\"system_id\"].astype(str)\n", + "df[\"system_size_W\"] = (df[\"system_size_W\"] / 1000).astype(float)\n", + "#rename columns titles\n", + "df.rename(\n", + " columns={\"system_id\": \"System ID\", \"system_size_W\": \"System Capacity (kW)\"},\n", + " inplace=True,\n", + ")\n", + "fig = px.histogram(\n", + " df, x=\"System ID\", y=\"System Capacity (kW)\", title=\"PVOutput India System Capacities\"\n", + ")\n", + "fig.show()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Heatmap of data availability" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['2530', '2553', '2555', '2556', '3035', '3323', '7219', '14351', '30432', '35948', '35987', '45628', '46732', '47522', '49660', '50492', '55087', '56151', '56709', '58780', '59687', '59710', '59838', '60294', '60602', '60673', '62846', '65138', '66634', '66705', '67861', '71120', '72742', '73140', '73347', '74429', '77684', '77710', '78186', '78245', '78571', '79121', '79612', '81408', '82026', '82081', '82574', '85738', '86244', '87345', '87410', '90559', '91554', '97094', '99833', '100451']\n", + " system_id\n", + "0 2530\n", + "1 2553\n", + "2 2555\n", + "3 2556\n", + "4 3035\n", + "5 3323\n", + "6 7219\n", + "7 14351\n", + "8 30432\n", + "9 35948\n", + "10 35987\n", + "11 45628\n", + "12 46732\n", + "13 47522\n", + "14 49660\n", + "15 50492\n", + "16 55087\n", + "17 56151\n", + "18 56709\n", + "19 58780\n", + "20 59687\n", + "21 59710\n", + "22 59838\n", + "23 60294\n", + "24 60602\n", + "25 60673\n", + "26 62846\n", + "27 65138\n", + "28 66634\n", + "29 66705\n", + "30 67861\n", + "31 71120\n", + "32 72742\n", + "33 73140\n", + "34 73347\n", + "35 74429\n", + "36 77684\n", + "37 77710\n", + "38 78186\n", + "39 78245\n", + "40 78571\n", + "41 79121\n", + "42 79612\n", + "43 81408\n", + "44 82026\n", + "45 82081\n", + "46 82574\n", + "47 85738\n", + "48 86244\n", + "49 87345\n", + "50 87410\n", + "51 90559\n", + "52 91554\n", + "53 97094\n", + "54 99833\n", + "55 100451\n", + "systesms with no data []\n", + "0\n", + "systems with data ['14351', '49660', '56151', '56709', '58780', '59687', '59710', '60294', '60602', '60673', '66634', '67861', '71120', '72742', '73347', '77684', '77710', '78186', '79612', '81408', '82081', '85738', '86244', '87410', '90559', '91554', '97094', '99833', '100451']\n" + ] + } + ], + "source": [ + "# plot data availability by year per system as heatmap in plotly\n", + "# read hdf file with missing dates and with keys\n", + "# create plotly heatmap for one year for one system\n", + "# write function to create heatmap for all years for one system\n", + "# write function to create heatmap for all years for all systems\n", + "# put system ids in a list\n", + "# check that id exists as a timeseries key\n", + "# loop through list and create heatmap of data availability for each system\n", + "frames = []\n", + "systems_with_no_data = []\n", + "systems_with_data = []\n", + "file = \"../examples/pv_data/PVOutput_India_systems.csv\"\n", + "data = pd.read_csv(file)\n", + "df = pd.DataFrame(data, columns=[\"system_id\"])\n", + "if \"system_id\" in df.columns:\n", + " system_ids = df[\"system_id\"].values.astype(str).tolist()\n", + " print(system_ids)\n", + "\n", + "with pd.HDFStore(output_filename, mode=\"r\", complevel=9) as store:\n", + " for system_id in system_ids:\n", + " if \"/timeseries/\" + system_id in store.keys():\n", + " systems_with_data.append(system_id)\n", + " \n", + " \n", + " \n", + "\n", + "\n", + "print(df)\n", + "print(\"systesms with no data\", systems_with_no_data)\n", + "print(len(systems_with_no_data))\n", + "print(\"systems with data\", systems_with_data)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Plot production for one site " + ] + }, + { + "cell_type": "code", + "execution_count": 171, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1626970800000000000 7.0 89.0 \n", + "1 1626971100000000000 15.0 90.0 \n", + "2 1626971400000000000 22.0 89.0 \n", + "3 1626971700000000000 29.0 89.0 \n", + "4 1626972000000000000 29.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699016973760975 1635811200 \n", + "1 NaN NaN 1699016973760975 1635811200 \n", + "2 NaN NaN 1699016973760975 1635811200 \n", + "3 NaN NaN 1699016973760975 1635811200 \n", + "4 NaN NaN 1699016973760975 1635811200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2021-07-22 16:20:00 7.0 89.0 \n", + "1 2021-07-22 16:25:00 15.0 90.0 \n", + "2 2021-07-22 16:30:00 22.0 89.0 \n", + "3 2021-07-22 16:35:00 29.0 89.0 \n", + "4 2021-07-22 16:40:00 29.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699016973760975 1635811200 \n", + "1 NaN NaN 1699016973760975 1635811200 \n", + "2 NaN NaN 1699016973760975 1635811200 \n", + "3 NaN NaN 1699016973760975 1635811200 \n", + "4 NaN NaN 1699016973760975 1635811200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1509693600000000000 40.0 1452.0 \n", + "1 1509693900000000000 40.0 0.0 \n", + "2 1509694200000000000 40.0 0.0 \n", + "3 1509694500000000000 40.0 0.0 \n", + "4 1509694800000000000 40.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017257803836 1541203200 \n", + "1 NaN NaN 1699017257803836 1541203200 \n", + "2 NaN NaN 1699017257803836 1541203200 \n", + "3 NaN NaN 1699017257803836 1541203200 \n", + "4 NaN NaN 1699017257803836 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2017-11-03 07:20:00 40.0 1452.0 \n", + "1 2017-11-03 07:25:00 40.0 0.0 \n", + "2 2017-11-03 07:30:00 40.0 0.0 \n", + "3 2017-11-03 07:35:00 40.0 0.0 \n", + "4 2017-11-03 07:40:00 40.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017257803836 1541203200 \n", + "1 NaN NaN 1699017257803836 1541203200 \n", + "2 NaN NaN 1699017257803836 1541203200 \n", + "3 NaN NaN 1699017257803836 1541203200 \n", + "4 NaN NaN 1699017257803836 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1513945500000000000 42500.0 14500.0 \n", + "1 1513945800000000000 43900.0 14200.0 \n", + "2 1513946100000000000 44500.0 0.0 \n", + "3 1513946400000000000 45000.0 14300.0 \n", + "4 1513946700000000000 46200.0 14500.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 526.0 1699017386551423 1541203200 \n", + "1 NaN 536.0 1699017386551423 1541203200 \n", + "2 NaN 652.0 1699017386551423 1541203200 \n", + "3 NaN 522.0 1699017386551423 1541203200 \n", + "4 NaN 516.0 1699017386551423 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2017-12-22 12:25:00 42500.0 14500.0 \n", + "1 2017-12-22 12:30:00 43900.0 14200.0 \n", + "2 2017-12-22 12:35:00 44500.0 0.0 \n", + "3 2017-12-22 12:40:00 45000.0 14300.0 \n", + "4 2017-12-22 12:45:00 46200.0 14500.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 526.0 1699017386551423 1541203200 \n", + "1 NaN 536.0 1699017386551423 1541203200 \n", + "2 NaN 652.0 1699017386551423 1541203200 \n", + "3 NaN 522.0 1699017386551423 1541203200 \n", + "4 NaN 516.0 1699017386551423 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1516728000000000000 7770.0 159.0 \n", + "1 1516728300000000000 7780.0 91.0 \n", + "2 1516728600000000000 7790.0 124.0 \n", + "3 1516729500000000000 7810.0 103.0 \n", + "4 1516729800000000000 7820.0 93.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 39.5 247.2 1699017430495614 1541203200 \n", + "1 39.1 248.0 1699017430495614 1541203200 \n", + "2 38.6 248.8 1699017430495614 1541203200 \n", + "3 37.9 247.2 1699017430495614 1541203200 \n", + "4 37.6 247.2 1699017430495614 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-01-23 17:20:00 7770.0 159.0 \n", + "1 2018-01-23 17:25:00 7780.0 91.0 \n", + "2 2018-01-23 17:30:00 7790.0 124.0 \n", + "3 2018-01-23 17:45:00 7810.0 103.0 \n", + "4 2018-01-23 17:50:00 7820.0 93.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 39.5 247.2 1699017430495614 1541203200 \n", + "1 39.1 248.0 1699017430495614 1541203200 \n", + "2 38.6 248.8 1699017430495614 1541203200 \n", + "3 37.9 247.2 1699017430495614 1541203200 \n", + "4 37.6 247.2 1699017430495614 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1525147200000000000 200.0 551.0 \n", + "1 1525147500000000000 200.0 626.0 \n", + "2 1525147800000000000 300.0 726.0 \n", + "3 1525148100000000000 300.0 944.0 \n", + "4 1525148400000000000 400.0 998.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 32.1 232.0 1699017472581195 1541203200 \n", + "1 32.3 250.8 1699017472581195 1541203200 \n", + "2 32.5 249.3 1699017472581195 1541203200 \n", + "3 32.9 249.2 1699017472581195 1541203200 \n", + "4 33.3 240.6 1699017472581195 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-05-01 04:00:00 200.0 551.0 \n", + "1 2018-05-01 04:05:00 200.0 626.0 \n", + "2 2018-05-01 04:10:00 300.0 726.0 \n", + "3 2018-05-01 04:15:00 300.0 944.0 \n", + "4 2018-05-01 04:20:00 400.0 998.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 32.1 232.0 1699017472581195 1541203200 \n", + "1 32.3 250.8 1699017472581195 1541203200 \n", + "2 32.5 249.3 1699017472581195 1541203200 \n", + "3 32.9 249.2 1699017472581195 1541203200 \n", + "4 33.3 240.6 1699017472581195 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1528444500000000000 234.0 371.0 \n", + "1 1528444800000000000 272.0 370.0 \n", + "2 1528445100000000000 294.0 359.0 \n", + "3 1528445400000000000 339.0 421.0 \n", + "4 1528446000000000000 400.0 456.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017522051653 1541203200 \n", + "1 NaN NaN 1699017522051653 1541203200 \n", + "2 NaN NaN 1699017522051653 1541203200 \n", + "3 NaN NaN 1699017522051653 1541203200 \n", + "4 NaN NaN 1699017522051653 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-06-08 07:55:00 234.0 371.0 \n", + "1 2018-06-08 08:00:00 272.0 370.0 \n", + "2 2018-06-08 08:05:00 294.0 359.0 \n", + "3 2018-06-08 08:10:00 339.0 421.0 \n", + "4 2018-06-08 08:20:00 400.0 456.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017522051653 1541203200 \n", + "1 NaN NaN 1699017522051653 1541203200 \n", + "2 NaN NaN 1699017522051653 1541203200 \n", + "3 NaN NaN 1699017522051653 1541203200 \n", + "4 NaN NaN 1699017522051653 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1529993700000000000 1.0 4.0 \n", + "1 1529994600000000000 10.0 36.0 \n", + "2 1529995500000000000 29.0 76.0 \n", + "3 1529996400000000000 69.0 160.0 \n", + "4 1529997300000000000 129.0 238.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017562283885 1541203200 \n", + "1 NaN NaN 1699017562283885 1541203200 \n", + "2 NaN NaN 1699017562283885 1541203200 \n", + "3 NaN NaN 1699017562283885 1541203200 \n", + "4 NaN NaN 1699017562283885 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-06-26 06:15:00 1.0 4.0 \n", + "1 2018-06-26 06:30:00 10.0 36.0 \n", + "2 2018-06-26 06:45:00 29.0 76.0 \n", + "3 2018-06-26 07:00:00 69.0 160.0 \n", + "4 2018-06-26 07:15:00 129.0 238.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017562283885 1541203200 \n", + "1 NaN NaN 1699017562283885 1541203200 \n", + "2 NaN NaN 1699017562283885 1541203200 \n", + "3 NaN NaN 1699017562283885 1541203200 \n", + "4 NaN NaN 1699017562283885 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1570691400000000000 111.0 224.0 \n", + "1 1570691700000000000 129.0 238.0 \n", + "2 1570692000000000000 155.0 284.0 \n", + "3 1570692300000000000 176.0 217.0 \n", + "4 1570692600000000000 192.0 182.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017635354609 1572739200 \n", + "1 NaN NaN 1699017635354609 1572739200 \n", + "2 NaN NaN 1699017635354609 1572739200 \n", + "3 NaN NaN 1699017635354609 1572739200 \n", + "4 NaN NaN 1699017635354609 1572739200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2019-10-10 07:10:00 111.0 224.0 \n", + "1 2019-10-10 07:15:00 129.0 238.0 \n", + "2 2019-10-10 07:20:00 155.0 284.0 \n", + "3 2019-10-10 07:25:00 176.0 217.0 \n", + "4 2019-10-10 07:30:00 192.0 182.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017635354609 1572739200 \n", + "1 NaN NaN 1699017635354609 1572739200 \n", + "2 NaN NaN 1699017635354609 1572739200 \n", + "3 NaN NaN 1699017635354609 1572739200 \n", + "4 NaN NaN 1699017635354609 1572739200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1533534600000000000 0.0 5.0 \n", + "1 1533534900000000000 1.0 14.0 \n", + "2 1533535200000000000 3.0 19.0 \n", + "3 1533535500000000000 5.0 19.0 \n", + "4 1533535800000000000 8.0 34.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 229.9 1699017692462479 1541203200 \n", + "1 NaN 230.3 1699017692462479 1541203200 \n", + "2 NaN 229.6 1699017692462479 1541203200 \n", + "3 NaN 230.0 1699017692462479 1541203200 \n", + "4 NaN 229.2 1699017692462479 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-08-06 05:50:00 0.0 5.0 \n", + "1 2018-08-06 05:55:00 1.0 14.0 \n", + "2 2018-08-06 06:00:00 3.0 19.0 \n", + "3 2018-08-06 06:05:00 5.0 19.0 \n", + "4 2018-08-06 06:10:00 8.0 34.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 229.9 1699017692462479 1541203200 \n", + "1 NaN 230.3 1699017692462479 1541203200 \n", + "2 NaN 229.6 1699017692462479 1541203200 \n", + "3 NaN 230.0 1699017692462479 1541203200 \n", + "4 NaN 229.2 1699017692462479 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1533665700000000000 10.0 117.0 \n", + "1 1533666000000000000 19.0 102.0 \n", + "2 1533666300000000000 25.0 73.0 \n", + "3 1533666600000000000 30.0 58.0 \n", + "4 1533666900000000000 31.0 14.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 231.0 1699017730950238 1541203200 \n", + "1 NaN 229.1 1699017730950238 1541203200 \n", + "2 NaN 230.3 1699017730950238 1541203200 \n", + "3 NaN 230.4 1699017730950238 1541203200 \n", + "4 NaN 229.6 1699017730950238 1541203200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2018-08-07 18:15:00 10.0 117.0 \n", + "1 2018-08-07 18:20:00 19.0 102.0 \n", + "2 2018-08-07 18:25:00 25.0 73.0 \n", + "3 2018-08-07 18:30:00 30.0 58.0 \n", + "4 2018-08-07 18:35:00 31.0 14.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 231.0 1699017730950238 1541203200 \n", + "1 NaN 229.1 1699017730950238 1541203200 \n", + "2 NaN 230.3 1699017730950238 1541203200 \n", + "3 NaN 230.4 1699017730950238 1541203200 \n", + "4 NaN 229.6 1699017730950238 1541203200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1555859100000000000 213.0 2553.0 \n", + "1 1555859400000000000 422.0 2509.0 \n", + "2 1555859700000000000 628.0 2469.0 \n", + "3 1555860000000000000 830.0 2422.0 \n", + "4 1555860300000000000 1028.0 2372.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017831870679 1572739200 \n", + "1 NaN NaN 1699017831870679 1572739200 \n", + "2 NaN NaN 1699017831870679 1572739200 \n", + "3 NaN NaN 1699017831870679 1572739200 \n", + "4 NaN NaN 1699017831870679 1572739200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2019-04-21 15:05:00 213.0 2553.0 \n", + "1 2019-04-21 15:10:00 422.0 2509.0 \n", + "2 2019-04-21 15:15:00 628.0 2469.0 \n", + "3 2019-04-21 15:20:00 830.0 2422.0 \n", + "4 2019-04-21 15:25:00 1028.0 2372.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017831870679 1572739200 \n", + "1 NaN NaN 1699017831870679 1572739200 \n", + "2 NaN NaN 1699017831870679 1572739200 \n", + "3 NaN NaN 1699017831870679 1572739200 \n", + "4 NaN NaN 1699017831870679 1572739200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1560059400000000000 0.0 24.0 \n", + "1 1560059700000000000 2.0 24.0 \n", + "2 1560060000000000000 4.0 24.0 \n", + "3 1560060300000000000 6.0 32.0 \n", + "4 1560060600000000000 8.0 34.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 227.3 1699017898041555 1572739200 \n", + "1 NaN 230.4 1699017898041555 1572739200 \n", + "2 NaN 230.5 1699017898041555 1572739200 \n", + "3 NaN 229.0 1699017898041555 1572739200 \n", + "4 NaN 229.3 1699017898041555 1572739200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2019-06-09 05:50:00 0.0 24.0 \n", + "1 2019-06-09 05:55:00 2.0 24.0 \n", + "2 2019-06-09 06:00:00 4.0 24.0 \n", + "3 2019-06-09 06:05:00 6.0 32.0 \n", + "4 2019-06-09 06:10:00 8.0 34.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 227.3 1699017898041555 1572739200 \n", + "1 NaN 230.4 1699017898041555 1572739200 \n", + "2 NaN 230.5 1699017898041555 1572739200 \n", + "3 NaN 229.0 1699017898041555 1572739200 \n", + "4 NaN 229.3 1699017898041555 1572739200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1572846300000000000 2.0 24.0 \n", + "1 1572846600000000000 2.0 0.0 \n", + "2 1572846900000000000 4.0 29.0 \n", + "3 1572847200000000000 4.0 0.0 \n", + "4 1572847500000000000 4.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 252.6 1699017930827599 1604275200 \n", + "1 NaN 252.0 1699017930827599 1604275200 \n", + "2 NaN 252.8 1699017930827599 1604275200 \n", + "3 NaN 252.4 1699017930827599 1604275200 \n", + "4 NaN 251.6 1699017930827599 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2019-11-04 05:45:00 2.0 24.0 \n", + "1 2019-11-04 05:50:00 2.0 0.0 \n", + "2 2019-11-04 05:55:00 4.0 29.0 \n", + "3 2019-11-04 06:00:00 4.0 0.0 \n", + "4 2019-11-04 06:05:00 4.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 252.6 1699017930827599 1604275200 \n", + "1 NaN 252.0 1699017930827599 1604275200 \n", + "2 NaN 252.8 1699017930827599 1604275200 \n", + "3 NaN 252.4 1699017930827599 1604275200 \n", + "4 NaN 251.6 1699017930827599 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1598627700000000000 0.0 2927.0 \n", + "1 1598628000000000000 244.0 2927.0 \n", + "2 1598628300000000000 468.0 2684.0 \n", + "3 1598628600000000000 684.0 2591.0 \n", + "4 1598628900000000000 900.0 2591.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017974223400 1604275200 \n", + "1 NaN NaN 1699017974223400 1604275200 \n", + "2 NaN NaN 1699017974223400 1604275200 \n", + "3 NaN NaN 1699017974223400 1604275200 \n", + "4 NaN NaN 1699017974223400 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-08-28 15:15:00 0.0 2927.0 \n", + "1 2020-08-28 15:20:00 244.0 2927.0 \n", + "2 2020-08-28 15:25:00 468.0 2684.0 \n", + "3 2020-08-28 15:30:00 684.0 2591.0 \n", + "4 2020-08-28 15:35:00 900.0 2591.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699017974223400 1604275200 \n", + "1 NaN NaN 1699017974223400 1604275200 \n", + "2 NaN NaN 1699017974223400 1604275200 \n", + "3 NaN NaN 1699017974223400 1604275200 \n", + "4 NaN NaN 1699017974223400 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1581057600000000000 0.0 374.0 \n", + "1 1581057900000000000 15.0 184.0 \n", + "2 1581058200000000000 37.0 259.0 \n", + "3 1581058500000000000 60.0 277.0 \n", + "4 1581058800000000000 74.0 166.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020285773460 1604275200 \n", + "1 NaN NaN 1699020285773460 1604275200 \n", + "2 NaN NaN 1699020285773460 1604275200 \n", + "3 NaN NaN 1699020285773460 1604275200 \n", + "4 NaN NaN 1699020285773460 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-02-07 06:40:00 0.0 374.0 \n", + "1 2020-02-07 06:45:00 15.0 184.0 \n", + "2 2020-02-07 06:50:00 37.0 259.0 \n", + "3 2020-02-07 06:55:00 60.0 277.0 \n", + "4 2020-02-07 07:00:00 74.0 166.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020285773460 1604275200 \n", + "1 NaN NaN 1699020285773460 1604275200 \n", + "2 NaN NaN 1699020285773460 1604275200 \n", + "3 NaN NaN 1699020285773460 1604275200 \n", + "4 NaN NaN 1699020285773460 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1600590600000000000 23.0 10.0 \n", + "1 1600936200000000000 23.0 10.0 \n", + "2 1601280600000000000 96.0 36.0 \n", + "3 1601368200000000000 29.0 49.0 \n", + "4 1601454600000000000 23.0 10.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 8.0 3.0 1699020354373588 1604275200 \n", + "1 8.0 3.0 1699020354373588 1604275200 \n", + "2 10.0 NaN 1699020354373588 1604275200 \n", + "3 8.0 3.0 1699020354373588 1604275200 \n", + "4 8.0 3.0 1699020354373588 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-09-20 08:30:00 23.0 10.0 \n", + "1 2020-09-24 08:30:00 23.0 10.0 \n", + "2 2020-09-28 08:10:00 96.0 36.0 \n", + "3 2020-09-29 08:30:00 29.0 49.0 \n", + "4 2020-09-30 08:30:00 23.0 10.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 8.0 3.0 1699020354373588 1604275200 \n", + "1 8.0 3.0 1699020354373588 1604275200 \n", + "2 10.0 NaN 1699020354373588 1604275200 \n", + "3 8.0 3.0 1699020354373588 1604275200 \n", + "4 8.0 3.0 1699020354373588 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1595923500000000000 598.0 3707.0 \n", + "1 1595923800000000000 915.0 3428.0 \n", + "2 1595924100000000000 1811.0 804.0 \n", + "3 1595924400000000000 2177.0 1634.0 \n", + "4 1595924700000000000 2279.0 2445.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 4.0 1.0 1699020382895354 1604275200 \n", + "1 9.0 8.0 1699020382895354 1604275200 \n", + "2 5.0 2.0 1699020382895354 1604275200 \n", + "3 3.0 5.0 1699020382895354 1604275200 \n", + "4 5.0 4.0 1699020382895354 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-07-28 08:05:00 598.0 3707.0 \n", + "1 2020-07-28 08:10:00 915.0 3428.0 \n", + "2 2020-07-28 08:15:00 1811.0 804.0 \n", + "3 2020-07-28 08:20:00 2177.0 1634.0 \n", + "4 2020-07-28 08:25:00 2279.0 2445.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 4.0 1.0 1699020382895354 1604275200 \n", + "1 9.0 8.0 1699020382895354 1604275200 \n", + "2 5.0 2.0 1699020382895354 1604275200 \n", + "3 3.0 5.0 1699020382895354 1604275200 \n", + "4 5.0 4.0 1699020382895354 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1598111700000000000 25.0 304.0 \n", + "1 1598112300000000000 164.0 835.0 \n", + "2 1598112600000000000 186.0 266.0 \n", + "3 1598112900000000000 202.0 195.0 \n", + "4 1598113800000000000 228.0 103.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 38.0 249.0 1699020416383053 1604275200 \n", + "1 38.0 246.0 1699020416383053 1604275200 \n", + "2 38.0 250.0 1699020416383053 1604275200 \n", + "3 38.0 249.0 1699020416383053 1604275200 \n", + "4 38.0 248.0 1699020416383053 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-08-22 15:55:00 25.0 304.0 \n", + "1 2020-08-22 16:05:00 164.0 835.0 \n", + "2 2020-08-22 16:10:00 186.0 266.0 \n", + "3 2020-08-22 16:15:00 202.0 195.0 \n", + "4 2020-08-22 16:30:00 228.0 103.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 38.0 249.0 1699020416383053 1604275200 \n", + "1 38.0 246.0 1699020416383053 1604275200 \n", + "2 38.0 250.0 1699020416383053 1604275200 \n", + "3 38.0 249.0 1699020416383053 1604275200 \n", + "4 38.0 248.0 1699020416383053 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1603973100000000000 118830.0 53710.0 \n", + "1 1603975200000000000 118830.0 0.0 \n", + "2 1603983000000000000 132310.0 6222.0 \n", + "3 1603987200000000000 152880.0 17631.0 \n", + "4 1604051400000000000 11560.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020541056141 1604275200 \n", + "1 NaN NaN 1699020541056141 1604275200 \n", + "2 NaN NaN 1699020541056141 1604275200 \n", + "3 NaN NaN 1699020541056141 1604275200 \n", + "4 NaN NaN 1699020541056141 1604275200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2020-10-29 12:05:00 118830.0 53710.0 \n", + "1 2020-10-29 12:40:00 118830.0 0.0 \n", + "2 2020-10-29 14:50:00 132310.0 6222.0 \n", + "3 2020-10-29 16:00:00 152880.0 17631.0 \n", + "4 2020-10-30 09:50:00 11560.0 0.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020541056141 1604275200 \n", + "1 NaN NaN 1699020541056141 1604275200 \n", + "2 NaN NaN 1699020541056141 1604275200 \n", + "3 NaN NaN 1699020541056141 1604275200 \n", + "4 NaN NaN 1699020541056141 1604275200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1611044700000000000 60.0 239.0 \n", + "1 1611045300000000000 106.0 275.0 \n", + "2 1611045900000000000 143.0 219.0 \n", + "3 1611046200000000000 166.0 276.0 \n", + "4 1611046500000000000 191.0 298.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 239.3 1699020562612063 1635811200 \n", + "1 NaN 240.6 1699020562612063 1635811200 \n", + "2 NaN 241.0 1699020562612063 1635811200 \n", + "3 NaN 240.1 1699020562612063 1635811200 \n", + "4 NaN 240.0 1699020562612063 1635811200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2021-01-19 08:25:00 60.0 239.0 \n", + "1 2021-01-19 08:35:00 106.0 275.0 \n", + "2 2021-01-19 08:45:00 143.0 219.0 \n", + "3 2021-01-19 08:50:00 166.0 276.0 \n", + "4 2021-01-19 08:55:00 191.0 298.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN 239.3 1699020562612063 1635811200 \n", + "1 NaN 240.6 1699020562612063 1635811200 \n", + "2 NaN 241.0 1699020562612063 1635811200 \n", + "3 NaN 240.1 1699020562612063 1635811200 \n", + "4 NaN 240.0 1699020562612063 1635811200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1613887200000000000 0.0 4.0 \n", + "1 1613887500000000000 1.0 9.0 \n", + "2 1613887800000000000 2.0 14.0 \n", + "3 1613888100000000000 4.0 23.0 \n", + "4 1613888400000000000 7.0 38.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 27.0 244.7 1699020620548072 1635811200 \n", + "1 27.0 246.5 1699020620548072 1635811200 \n", + "2 27.0 246.1 1699020620548072 1635811200 \n", + "3 28.0 245.3 1699020620548072 1635811200 \n", + "4 28.0 244.0 1699020620548072 1635811200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2021-02-21 06:00:00 0.0 4.0 \n", + "1 2021-02-21 06:05:00 1.0 9.0 \n", + "2 2021-02-21 06:10:00 2.0 14.0 \n", + "3 2021-02-21 06:15:00 4.0 23.0 \n", + "4 2021-02-21 06:20:00 7.0 38.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 27.0 244.7 1699020620548072 1635811200 \n", + "1 27.0 246.5 1699020620548072 1635811200 \n", + "2 27.0 246.1 1699020620548072 1635811200 \n", + "3 28.0 245.3 1699020620548072 1635811200 \n", + "4 28.0 244.0 1699020620548072 1635811200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1629829500000000000 51.0 611.0 \n", + "1 1629829800000000000 87.0 429.0 \n", + "2 1629830100000000000 110.0 273.0 \n", + "3 1629830400000000000 132.0 259.0 \n", + "4 1629830700000000000 143.0 133.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020680515718 1635811200 \n", + "1 NaN NaN 1699020680515718 1635811200 \n", + "2 NaN NaN 1699020680515718 1635811200 \n", + "3 NaN NaN 1699020680515718 1635811200 \n", + "4 NaN NaN 1699020680515718 1635811200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2021-08-24 18:25:00 51.0 611.0 \n", + "1 2021-08-24 18:30:00 87.0 429.0 \n", + "2 2021-08-24 18:35:00 110.0 273.0 \n", + "3 2021-08-24 18:40:00 132.0 259.0 \n", + "4 2021-08-24 18:45:00 143.0 133.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020680515718 1635811200 \n", + "1 NaN NaN 1699020680515718 1635811200 \n", + "2 NaN NaN 1699020680515718 1635811200 \n", + "3 NaN NaN 1699020680515718 1635811200 \n", + "4 NaN NaN 1699020680515718 1635811200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1632395100000000000 24.0 285.0 \n", + "1 1632395400000000000 47.0 280.0 \n", + "2 1632395700000000000 66.0 231.0 \n", + "3 1632396000000000000 86.0 237.0 \n", + "4 1632396300000000000 111.0 297.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 36.0 219.6 1699020705182740 1635811200 \n", + "1 36.0 226.0 1699020705182740 1635811200 \n", + "2 36.0 227.5 1699020705182740 1635811200 \n", + "3 36.0 227.9 1699020705182740 1635811200 \n", + "4 36.0 228.7 1699020705182740 1635811200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2021-09-23 11:05:00 24.0 285.0 \n", + "1 2021-09-23 11:10:00 47.0 280.0 \n", + "2 2021-09-23 11:15:00 66.0 231.0 \n", + "3 2021-09-23 11:20:00 86.0 237.0 \n", + "4 2021-09-23 11:25:00 111.0 297.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 36.0 219.6 1699020705182740 1635811200 \n", + "1 36.0 226.0 1699020705182740 1635811200 \n", + "2 36.0 227.5 1699020705182740 1635811200 \n", + "3 36.0 227.9 1699020705182740 1635811200 \n", + "4 36.0 228.7 1699020705182740 1635811200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1659333600000000000 0.0 105.0 \n", + "1 1659333900000000000 10.0 172.0 \n", + "2 1659334200000000000 20.0 204.0 \n", + "3 1659334500000000000 40.0 258.0 \n", + "4 1659334800000000000 60.0 263.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 23.6 NaN 1699020739285657 1667347200 \n", + "1 23.6 NaN 1699020739285657 1667347200 \n", + "2 24.0 NaN 1699020739285657 1667347200 \n", + "3 23.6 NaN 1699020739285657 1667347200 \n", + "4 23.6 NaN 1699020739285657 1667347200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2022-08-01 06:00:00 0.0 105.0 \n", + "1 2022-08-01 06:05:00 10.0 172.0 \n", + "2 2022-08-01 06:10:00 20.0 204.0 \n", + "3 2022-08-01 06:15:00 40.0 258.0 \n", + "4 2022-08-01 06:20:00 60.0 263.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 23.6 NaN 1699020739285657 1667347200 \n", + "1 23.6 NaN 1699020739285657 1667347200 \n", + "2 24.0 NaN 1699020739285657 1667347200 \n", + "3 23.6 NaN 1699020739285657 1667347200 \n", + "4 23.6 NaN 1699020739285657 1667347200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1659335100000000000 1.0 11.0 \n", + "1 1659335400000000000 4.0 32.0 \n", + "2 1659335700000000000 9.0 63.0 \n", + "3 1659336000000000000 16.0 87.0 \n", + "4 1659336300000000000 25.0 104.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020761818229 1667347200 \n", + "1 NaN NaN 1699020761818229 1667347200 \n", + "2 NaN NaN 1699020761818229 1667347200 \n", + "3 NaN NaN 1699020761818229 1667347200 \n", + "4 NaN NaN 1699020761818229 1667347200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2022-08-01 06:25:00 1.0 11.0 \n", + "1 2022-08-01 06:30:00 4.0 32.0 \n", + "2 2022-08-01 06:35:00 9.0 63.0 \n", + "3 2022-08-01 06:40:00 16.0 87.0 \n", + "4 2022-08-01 06:45:00 25.0 104.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020761818229 1667347200 \n", + "1 NaN NaN 1699020761818229 1667347200 \n", + "2 NaN NaN 1699020761818229 1667347200 \n", + "3 NaN NaN 1699020761818229 1667347200 \n", + "4 NaN NaN 1699020761818229 1667347200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}, {'System ID': '90559', 'Start': Timestamp('2022-08-01 06:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1659335400000000000 0.0 2.0 \n", + "1 1659335700000000000 1.0 10.0 \n", + "2 1659336000000000000 3.0 18.0 \n", + "3 1659336300000000000 5.0 26.0 \n", + "4 1659336600000000000 8.0 33.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020782611243 1667347200 \n", + "1 NaN NaN 1699020782611243 1667347200 \n", + "2 NaN NaN 1699020782611243 1667347200 \n", + "3 NaN NaN 1699020782611243 1667347200 \n", + "4 NaN NaN 1699020782611243 1667347200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2022-08-01 06:30:00 0.0 2.0 \n", + "1 2022-08-01 06:35:00 1.0 10.0 \n", + "2 2022-08-01 06:40:00 3.0 18.0 \n", + "3 2022-08-01 06:45:00 5.0 26.0 \n", + "4 2022-08-01 06:50:00 8.0 33.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020782611243 1667347200 \n", + "1 NaN NaN 1699020782611243 1667347200 \n", + "2 NaN NaN 1699020782611243 1667347200 \n", + "3 NaN NaN 1699020782611243 1667347200 \n", + "4 NaN NaN 1699020782611243 1667347200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}, {'System ID': '90559', 'Start': Timestamp('2022-08-01 06:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '91554', 'Start': Timestamp('2022-08-01 06:30:00'), 'Finish': Timestamp('2023-11-02 18:05:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1677225000000000000 0.0 678.0 \n", + "1 1677225300000000000 61.0 735.0 \n", + "2 1677225600000000000 127.0 792.0 \n", + "3 1677225900000000000 197.0 843.0 \n", + "4 1677226200000000000 274.0 922.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020795566684 1698883200 \n", + "1 NaN NaN 1699020795566684 1698883200 \n", + "2 NaN NaN 1699020795566684 1698883200 \n", + "3 NaN NaN 1699020795566684 1698883200 \n", + "4 NaN NaN 1699020795566684 1698883200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2023-02-24 07:50:00 0.0 678.0 \n", + "1 2023-02-24 07:55:00 61.0 735.0 \n", + "2 2023-02-24 08:00:00 127.0 792.0 \n", + "3 2023-02-24 08:05:00 197.0 843.0 \n", + "4 2023-02-24 08:10:00 274.0 922.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 NaN NaN 1699020795566684 1698883200 \n", + "1 NaN NaN 1699020795566684 1698883200 \n", + "2 NaN NaN 1699020795566684 1698883200 \n", + "3 NaN NaN 1699020795566684 1698883200 \n", + "4 NaN NaN 1699020795566684 1698883200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}, {'System ID': '90559', 'Start': Timestamp('2022-08-01 06:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '91554', 'Start': Timestamp('2022-08-01 06:30:00'), 'Finish': Timestamp('2023-11-02 18:05:00')}, {'System ID': '97094', 'Start': Timestamp('2023-02-24 07:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1687594800000000000 57.0 681.0 \n", + "1 1687595100000000000 120.0 753.0 \n", + "2 1687597500000000000 450.0 1320.0 \n", + "3 1687598700000000000 741.0 1163.0 \n", + "4 1687599000000000000 838.0 1163.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 46.0 250.0 1699020812093743 1698883200 \n", + "1 47.0 239.0 1699020812093743 1698883200 \n", + "2 54.0 224.0 1699020812093743 1698883200 \n", + "3 56.0 219.0 1699020812093743 1698883200 \n", + "4 56.0 219.0 1699020812093743 1698883200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2023-06-24 08:20:00 57.0 681.0 \n", + "1 2023-06-24 08:25:00 120.0 753.0 \n", + "2 2023-06-24 09:05:00 450.0 1320.0 \n", + "3 2023-06-24 09:25:00 741.0 1163.0 \n", + "4 2023-06-24 09:30:00 838.0 1163.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 46.0 250.0 1699020812093743 1698883200 \n", + "1 47.0 239.0 1699020812093743 1698883200 \n", + "2 54.0 224.0 1699020812093743 1698883200 \n", + "3 56.0 219.0 1699020812093743 1698883200 \n", + "4 56.0 219.0 1699020812093743 1698883200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}, {'System ID': '90559', 'Start': Timestamp('2022-08-01 06:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '91554', 'Start': Timestamp('2022-08-01 06:30:00'), 'Finish': Timestamp('2023-11-02 18:05:00')}, {'System ID': '97094', 'Start': Timestamp('2023-02-24 07:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '99833', 'Start': Timestamp('2023-06-24 08:20:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}]\n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 1690901100000000000 7900.0 1354.0 \n", + "1 1690902000000000000 8300.0 1391.0 \n", + "2 1690902600000000000 8500.0 1340.0 \n", + "3 1690903200000000000 8700.0 1725.0 \n", + "4 1690903800000000000 8900.0 671.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 0.0 269.2 1699020827334845 1698883200 \n", + "1 0.0 278.2 1699020827334845 1698883200 \n", + "2 0.0 275.2 1699020827334845 1698883200 \n", + "3 0.0 273.9 1699020827334845 1698883200 \n", + "4 0.0 262.3 1699020827334845 1698883200 \n", + " index cumulative_energy_gen_Wh instantaneous_power_gen_W \\\n", + "0 2023-08-01 14:45:00 7900.0 1354.0 \n", + "1 2023-08-01 15:00:00 8300.0 1391.0 \n", + "2 2023-08-01 15:10:00 8500.0 1340.0 \n", + "3 2023-08-01 15:20:00 8700.0 1725.0 \n", + "4 2023-08-01 15:30:00 8900.0 671.0 \n", + "\n", + " temperature_C voltage datetime_of_API_request query_date \n", + "0 0.0 269.2 1699020827334845 1698883200 \n", + "1 0.0 278.2 1699020827334845 1698883200 \n", + "2 0.0 275.2 1699020827334845 1698883200 \n", + "3 0.0 273.9 1699020827334845 1698883200 \n", + "4 0.0 262.3 1699020827334845 1698883200 \n", + "[{'System ID': '14351', 'Start': Timestamp('2021-07-22 16:20:00'), 'Finish': Timestamp('2021-07-22 17:00:00')}, {'System ID': '49660', 'Start': Timestamp('2017-11-03 07:20:00'), 'Finish': Timestamp('2017-12-07 22:00:00')}, {'System ID': '56151', 'Start': Timestamp('2017-12-22 12:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '56709', 'Start': Timestamp('2018-01-23 17:20:00'), 'Finish': Timestamp('2021-09-10 12:45:00')}, {'System ID': '58780', 'Start': Timestamp('2018-05-01 04:00:00'), 'Finish': Timestamp('2021-11-03 13:30:00')}, {'System ID': '59687', 'Start': Timestamp('2018-06-08 07:55:00'), 'Finish': Timestamp('2023-11-02 20:40:00')}, {'System ID': '59710', 'Start': Timestamp('2018-06-26 06:15:00'), 'Finish': Timestamp('2019-09-21 19:00:00')}, {'System ID': '60294', 'Start': Timestamp('2019-10-10 07:10:00'), 'Finish': Timestamp('2023-11-02 18:20:00')}, {'System ID': '60602', 'Start': Timestamp('2018-08-06 05:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '60673', 'Start': Timestamp('2018-08-07 18:15:00'), 'Finish': Timestamp('2019-02-27 14:00:00')}, {'System ID': '66634', 'Start': Timestamp('2019-04-21 15:05:00'), 'Finish': Timestamp('2023-11-02 18:25:00')}, {'System ID': '67861', 'Start': Timestamp('2019-06-09 05:50:00'), 'Finish': Timestamp('2019-06-15 21:45:00')}, {'System ID': '71120', 'Start': Timestamp('2019-11-04 05:45:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '72742', 'Start': Timestamp('2020-08-28 15:15:00'), 'Finish': Timestamp('2023-11-02 17:55:00')}, {'System ID': '73347', 'Start': Timestamp('2020-02-07 06:40:00'), 'Finish': Timestamp('2023-11-02 17:40:00')}, {'System ID': '77684', 'Start': Timestamp('2020-09-20 08:30:00'), 'Finish': Timestamp('2020-12-11 14:10:00')}, {'System ID': '77710', 'Start': Timestamp('2020-07-28 08:05:00'), 'Finish': Timestamp('2020-11-27 13:05:00')}, {'System ID': '78186', 'Start': Timestamp('2020-08-22 15:55:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '79612', 'Start': Timestamp('2020-10-29 12:05:00'), 'Finish': Timestamp('2020-11-27 13:20:00')}, {'System ID': '81408', 'Start': Timestamp('2021-01-19 08:25:00'), 'Finish': Timestamp('2023-11-02 19:35:00')}, {'System ID': '82081', 'Start': Timestamp('2021-02-21 06:00:00'), 'Finish': Timestamp('2022-09-24 22:00:00')}, {'System ID': '85738', 'Start': Timestamp('2021-08-24 18:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '86244', 'Start': Timestamp('2021-09-23 11:05:00'), 'Finish': Timestamp('2021-10-24 08:40:00')}, {'System ID': '87410', 'Start': Timestamp('2022-08-01 06:00:00'), 'Finish': Timestamp('2023-11-02 19:45:00')}, {'System ID': '90559', 'Start': Timestamp('2022-08-01 06:25:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '91554', 'Start': Timestamp('2022-08-01 06:30:00'), 'Finish': Timestamp('2023-11-02 18:05:00')}, {'System ID': '97094', 'Start': Timestamp('2023-02-24 07:50:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '99833', 'Start': Timestamp('2023-06-24 08:20:00'), 'Finish': Timestamp('2023-11-02 22:00:00')}, {'System ID': '100451', 'Start': Timestamp('2023-08-01 14:45:00'), 'Finish': Timestamp('2023-11-02 18:00:00')}]\n" + ] + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "alignmentgroup": "True", + "base": [ + "2021-07-22T16:20:00", + "2017-11-03T07:20:00", + "2017-12-22T12:25:00", + "2018-01-23T17:20:00", + "2018-05-01T04:00:00", + "2018-06-08T07:55:00", + "2018-06-26T06:15:00", + "2019-10-10T07:10:00", + "2018-08-06T05:50:00", + "2018-08-07T18:15:00", + "2019-04-21T15:05:00", + "2019-06-09T05:50:00", + "2019-11-04T05:45:00", + "2020-08-28T15:15:00", + "2020-02-07T06:40:00", + "2020-09-20T08:30:00", + "2020-07-28T08:05:00", + "2020-08-22T15:55:00", + "2020-10-29T12:05:00", + "2021-01-19T08:25:00", + "2021-02-21T06:00:00", + "2021-08-24T18:25:00", + "2021-09-23T11:05:00", + "2022-08-01T06:00:00", + "2022-08-01T06:25:00", + "2022-08-01T06:30:00", + "2023-02-24T07:50:00", + "2023-06-24T08:20:00", + "2023-08-01T14:45:00" + ], + "hovertemplate": "Start=%{base}
Finish=%{x}
System ID=%{y}", + "legendgroup": "", + "marker": { + "color": "#636efa", + "pattern": { + "shape": "" + } + }, + "name": "", + "offsetgroup": "", + "orientation": "h", + "showlegend": false, + "textposition": "auto", + "type": "bar", + "x": [ + 2400000, + 2990400000, + 185016900000, + 114549900000, + 110799000000, + 170513100000, + 39098700000, + 128257800000, + 165427800000, + 17610300000, + 143090400000, + 575700000, + 126116100000, + 100320000000, + 117889200000, + 7105200000, + 10558800000, + 100850700000, + 2510100000, + 87909000000, + 50169600000, + 69132900000, + 2669700000, + 39620700000, + 39627300000, + 39612900000, + 21737400000, + 11367600000, + 8046900000 + ], + "xaxis": "x", + "y": [ + "14351", + "49660", + "56151", + "56709", + "58780", + "59687", + "59710", + "60294", + "60602", + "60673", + "66634", + "67861", + "71120", + "72742", + "73347", + "77684", + "77710", + "78186", + "79612", + "81408", + "82081", + "85738", + "86244", + "87410", + "90559", + "91554", + "97094", + "99833", + "100451" + ], + "yaxis": "y" + } + ], + "layout": { + "barmode": "overlay", + "legend": { + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "type": "date" + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "System ID" + } + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import h5py\n", + "\n", + "filename = \"file.hdf5\"\n", + "frames = []\n", + "systems_with_data = [\n", + " \"14351\",\n", + " \"49660\",\n", + " \"56151\",\n", + " \"56709\",\n", + " \"58780\",\n", + " \"59687\",\n", + " \"59710\",\n", + " \"60294\",\n", + " \"60602\",\n", + " \"60673\",\n", + " \"66634\",\n", + " \"67861\",\n", + " \"71120\",\n", + " \"72742\",\n", + " \"73347\",\n", + " \"77684\",\n", + " \"77710\",\n", + " \"78186\",\n", + " \"79612\",\n", + " \"81408\",\n", + " \"82081\",\n", + " \"85738\",\n", + " \"86244\",\n", + " \"87410\",\n", + " \"90559\",\n", + " \"91554\",\n", + " \"97094\",\n", + " \"99833\",\n", + " \"100451\",\n", + "]\n", + "\n", + "with h5py.File(output_filename, \"r\") as f:\n", + " for system_id in systems_with_data:\n", + " df = pd.DataFrame(np.array(f[\"timeseries\"][system_id][\"table\"]))\n", + " print(df.head())\n", + " df[\"index\"] = pd.to_datetime(df[\"index\"], unit=\"ns\")\n", + " dictionary = {} \n", + " dictionary[\"System ID\"] = system_id\n", + " dictionary[\"Start\"] = df[\"index\"][0]\n", + " dictionary[\"Finish\"] = df[\"index\"][len(df[\"index\"])-1]\n", + " frames.append(dictionary)\n", + " fig = px.timeline(frames, x_start=\"Start\", x_end=\"Finish\", y=\"System ID\")\n", + " fig.show()\n", + "\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "2023-11-13 15:57:39.582464\n", + " datetime instantaneous_power_gen_W z\n", + "0 2021-07-22 16:20:00 89.0 1.0\n", + "1 2021-07-22 16:25:00 90.0 1.0\n", + "2 2021-07-22 16:30:00 89.0 1.0\n", + "3 2021-07-22 16:35:00 89.0 1.0\n", + "4 2021-07-22 16:40:00 0.0 NaN\n" + ] + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "hovertemplate": "datetime=%{x}
instantaneous_power_gen_W=%{y}", + "legendgroup": "", + "line": { + "color": "#636efa", + "dash": "solid" + }, + "marker": { + "symbol": "circle" + }, + "mode": "lines", + "name": "", + "orientation": "v", + "showlegend": false, + "type": "scatter", + "x": [ + "2021-07-22T16:20:00", + "2021-07-22T16:25:00", + "2021-07-22T16:30:00", + "2021-07-22T16:35:00", + "2021-07-22T16:40:00", + "2021-07-22T16:45:00", + "2021-07-22T16:50:00", + "2021-07-22T16:55:00", + "2021-07-22T17:00:00" + ], + "xaxis": "x", + "y": [ + 89, + 90, + 89, + 89, + 0, + 0, + 0, + 0, + 0 + ], + "yaxis": "y" + } + ], + "layout": { + "legend": { + "tracegroupgap": 0 + }, + "margin": { + "t": 60 + }, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 1 + ], + "title": { + "text": "datetime" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "instantaneous_power_gen_W" + } + } + } + } + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# PLOTLY EXAMPLE OF HEATMAP\n", + "import plotly.graph_objects as go\n", + "import datetime\n", + "import numpy as np\n", + "\n", + "system_ids = [\n", + " \"14351\",\n", + "]\n", + "\n", + "base = datetime.datetime.today()\n", + "print(base)\n", + "dates = base - np.arange(365) * datetime.timedelta(days=1)\n", + "\n", + "with h5py.File(output_filename, \"r\") as f:\n", + " df = pd.DataFrame(np.array(f[\"timeseries\"][\"14351\"][\"table\"]))\n", + " df[\"index\"]= pd.to_datetime(df[\"index\"], unit=\"ns\")\n", + " df.rename(columns={\"index\": \"datetime\"}, inplace=True)\n", + " df[\"z\"] = (df[\"instantaneous_power_gen_W\"]/df[\"instantaneous_power_gen_W\"]).astype(float)\n", + " df = df[[\"datetime\", \"instantaneous_power_gen_W\", \"z\"]]\n", + " print(df.head())\n", + "\n", + " fig = px.line(df, x=\"datetime\", y=\"instantaneous_power_gen_W\")\n", + " fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "frames = []\n", + "systems_with_no_data = []\n", + "file = \"../examples/pv_data/PVOutput_India_systems.csv\"\n", + "data = pd.read_csv(file)\n", + "df = pd.DataFrame(data, columns=[\"system_id\"])\n", + "if \"system_id\" in df.columns:\n", + " system_ids = df[\"system_id\"].values.astype(str).tolist()\n", + " print(system_ids)\n", + "\n", + "with pd.HDFStore(output_filename, mode=\"r\", complevel=9) as store:\n", + " for system_id in system_ids:\n", + " if \"/timeseries/\" + system_id in store.keys():\n", + " df = store.get(key=\"/timeseries/\" + system_id)\n", + " # plot heatmap\n", + " frames.append(df)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "pvoutput-venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +}