{
"cells": [
{
"cell_type": "markdown",
"id": "908a7529-521d-4e66-a19f-9e762a35b733",
"metadata": {},
"source": [
"## Included locations"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "a0ab2186-9b34-4e8b-bfe1-e0e69f8f1c68",
"metadata": {},
"outputs": [],
"source": [
"from optiwindnet.importer import load_repository\n",
"from optiwindnet.svg import svgplot"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "3b0adb4e-812c-4667-bf4f-bfb61873d9d7",
"metadata": {},
"outputs": [],
"source": [
"from optiwindnet.plotting import gplot"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "871233dc-3529-48c9-b4f2-588363b18109",
"metadata": {},
"outputs": [],
"source": [
"%config InlineBackend.figure_formats = ['svg']"
]
},
{
"cell_type": "markdown",
"id": "d411d942-c797-479a-9458-88b4a9bb05fa",
"metadata": {},
"source": [
"`load_repository()` reads the `.osm.pbf` and `.yaml` locations distributed with **optiwindnet** into a *namedtuple* of *networkx* graphs containing location data."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "aa55f6ee-013f-4ee0-a7c5-6879e4beb9ef",
"metadata": {},
"outputs": [],
"source": [
"locations = load_repository()"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "8da36249-3943-4460-ac67-9a9785edad85",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(91,\n",
" 'anholt, borkum, borkum2, borssele, butendiek, cazzaro_2022, cazzaro_2022G140, cazzaro_2022G210, dantysk, doggerA, dudgeon, anglia, gode, gabbin, gwynt, horns, horns2, horns3, hornsea, hornsea2w, london, morayeast, moraywest, ormonde, race, rampion, rødsand2, sofia, taylor_2023, thanet, triton, walney1, walney2, walneyext, sands, yi_2019, albatros, amrumbank, arkona, baltic2, eagle, bard, beatrice, belwind, nanpeng, rudongdemo, bucht, fecamp, galloper, gemini1, gemini2, glotech1, hohesee, kustzuid, humber, kaskasi, kfA, kfB, bodhi, lillgrund, lincs, luchterduinen, meerwind, merkur, mermaid, neart, nordsee, nordseeost, norther, northwind, nysted, amalia, rental, riffgat, robin, rudongH10, rudongH6, rudongH8, brieuc, nazaire, sandbank, seagreen, shengsi2, sheringham, binhainorthH2, triborkum, vejamate, vineyard, rough, wikinger, jiaxing1')"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(locations), ', '.join(locations._fields)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "30f8a4fe-c38f-4591-a215-584ba4b263bd",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"networkx.classes.graph.Graph"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(locations.sands)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "75bbe9dd-7a0b-4f2f-9be5-ca6db9ea8a8f",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
],
"text/plain": [
""
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"svgplot(locations.sands)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "ddb00c3e-38ba-4837-9b37-ac808bb74dce",
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\n",
"\n",
"\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"gplot(locations.sands, node_tag='label');"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "5232deec-f379-4f12-bad2-9134d6000a66",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"anholt : Anholt -> 1 , 111\n",
"borkum : Borkum Riffgrund 1 -> 1 , 78\n",
"borkum2 : Borkum Riffgrund 2 -> 1 , 52\n",
"borssele : Borssele -> 2 , 173\n",
"butendiek : Butendiek -> 1 , 80\n",
"cazzaro_2022 : Cazzaro-2022 -> 1 , 50\n",
"cazzaro_2022G140 : Cazzaro-2022G-140 -> 3 , 140\n",
"cazzaro_2022G210 : Cazzaro-2022G-210 -> 3 , 210\n",
"dantysk : DanTysk -> 1 , 80\n",
"doggerA : Dogger Bank A -> 1 , 95\n",
"dudgeon : Dudgeon -> 1 , 67\n",
"anglia : East Anglia ONE -> 1 , 102\n",
"gode : Gode Wind 1 -> 1 , 55\n",
"gabbin : Greater Gabbard Inner -> 1 , 102\n",
"gwynt : Gwynt y Mor -> 2 , 160\n",
"horns : Horns Rev 1 -> 1 , 80\n",
"horns2 : Horns Rev 2 -> 1 , 91\n",
"horns3 : Horns Rev 3 -> 1 , 49\n",
"hornsea : Hornsea One -> 3 , 174\n",
"hornsea2w : Hornsea Two West -> 1 , 110\n",
"london : London Array -> 2 , 175\n",
"morayeast : Moray East -> 3 , 100\n",
"moraywest : Moray West -> 2 , 60\n",
"ormonde : Ormonde -> 1 , 30\n",
"race : Race Bank -> 2 , 91\n",
"rampion : Rampion -> 1 , 116\n",
"rødsand2 : Rødsand 2 -> 1 , 90\n",
"sofia : Sofia -> 1 , 100\n",
"taylor_2023 : Taylor-2023 -> 2 , 122\n",
"thanet : Thanet -> 1 , 100\n",
"triton : Triton Knoll -> 2 , 90\n",
"walney1 : Walney 1 -> 1 , 51\n",
"walney2 : Walney 2 -> 1 , 51\n",
"walneyext : Walney Extension -> 2 , 87\n",
"sands : West of Duddon Sands -> 1 , 108\n",
"yi_2019 : Yi-2019 -> 2 , 119\n",
"albatros : Albatros -> 1 , 16\n",
"amrumbank : Amrumbank West -> 1 , 80\n",
"arkona : Arkona -> 1 , 60\n",
"baltic2 : Baltic 2 -> 1 , 80\n",
"eagle : Baltic Eagle -> 1 , 50\n",
"bard : BARD Offshore 1 -> 1 , 80\n",
"beatrice : Beatrice -> 2 , 84\n",
"belwind : Belwind -> 1 , 55\n",
"nanpeng : CECEP Yangjiang Nanpeng Island -> 1 , 55\n",
"rudongdemo : CGN Rudong Demonstration -> 1 , 38\n",
"bucht : Deutsche Bucht -> 1 , 31\n",
"fecamp : Fecamp -> 1 , 71\n",
"galloper : Galloper Inner -> 1 , 38\n",
"gemini1 : Gemini 1 -> 1 , 75\n",
"gemini2 : Gemini 2 -> 1 , 75\n",
"glotech1 : Global Tech 1 -> 1 , 80\n",
"hohesee : Hohe See -> 1 , 71\n",
"kustzuid : Hollandse Kust Zuid -> 2 , 139\n",
"humber : Humber Gateway -> 1 , 73\n",
"kaskasi : Kaskasi -> 1 , 38\n",
"kfA : Kriegers Flak A -> 1 , 24\n",
"kfB : Kriegers Flak B -> 1 , 48\n",
"bodhi : Laoting Bodhi Island -> 1 , 75\n",
"lillgrund : Lillgrund -> 1 , 48\n",
"lincs : Lincs -> 1 , 75\n",
"luchterduinen : Luchterduinen -> 1 , 43\n",
"meerwind : Meerwind -> 1 , 80\n",
"merkur : Merkur -> 1 , 66\n",
"mermaid : Mermaid -> 1 , 27\n",
"neart : Neart na Gaoithe -> 2 , 54\n",
"nordsee : Nordsee One -> 1 , 54\n",
"nordseeost : Nordsee Ost -> 1 , 48\n",
"norther : Norther -> 1 , 44\n",
"northwind : Northwind -> 1 , 72\n",
"nysted : Nysted -> 1 , 72\n",
"amalia : Princess Amalia -> 1 , 60\n",
"rental : Rentel -> 1 , 42\n",
"riffgat : Riffgat -> 1 , 30\n",
"robin : Robin Rigg -> 1 , 60\n",
"rudongH10 : Rudong H10 -> 1 , 100\n",
"rudongH6 : Rudong H6 -> 1 , 100\n",
"rudongH8 : Rudong H8 -> 1 , 65\n",
"brieuc : Saint-Brieuc -> 1 , 62\n",
"nazaire : Saint-Nazaire -> 1 , 80\n",
"sandbank : Sandbank -> 1 , 72\n",
"seagreen : Seagreen -> 1 , 114\n",
"shengsi2 : Shengsi 2 -> 1 , 63\n",
"sheringham : Sheringham Shoal -> 2 , 88\n",
"binhainorthH2 : SPIC Binhai North H2 -> 1 , 100\n",
"triborkum : Trianel Windpark Borkum -> 1 , 72\n",
"vejamate : Veja Mate -> 1 , 67\n",
"vineyard : Vineyard Wind 1 -> 1 , 62\n",
"rough : Westermost Rough -> 1 , 35\n",
"wikinger : Wikinger -> 1 , 70\n",
"jiaxing1 : Zhejiang Jiaxing 1 -> 1 , 74\n"
]
}
],
"source": [
"for L in locations:\n",
" print(L.graph['handle'], ':', L.graph['name'], '->',\n",
" L.graph['R'], ',', L.graph['T'])"
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 5
}