Skip to content

Commit

Permalink
deploy: eb8ded0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Sep 22, 2024
0 parents commit b33a1d2
Show file tree
Hide file tree
Showing 112 changed files with 10,555 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a188b011f882c2d6f1055ea14894e72b
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/about.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/eel_dashboard/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/pybalmorel/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/pybalmorel/utils/index.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/examples.doctree
Binary file not shown.
Binary file added .doctrees/examples/geofilemaker.doctree
Binary file not shown.
Binary file added .doctrees/get_started.doctree
Binary file not shown.
Binary file added .doctrees/get_started/installation.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/geoset_generator_example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions _sources/about.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# About this code

This documentation is under construction
46 changes: 46 additions & 0 deletions _sources/autoapi/eel_dashboard/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
eel_dashboard
=============

.. py:module:: eel_dashboard
Functions
---------

.. autoapisummary::

eel_dashboard.get_wkdir
eel_dashboard.create_incfile
eel_dashboard.create_sets
eel_dashboard.create_CCCRRRAAA
eel_dashboard.create_setconnection
eel_dashboard.create_incfiles
eel_dashboard.interactive_geofilemaker


Module Contents
---------------

.. py:function:: get_wkdir()
.. py:function:: create_incfile(unique_processing)
The general wrapper for creating and saving .inc files,
because the creating of the IncFile class and saving it is the same everytime.
The unique processing of the .body content differs, however.

Args:
unique_processing (func): The unique processing per case
**incfile_kwargs: Keyword arguments to pass to IncFile

.. py:function:: create_sets(inc_file: pybalmorel.IncFile, geo_nodes_layer2: dict)
.. py:function:: create_CCCRRRAAA(inc_file: pybalmorel.IncFile, geo_nodes: dict)
.. py:function:: create_setconnection(inc_file: pybalmorel.IncFile, geo_nodes_layer1: dict)
.. py:function:: create_incfiles(output: str, path: str)
.. py:function:: interactive_geofilemaker()
12 changes: 12 additions & 0 deletions _sources/autoapi/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
API Reference
=============

This page contains auto-generated API reference documentation [#f1]_.

.. toctree::
:titlesonly:

/autoapi/pybalmorel/index
/autoapi/eel_dashboard/index

.. [#f1] Created with `sphinx-autoapi <https://github.com/readthedocs/sphinx-autoapi>`_
201 changes: 201 additions & 0 deletions _sources/autoapi/pybalmorel/classes/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
pybalmorel.classes
==================

.. py:module:: pybalmorel.classes
.. autoapi-nested-parse::

Created on 08.06.2024

@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling)



Classes
-------

.. autoapisummary::

pybalmorel.classes.MainResults
pybalmorel.classes.IncFile
pybalmorel.classes.Balmorel
pybalmorel.classes.GUI


Module Contents
---------------

.. py:class:: MainResults(files: Union[str, list, tuple], paths: Union[str, list, tuple] = '.', scenario_names: Union[str, list, tuple] = None, system_directory: str = None)
.. py:attribute:: files
.. py:attribute:: paths
.. py:attribute:: sc
.. py:attribute:: db
.. py:method:: get_result(symbol: str, cols: str = 'None') -> pandas.DataFrame
Get a certain result from the loaded gdx file(s) into a pandas DataFrame

Args:
symbol (str): The desired result, e.g. PRO_YCRAGF
cols (str, optional): Specify custom columns. Defaults to pre-defined formats.

Returns:
pd.DataFrame: The output DataFrame



.. py:method:: interactive_bar_chart()
GUI for bar chart plotting



.. py:method:: plot_profile(commodity: str, year: int, scenario: str = 0, columns: str = 'Technology', region: str = 'ALL', style: str = 'light') -> Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]
Plots the production profile of a commodity, in a year, for a certain scenario

Args:
commodity (str): The commodity (Electricity, Heat or Hydrogen)
year (int): The model year to plot
scenario (str, optional): Defaults to the first scenario in MainResults.
columns (str, optional): Technology or Fuel as . Defaults to 'Technology'.
region (str, optional): Which country, region or area to plot. Defaults to 'ALL'.
style (str, optional): Plot style, light or dark. Defaults to 'light'.

Returns:
Figure, Axes: The figure and axes objects for further manipulations



.. py:method:: plot_map(scenario: str, commodity: str, year: int, path_to_geofile: str = None, bypass_path: str = None, geo_file_region_column: str = 'id', style: str = 'light') -> Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]
Plots the transmission capacities in a scenario, of a certain commodity

Args:
path_to_result (str): Path to the .gdx file
scenario (str): The scenario name
commodity (str): Electricity or hydrogen
year (int): Model year
path_to_geofile (str, optional): The path to the fitting geofile. Defaults to '../geofiles/2024 BalmorelMap.geojson' in package directory.
bypass_path (str, optional): Extra coordinates for transmission lines for beauty. Defaults to '../geofiles/bypass_lines' in package directory.
geo_file_region_column (str, optional): The columns containing the region names of MainResults. Defaults to 'id'.
style (str, optional): Plot style. Defaults to 'light'.

Returns:
Tuple[Figure, Axes]: The figure and axes objects of the plot



.. py:method:: _existing_func_wrapper(function, *args, **kwargs)
.. py:class:: IncFile(prefix: str = '', body: str = '', suffix: str = '', name: str = 'name', path: str = 'Balmorel/base/data/')
A useful class for creating .inc-files for GAMS models
Args:
prefix (str): The first part of the .inc file.
body (str): The main part of the .inc file.
suffix (str): The last part of the .inc file.
name (str): The name of the .inc file.
path (str): The path to save the file, defaults to 'Balmorel/base/data'.


.. py:attribute:: prefix
.. py:attribute:: body
.. py:attribute:: suffix
.. py:attribute:: name
.. py:attribute:: path
.. py:method:: body_concat(df: pandas.DataFrame)
Concatenate a body temporarily being a dataframe to another dataframe




.. py:method:: body_prepare(index: list, columns: list, values: str = 'Value', aggfunc: str = 'sum', fill_value: Union[str, int] = '')
.. py:method:: save()
.. py:class:: Balmorel(model_folder: str, gams_system_directory: str = None)
A class that recognises the Balmorel folder structure, can be used to run scenarios or results

Args:
model_folder (str): The top level folder of Balmorel, where base and simex are located


.. py:attribute:: _gams_system_directory
.. py:attribute:: path
.. py:attribute:: scenarios
.. py:attribute:: input_data
.. py:method:: collect_results()
.. py:method:: run(scenario: str, cmd_line_options: dict = {})
.. py:method:: load_incfiles(scenario: str = 'base', use_provided_read_files: bool = True, read_file: str = 'Balmorel_ReadData')
Will load .inc files from the specific scenario

Args:
scenario (str, optional): The scenario that you . Defaults to 'base'.
use_provided_read_files (bool, optional): Use provided Balmorel_ReadData.gms and Balmorelbb4_ReadData.inc. Defaults to True.
read_file (str, optional): The name of the read file to be executed. Defaults to Balmorel_ReadData

Raises:
KeyError: _description_



.. py:class:: GUI
.. py:method:: bar_chart(MainResults_instance)
Interactive GUI to plot bar charts from MainResults

Args:
MainResults_instance (class): Loaded MainResults

Returns:
None: An interactive GUI is opened to plot bar charts



.. py:method:: geofilemaker()
Opens a GUI to interactively generate necessary .inc files for Balmorel geography

Returns:
None: An interactive GUI to generate geographic .inc files



41 changes: 41 additions & 0 deletions _sources/autoapi/pybalmorel/formatting/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pybalmorel.formatting
=====================

.. py:module:: pybalmorel.formatting
.. autoapi-nested-parse::

Created on 03.06.2024

@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling)



Attributes
----------

.. autoapisummary::

pybalmorel.formatting.tech_colours
pybalmorel.formatting.fuel_colours
pybalmorel.formatting.balmorel_colours
pybalmorel.formatting.mberos_colours
pybalmorel.formatting.mainresult_symbol_columns
pybalmorel.formatting.mainresults_symbol_columns


Module Contents
---------------

.. py:data:: tech_colours
.. py:data:: fuel_colours
.. py:data:: balmorel_colours
.. py:data:: mberos_colours
.. py:data:: mainresult_symbol_columns
.. py:data:: mainresults_symbol_columns
27 changes: 27 additions & 0 deletions _sources/autoapi/pybalmorel/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pybalmorel
==========

.. py:module:: pybalmorel
Subpackages
-----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/interactive/index
/autoapi/pybalmorel/plotting/index


Submodules
----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/classes/index
/autoapi/pybalmorel/formatting/index
/autoapi/pybalmorel/utils/index


15 changes: 15 additions & 0 deletions _sources/autoapi/pybalmorel/interactive/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
pybalmorel.interactive
======================

.. py:module:: pybalmorel.interactive
Submodules
----------

.. toctree::
:maxdepth: 1

/autoapi/pybalmorel/interactive/interactive_functions/index


Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pybalmorel.interactive.interactive_functions
============================================

.. py:module:: pybalmorel.interactive.interactive_functions
Functions
---------

.. autoapisummary::

pybalmorel.interactive.interactive_functions.interactive_bar_chart


Module Contents
---------------

.. py:function:: interactive_bar_chart(MainResults_instance)
GUI for bar chart plotting

MainResults_instance (MainResults): Takes an instance of the MainResults class and opens a GUI for plotting


Loading

0 comments on commit b33a1d2

Please sign in to comment.