aa5d4b0c90
for more information, see https://pre-commit.ci
123 lines
2.6 KiB
Plaintext
123 lines
2.6 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from entsoe import EntsoePandasClient\n",
|
|
"import pandas as pd"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"api_key = \"\""
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"client = EntsoePandasClient(api_key=api_key)\n",
|
|
"\n",
|
|
"start = pd.Timestamp(\"20190101\", tz=\"Europe/Brussels\")\n",
|
|
"end = pd.Timestamp(\"20190102\", tz=\"Europe/Brussels\")\n",
|
|
"\n",
|
|
"countries = [\n",
|
|
" \"AL\",\n",
|
|
" \"AT\",\n",
|
|
" \"BA\",\n",
|
|
" \"BE\",\n",
|
|
" \"BG\",\n",
|
|
" \"CH\",\n",
|
|
" \"CZ\",\n",
|
|
" \"DE\",\n",
|
|
" \"DK\",\n",
|
|
" \"EE\",\n",
|
|
" \"ES\",\n",
|
|
" \"FI\",\n",
|
|
" \"FR\",\n",
|
|
" \"GB\",\n",
|
|
" \"GR\",\n",
|
|
" \"HR\",\n",
|
|
" \"HU\",\n",
|
|
" \"IE\",\n",
|
|
" \"IT\",\n",
|
|
" \"LT\",\n",
|
|
" \"LU\",\n",
|
|
" \"LV\",\n",
|
|
" \"ME\",\n",
|
|
" \"MK\",\n",
|
|
" \"NL\",\n",
|
|
" \"NO\",\n",
|
|
" \"PL\",\n",
|
|
" \"PT\",\n",
|
|
" \"RO\",\n",
|
|
" \"RS\",\n",
|
|
" \"SE\",\n",
|
|
" \"SI\",\n",
|
|
" \"SK\",\n",
|
|
"]"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"generation = []\n",
|
|
"for country in countries:\n",
|
|
" country_code = country\n",
|
|
" generation_country = client.query_generation(\n",
|
|
" country_code, start=start, end=end, psr_type=None\n",
|
|
" )\n",
|
|
" # generation.append(generation_country)\n",
|
|
" # day_ahead_prices_country = client.query_day_ahead_prices(country_code, start, end)\n",
|
|
"\n",
|
|
"# generation = pd.concat(generation, keys=countries, axis=1)\n",
|
|
"\n",
|
|
"# client.query_crossborder_flows(country_code_from, country_code_to, start, end)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"generation.resample(\"h\").mean()"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "",
|
|
"language": "python",
|
|
"name": ""
|
|
},
|
|
"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.11.0"
|
|
},
|
|
"orig_nbformat": 4
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|