Skip to content

Commit 86e87fb

Browse files
authored
extends the widget demo: includes a network with geo data to be displayed in the map (#27)
Signed-off-by: Christian Biasuzzi <christian.biasuzzi@soft.it>
1 parent 97a42ca commit 86e87fb

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

pypowsybl_jupyter_widgets_demo.ipynb

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
},
8181
{
8282
"cell_type": "markdown",
83-
"id": "e550558b-452d-424f-b484-79ae60ec35bc",
83+
"id": "c5282ea3-1652-4d7f-81cf-36c2d3157dcf",
8484
"metadata": {
8585
"editable": true,
8686
"slideshow": {
@@ -92,7 +92,8 @@
9292
"Display the network explorer widget. \n",
9393
"* Click on a voltage level from the list to display its NAD and SLD in the two \"Network Area\" and \"Single Line\" tabs. \n",
9494
"* Both diagrams can be panned and zoomed.\n",
95-
"* The NAD is centered on the currently selected voltage level. A 'depth' slider controls the size of the sub-network."
95+
"* The NAD is centered on the currently selected voltage level. A 'depth' slider controls the size of the sub-network.\n",
96+
"* A third tab, \"Network map\" displays the network’s substations and lines on a map. The map is empty if the network does not contain any geographical data."
9697
]
9798
},
9899
{
@@ -128,6 +129,50 @@
128129
"source": [
129130
"network_explorer(n, vl_id='VL14', depth=4)"
130131
]
132+
},
133+
{
134+
"cell_type": "markdown",
135+
"id": "ba94b49a-979e-4c70-b66b-5c973556616d",
136+
"metadata": {
137+
"editable": true,
138+
"slideshow": {
139+
"slide_type": ""
140+
},
141+
"tags": []
142+
},
143+
"source": [
144+
"Load a network that contains geographical data, and display it with the network explorer widget, to demonstrate the \"Network map\" tab.\n",
145+
"* The optional nominal_voltages_top_tiers_filter parameter can be used to display in the map only the highest n nominal voltages (the default is -1, to display all the voltages).\n",
146+
"* In the map, a click on a substation displays a popup list with the substation's voltage levels. This list provides an additional way to navigate the widget to a specific voltage level."
147+
]
148+
},
149+
{
150+
"cell_type": "code",
151+
"execution_count": null,
152+
"id": "5467ab6f-8591-4b7c-a1e5-5b28953bd572",
153+
"metadata": {},
154+
"outputs": [],
155+
"source": [
156+
"microgrid_network = pp.network.load('./data/MicroGridTestConfiguration_T4_BE_BB_Complete_v2.zip', {'iidm.import.cgmes.post-processors': 'cgmesGLImport'})"
157+
]
158+
},
159+
{
160+
"cell_type": "code",
161+
"execution_count": null,
162+
"id": "87f6a143-6b95-47e6-b0f4-8e561b6f31a7",
163+
"metadata": {},
164+
"outputs": [],
165+
"source": [
166+
"network_explorer(microgrid_network, nominal_voltages_top_tiers_filter=3)"
167+
]
168+
},
169+
{
170+
"cell_type": "markdown",
171+
"id": "80f37582-ac8b-4140-83f0-e17eff0b7c95",
172+
"metadata": {},
173+
"source": [
174+
"Please visit the [pypowsybl-jupyter documentation](https://powsybl.readthedocs.io/projects/pypowsybl-jupyter/en/stable/) for detailed information about the widgets and their APIs."
175+
]
131176
}
132177
],
133178
"metadata": {

0 commit comments

Comments
 (0)