Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions doc/tutorials/simple_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@
"metadata": {},
"outputs": [],
"source": [
"edisgo.plot_mv_grid_topology(technologies=True)"
"# Note: background_map=True (the default) fetches map tiles over the\n",
"# internet via contextily and can be slow or fail without connectivity.\n",
"# It is disabled here; set it to True if you have internet access and\n",
"# want a georeferenced background map.\n",
"edisgo.plot_mv_grid_topology(technologies=True, background_map=False)"
]
},
{
Expand Down Expand Up @@ -375,10 +379,12 @@
"metadata": {},
"outputs": [],
"source": [
"# Get single LV grid by providing its name or ID\n",
"lv_grid = edisgo.topology.get_lv_grid(\n",
" \"LVGrid_170173\"\n",
") # edisgo.topology.get_lv_grid(170173) yields the same"
"# Get single LV grid. Instead of hardcoding a grid name/ID (which may not\n",
"# exist or may be empty depending on the grid data used), we pick the LV\n",
"# grid with the most loads to reliably demonstrate the following cells.\n",
"lv_grid = max(\n",
" edisgo.topology.mv_grid.lv_grids, key=lambda lv_grid: len(lv_grid.loads_df)\n",
")"
]
},
{
Expand All @@ -404,7 +410,12 @@
{
"cell_type": "markdown",
"metadata": {},
"source": "A single grid's generators, loads, storage units and switches can also be\nretrieved as [Generator](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Generator.html) object,\n[Load](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Load.html) object, [Storage](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Storage.html) object, and\n[Switch](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Switch.html) objects, respecitvely:"
"source": [
"A single grid's generators, loads, storage units and switches can also be\n",
"retrieved as [Generator](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Generator.html) object,\n",
"[Load](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Load.html) object, [Storage](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Storage.html) object, and\n",
"[Switch](https://edisgo.readthedocs.io/en/dev/autoapi/edisgo/network/components/Switch.html) objects, respecitvely:"
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -496,8 +507,7 @@
"metadata": {},
"outputs": [],
"source": [
"# draw graph of one of the LV grids\n",
"lv_grid = list(edisgo.topology.mv_grid.lv_grids)[5]\n",
"# draw graph of the LV grid selected above\n",
"nx.draw(lv_grid.graph)"
]
},
Expand Down Expand Up @@ -557,7 +567,11 @@
"metadata": {},
"outputs": [],
"source": [
"edisgo.plot_mv_grid_topology(technologies=True)"
"# Note: background_map=True (the default) fetches map tiles over the\n",
"# internet via contextily and can be slow or fail without connectivity.\n",
"# It is disabled here; set it to True if you have internet access and\n",
"# want a georeferenced background map.\n",
"edisgo.plot_mv_grid_topology(technologies=True, background_map=False)"
]
},
{
Expand Down Expand Up @@ -905,4 +919,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
1 change: 1 addition & 0 deletions doc/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Changelog for each release.
:local:
:backlinks: top

.. include:: whatsnew/v0-3-1.rst
.. include:: whatsnew/v0-3-0.rst
.. include:: whatsnew/v0-2-1.rst
.. include:: whatsnew/v0-2-0.rst
Expand Down
12 changes: 12 additions & 0 deletions doc/whatsnew/v0-3-1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Release v0.3.1
================

Release date: <month> <day>, <year>

Changes
-------

* Fixed simple example notebook: disabled the background map on the MV grid topology
plots (fetching map tiles could take tens of minutes or fail without a fast
internet connection) and replaced a hardcoded LV grid selection that broke when
used with certain grid data `#276 <https://github.com/openego/eDisGo/issues/276>`_
25 changes: 17 additions & 8 deletions examples/edisgo_simple_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,11 @@
"metadata": {},
"outputs": [],
"source": [
"edisgo.plot_mv_grid_topology(technologies=True)"
"# Note: background_map=True (the default) fetches map tiles over the\n",
"# internet via contextily and can be slow or fail without connectivity.\n",
"# It is disabled here; set it to True if you have internet access and\n",
"# want a georeferenced background map.\n",
"edisgo.plot_mv_grid_topology(technologies=True, background_map=False)"
]
},
{
Expand Down Expand Up @@ -375,10 +379,12 @@
"metadata": {},
"outputs": [],
"source": [
"# Get single LV grid by providing its name or ID\n",
"lv_grid = edisgo.topology.get_lv_grid(\n",
" \"LVGrid_170173\"\n",
") # edisgo.topology.get_lv_grid(170173) yields the same"
"# Get single LV grid. Instead of hardcoding a grid name/ID (which may not\n",
"# exist or may be empty depending on the grid data used), we pick the LV\n",
"# grid with the most loads to reliably demonstrate the following cells.\n",
"lv_grid = max(\n",
" edisgo.topology.mv_grid.lv_grids, key=lambda lv_grid: len(lv_grid.loads_df)\n",
")"
]
},
{
Expand Down Expand Up @@ -501,8 +507,7 @@
"metadata": {},
"outputs": [],
"source": [
"# draw graph of one of the LV grids\n",
"lv_grid = list(edisgo.topology.mv_grid.lv_grids)[5]\n",
"# draw graph of the LV grid selected above\n",
"nx.draw(lv_grid.graph)"
]
},
Expand Down Expand Up @@ -562,7 +567,11 @@
"metadata": {},
"outputs": [],
"source": [
"edisgo.plot_mv_grid_topology(technologies=True)"
"# Note: background_map=True (the default) fetches map tiles over the\n",
"# internet via contextily and can be slow or fail without connectivity.\n",
"# It is disabled here; set it to True if you have internet access and\n",
"# want a georeferenced background map.\n",
"edisgo.plot_mv_grid_topology(technologies=True, background_map=False)"
]
},
{
Expand Down