Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/#276 improve simple example #292

Open
wants to merge 94 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
402090e
Implemented function resample_timeseries(self, method) to resample ti…
maike93he Jul 21, 2022
4928a8f
Merge branch 'dev' into feature/#260-resample-time-series
khelfen Jul 28, 2022
47d8ce8
added emob example skeleton
khelfen Jul 28, 2022
d3345df
Extended simple_emob_example for mobi workshop
maike93he Jul 29, 2022
f5f1227
Extended simple_emob_example for mobi workshop
maike93he Jul 29, 2022
8742aca
Added freq parameter
maike93he Jul 29, 2022
31b654f
Made changes to simple_emob_example
maike93he Jul 29, 2022
1d14b5d
Added input parameter and wrapper function for `resample_timeseries`
maike93he Jul 29, 2022
fc985af
Made changes to simple_emob_example
maike93he Jul 30, 2022
2334ac3
Added basic tests for function `resample_timeseries()`
maike93he Aug 2, 2022
d3d1355
Added downsampling
maike93he Aug 2, 2022
7979973
Merge branch 'dev' of github.com:openego/eDisGo into features/#276-im…
maike93he Aug 2, 2022
df05a94
Merge branch 'feature/#260-resample-time-series' into features/#276-i…
maike93he Aug 2, 2022
8bb2a48
Added tests for down-sampling method
maike93he Aug 2, 2022
f64809b
Merge branch 'feature/#260-resample-time-series' into features/#276-i…
maike93he Aug 2, 2022
c2dfb7b
Made changes to simple_emob_example
maike93he Aug 2, 2022
a1bf4db
Made minor changes to simple_emob_example
maike93he Aug 2, 2022
3c36a84
Added documentation and NotImplementedError
maike93he Aug 2, 2022
e2a2a30
Merge branch 'feature/#260-resample-time-series' into features/#276-i…
maike93he Aug 2, 2022
1438ae5
Added data for MV grid 2095
maike93he Aug 2, 2022
287a96a
added more description and plots to emob example
khelfen Aug 3, 2022
2c85a47
added more simbev profiles
khelfen Aug 3, 2022
27c926e
Replaced ding0 test grid 2 and 3 by smaller test grid (2095)
maike93he Aug 10, 2022
275eb3e
Merge branch 'features/#276-improve-simple-example' of github.com:ope…
maike93he Aug 10, 2022
1c3d13a
Replaced ding0_test_grid_2 by ding0_test_grid_4 in edisgo_simple_exam…
maike93he Aug 10, 2022
5230ebf
Replaced ding0_test_grid_2 by ding0_test_grid_4 in test_electromobili…
maike93he Aug 11, 2022
07ce109
Update usage_details.rst
maike93he Aug 16, 2022
012101a
Update features_in_detail.rst
maike93he Aug 16, 2022
0caf1fa
Update usage_details.rst
maike93he Aug 16, 2022
5b4c609
Update features_in_detail.rst
maike93he Aug 16, 2022
6795d99
Update usage_details.rst
maike93he Aug 16, 2022
6a15a67
Added more EMob tests and restructured EMob tests
maike93he Aug 16, 2022
a84747d
Added more EMob tests
maike93he Aug 16, 2022
7e8040a
Update usage_details.rst
maike93he Aug 22, 2022
3d00b47
Added doc and made changes to edisgo_simple_example.ipynb
maike93he Aug 22, 2022
204eae0
Merge branch 'features/#276-improve-simple-example' of github.com:ope…
maike93he Aug 22, 2022
0778ddd
Create examples.rst
maike93he Aug 23, 2022
3198b27
Merge branch 'dev' into features/#261-emob-tests
birgits Sep 8, 2022
1a0f9bc
Minor documentation changes and fixes
birgits Sep 8, 2022
21a53eb
Don't show jupyter notebook outputs
birgits Sep 8, 2022
07e8e80
Include automatic grid download again
birgits Sep 8, 2022
c1bad07
Minor notebook change
birgits Sep 8, 2022
b2d3e3d
Remove toc
birgits Sep 9, 2022
7b95708
Bug fix in dash plot
birgits Sep 9, 2022
5022048
Use path join
birgits Sep 9, 2022
3598909
Add missing import
birgits Sep 9, 2022
5d01993
Minor changes
birgits Sep 9, 2022
2167a9f
Revise emob example notebook
birgits Sep 9, 2022
35d7306
Minor change
birgits Sep 9, 2022
6401c63
Minor changes in tests
birgits Sep 9, 2022
50e2f93
Rename notebook
birgits Sep 9, 2022
dec9e02
Add test for electromobility notebook
birgits Sep 9, 2022
b302be3
Add notebook link to documentation
birgits Sep 9, 2022
56278ed
Fix test name
birgits Sep 9, 2022
3f7f760
Fix installation instruction
birgits Sep 9, 2022
1db13a4
Run pre-commit hooks
birgits Sep 9, 2022
3cdd70c
Delete cell evaluation in notebooks
birgits Sep 9, 2022
5d8d459
Merge branch 'features/#261-emob-tests' into features/#276-improve-si…
birgits Sep 9, 2022
1e75dbc
Delete old notebook
birgits Sep 9, 2022
9270513
Fix LV cables table in documentation
birgits Sep 10, 2022
7cfc3df
Update plot example in documentation
birgits Sep 10, 2022
c16abcf
Add analyze after grid reinforcement to have all time steps included …
birgits Sep 10, 2022
4e76e6d
Bug fix in dash plot
birgits Sep 10, 2022
23d3fc8
Add nbsphinx to requirements
birgits Sep 11, 2022
7767710
Change plots in simple example
birgits Sep 11, 2022
9a3b5cc
Remove unnecessary imports
birgits Sep 11, 2022
748839c
Fix grid download path
birgits Sep 11, 2022
b12b334
Minor adaptation to config explanation
birgits Sep 11, 2022
f8c5c01
Change sections
birgits Sep 11, 2022
b275731
Minor doc change
birgits Sep 11, 2022
bf7430a
Fix adding examples to documentation
birgits Sep 11, 2022
75e65a9
Fix example doc
birgits Sep 11, 2022
f8b2286
Merge branch 'dev' into features/#276-improve-simple-example
birgits Sep 14, 2022
01eef8c
Update rtd_requirements.txt
maike93he Sep 21, 2022
6a1cc07
Update rtd_requirements.txt
maike93he Sep 21, 2022
5b5b050
Update rtd_requirements.txt
maike93he Sep 21, 2022
2326a99
Update rtd_requirements.txt
maike93he Sep 22, 2022
f889a76
Update examples.rst
maike93he Sep 22, 2022
c275d5a
Update examples.rst
maike93he Sep 22, 2022
c10029b
Update examples.rst
maike93he Sep 22, 2022
866c7c5
Update rtd_requirements.txt
maike93he Sep 22, 2022
7d7c22e
Added section in simple example notebook that explains EDisGo.save() …
maike93he Sep 22, 2022
d1e0d9c
Merge branch 'features/#276-improve-simple-example' of github.com:ope…
maike93he Sep 22, 2022
83a450b
Made minor changes to plots example notebook
maike93he Sep 22, 2022
6a55150
Adjusted rtd_requirements
maike93he Sep 26, 2022
1bf7cf7
Added simple example notebook to test_examples.py
maike93he Sep 26, 2022
03029f0
Changed link for ding0 grid download in electromobility notebook
maike93he Sep 26, 2022
b92a24a
Changed link for ding0 grid download in simple example notebook
maike93he Sep 26, 2022
82e7dbc
Update examples.rst
maike93he Sep 26, 2022
6498bd7
Merge branch 'dev' into features/#276-improve-simple-example
maike93he Sep 27, 2022
7233573
Changed number of config files in test_config_setter to 6
maike93he Sep 27, 2022
69f1d3c
Changed number of config files in test_edisgo to 5
maike93he Sep 27, 2022
b0a433b
Added nbsphinx to rtd requirements and made changes to simple example…
maike93he Sep 28, 2022
26e089e
Changed cost plot and description for to_csv/save function in simple …
maike93he Sep 29, 2022
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
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"sphinx.ext.napoleon", # enable Napoleon Sphinx v>1.3
"sphinx.ext.extlinks", # enables external links with a key
"sphinx_autodoc_typehints",
"nbsphinx",
]

# Napoleon settings
Expand Down
17 changes: 17 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _examples_section_label:

#############
Examples
#############

This section provides examples on how to use the eDisGo package.
It includes a `basic example <https://github.com/openego/eDisGo/blob/dev/examples/edisgo_simple_example.ipynb>`_,
an `electromobility example <https://github.com/openego/eDisGo/blob/dev/examples/electromobility_example.ipynb>`_
and a `plot example <https://github.com/openego/eDisGo/blob/dev/examples/plot_example.ipynb>`_.

.. toctree::
:maxdepth: 2
:glob:

notebooks/edisgo_simple_example.ipynb
notebooks/plot_example.ipynb
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ Contents
:maxdepth: 2

quickstart
examples
usage_details
features_in_detail
dev_notes
Expand Down
1 change: 1 addition & 0 deletions doc/notebooks/edisgo_simple_example.ipynb
1 change: 1 addition & 0 deletions doc/notebooks/plot_example.ipynb
14 changes: 12 additions & 2 deletions doc/usage_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,6 @@ curtailment requirements. It uses the EDisGo object from above.
Plots
----------------

.. todo:: Add plotly plot option

EDisGo provides a bunch of predefined plots to e.g. plot the MV grid topology,
line loading and node voltages in the MV grid or as a histograms.

Expand All @@ -567,6 +565,18 @@ line loading and node voltages in the MV grid or as a histograms.
# plot grid expansion costs for lines in the MV grid and stations on a map
edisgo.plot_mv_grid_expansion_costs()

# draw a plotly html figure showing relative loading and voltage deviation
# in the MV grid
from edisgo.tools.plots import draw_plotly
draw_plotly(
edisgo=edisgo,
line_color="relative_loading",
node_color="voltage_deviation",
)

# dash plot allowing to interactively toggle between different plotting options
plot_dash(edisgo_objects=edisgo)

# plot voltage histogram
edisgo.histogram_voltage()

Expand Down
20 changes: 20 additions & 0 deletions edisgo/io/electromobility_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,26 @@ def distribute_charging_demand(edisgo_obj, **kwargs):
"""
Distribute charging demand from SimBEV onto potential charging parks from TracBEV.

The allocation of the charging processes
to the charging infrastructure is carried out with the help of the weighting factor
of the potential charging parks determined by TracBEV. This involves a random and
weighted selection of one charging park per charging process. In the case of private
charging infrastructure, a separate charging point is set up for each EV. All
charging processes of the respective EV and charging use case are assigned to this
charging point. The allocation of private charging processes to charging stations
is implemented in
:py:func:`~edisgo.io.electromobility_import.distribute_private_charging_demand`.

For the public charging infrastructure, the allocation is made explicitly per
charging process. For each charging process it is determined whether a suitable
charging point is already available. For this purpose it is checked if the charging
point is occupied by another EV in the corresponding period and whether it can
provide the corresponding charging capacity. If no suitable charging point is
available, a charging point is determined randomly and weighted in the same way as
for private charging. The allocation of public charging processes to charging
stations is implemented in
:py:func:`~edisgo.io.electromobility_import.distribute_public_charging_demand`.

Parameters
----------
edisgo_obj : :class:`~.EDisGo`
Expand Down
20 changes: 10 additions & 10 deletions edisgo/tools/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,10 +919,10 @@ def plot_plotly(
edisgo_obj : :class:`~.EDisGo`
Selected edisgo_obj to get plotting information from.

grid : :class:`~.network.grids.Grid`
grid : :class:`~.network.grids.Grid`, optional
Grid to plot. If None, the MVGrid of the edisgo_obj is plotted. Default: None.

line_color : str or None
line_color : str or None, optional
Defines whereby to choose line colors. Possible options are:

* 'loading'
Expand All @@ -934,7 +934,7 @@ def plot_plotly(
* None
Line color is black. This is also the fallback, in case other options fail.

node_color : str or None
node_color : str or None, optional
Defines whereby to choose node colors. Possible options are:

* 'adjacencies'
Expand All @@ -945,15 +945,15 @@ def plot_plotly(
* None
Line color is black. This is also the fallback, in case other options fail.

line_result_selection : str
line_result_selection : str, optional
Defines which values are shown for the load of the lines:

* 'min'
Minimal line load of all time steps.
* 'max' (default)
Maximal line load of all time steps.

node_result_selection : str
node_result_selection : str, optional
Defines which values are shown for the voltage of the nodes:

* 'min'
Expand All @@ -962,7 +962,7 @@ def plot_plotly(
Maximal node voltage of all time steps.

selected_timesteps : :pandas:`pandas.Timestamp<Timestamp>` or \
list(:pandas:`pandas.Timestamp<Timestamp>`) or None
list(:pandas:`pandas.Timestamp<Timestamp>`) or None, optional
Selected time steps to show results for.

* None (default)
Expand All @@ -971,15 +971,15 @@ def plot_plotly(
:pandas:`pandas.Timestamp<Timestamp>`
Selected time steps are used.

center_coordinates : bool
center_coordinates : bool, optional
Enables the centering of the coordinates. If True the transformer node is set
to the coordinates x=0 and y=0. Else, the coordinates from the HV/MV-station
of the MV grid are used. Default: False.

pseudo_coordinates : bool
pseudo_coordinates : bool, optional
Enable pseudo coordinates for the plotted grid. Default: False.

node_selection : bool or list(str)
node_selection : bool or list(str), optional
Only plot selected nodes. Default: False.

Returns
Expand Down Expand Up @@ -1482,7 +1482,7 @@ def plot_dash_app(
objects pass a dictionary with the eDisGo objects as values and the respective
eDisGo object names as keys.

debug : bool
debug : bool, optional
Debugging for the dash app:

* False (default)
Expand Down
Loading