Skip to content

Commit

Permalink
deploy: 6354bca
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias157 committed Sep 20, 2024
0 parents commit e3fc3e7
Show file tree
Hide file tree
Showing 136 changed files with 16,682 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: fcdc215d0bedfc57a14a8d537aa21449
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/about.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/aauvarmeplan2021/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/clustering/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/createDE/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/createDH/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/createFLEXDEM/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/createHYDROGEN/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/createINDUSTRY/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/create_Demands/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/create_GKFX_DK/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/create_Grids/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/create_SetFiles/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/create_TechData/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/geofiles/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/get_grid/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/index.doctree
Binary file not shown.
Binary file added .doctrees/autoapi/main/index.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/plot_dag/index.doctree
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/autoapi/utils/index.doctree
Binary file not shown.
Binary file added .doctrees/chapter1.doctree
Binary file not shown.
Binary file added .doctrees/chapter1/section1.doctree
Binary file not shown.
Binary file added .doctrees/chapter1/section2.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
Binary file added _images/sankey-diagram.png
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
101 changes: 101 additions & 0 deletions _sources/autoapi/aauvarmeplan2021/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
aauvarmeplan2021
================

.. py:module:: aauvarmeplan2021
.. autoapi-nested-parse::

Pre-Processing of the Varmeplan 2021 dataset

Aalborg dataset, can be used to get individual and district heat gross supply:
https://vbn.aau.dk/da/datasets/kommunepakker-varmeplan-danmark-2021
- Note that heat demand should be combined wrt. the s1-s5 scenarios (sums to 53.95 TWh without heat efficiency investments)

Assumption for distribution of low-, mid- and high temperatures should probably come from:
Viegand Maagø and Energistyrelsen. ‘Kortlægning Af Energiforbrug Og Opgørelse Af Energisparepotentialer i Produktionserhvervene’, 2022.
See page 8:
- Omkring 45% af forbruget ligger ved temperaturer under 100 ºC – totalt 26.798 TJ/år
- Godt 40% ligger ved temperaturer over 200 ºC – totalt 23.774 TJ/år
- Resten, altså ca. 15%, ligger i intervallet 100 – 200 ºC eller derover
”, Viegand Maagø and Energistyrelsen, 2022, p. 8

One simple, first assumption could be to say that 40-55% is high temperature,
and use that amount of TJ to distribute the sum of TJ in the "over 80C" category
of Aalborg data into high and middle temperature (middle temperature is the remaining over 80C)
- E.g.:
- 59496 TJ/år in total
- 32723 TJ/år for >100 C (55%)
AAU data:
GJ_over_80 17.1217 % 3369.050427 TJ
GJ_60_80C 12.1648 % 2393.687324 TJ
GJ_under_6 70.7135 % 13914.38463 TJ
..doesn't really fit - maybe the assumption that surplus heat above 80C comes from high, 60-80C from mid and below 60C from low is good enough?
for that to be true:
- 17.1217 + 12.1648 = 29.2865
- 40 - 29.2865 = 10.7135
- 10.7135 / 0.7 = 15.305% of GJ_under_6 is high, plus 100% of GJ_60_80C and 100% of GJ_over_80
- 15% / 0.7 = 21.42857142857143 of GJ_under_6 is mid
- 45% / 0.7 = 64.28571428571429 of GJ_under_6 is low

Python package requirements:
- xlrd

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



Attributes
----------

.. autoapisummary::

aauvarmeplan2021.style
aauvarmeplan2021.fc
aauvarmeplan2021.data


Classes
-------

.. autoapisummary::

aauvarmeplan2021.VPDK21


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

.. py:data:: style
:value: 'report'


.. py:data:: fc
:value: 'white'


.. py:class:: VPDK21(scenario: str = 'SUM_GWh_uden_besp')
.. py:attribute:: files
.. py:attribute:: DH
.. py:attribute:: IND
.. py:attribute:: correct_names
.. py:attribute:: temp
.. py:attribute:: names
:value: ['year', 'municipality', 'user']



.. py:data:: data
64 changes: 64 additions & 0 deletions _sources/autoapi/clustering/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
clustering
==========

.. py:module:: clustering
.. autoapi-nested-parse::

TITLE

Description

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



Attributes
----------

.. autoapisummary::

clustering.cmap
clustering.style
clustering.fc
clustering.collected


Functions
---------

.. autoapisummary::

clustering.truncate_colormap
clustering.correct_VRE_data
clustering.convert_municipal_code_to_name
clustering.collect_clusterdata
clustering.cluster


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

.. py:data:: cmap
.. py:function:: truncate_colormap(cmap, minval=0.0, maxval=1.0, n=100)
.. py:data:: style
:value: 'ppt'


.. py:data:: fc
:value: 'white'


.. py:function:: correct_VRE_data(path_to_file, generation_name: str)
.. py:function:: convert_municipal_code_to_name(to_be_converted: pandas.DataFrame, column_to_convert: (str, int), pivot_table: bool = False, exclude_regions: list = ['Herlev', 'Christiansø'], muni_geofile_path: str = 'C:\\Users\\mberos\\gitRepos\\balmorel-preprocessing\\RawDataProcessing\\Data\\Shapefiles\\Denmark\\Adm\\gadm36_DNK_2.shp')
.. py:function:: collect_clusterdata(energinet_el: pandas.DataFrame, plot_cf: bool = False)
.. py:function:: cluster(con: Modules.Submodules.municipal_template.DataContainer, n_clusters: int, use_connectivity: bool = True, manual_corrections: list = [['Bornholm', 'Christiansø', 1], ['Bornholm', 'Dragør', 1], ['Esbjerg', 'Fanø', 1], ['Rødovre', 'Frederiksberg', 1], ['Slagelse', 'Nyborg', 0], ['Samsø', 'Kalundborg', 0]], connection_remark: str = 'connec. included + artifical', data_remark: str = 'all combined + xy coords')
.. py:data:: collected
71 changes: 71 additions & 0 deletions _sources/autoapi/createDE/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
createDE
========

.. py:module:: createDE
.. autoapi-nested-parse::

Create electricity demand profiles for Denmark
Use Energinet data for municipalities:
https://www.energidataservice.dk/tso-electricity/consumptionindustry
Convert LAU code to municipality name with:
LAU – NUTS 2021, EU-27 and EFTA / available candidate countries
https://ec.europa.eu/eurostat/web/nuts/local-administrative-units
Note: The dataset above also contains population

Created on 22.08.2024

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



Attributes
----------

.. autoapisummary::

createDE.cmap
createDE.style
createDE.fc


Functions
---------

.. autoapisummary::

createDE.convert_names
createDE.make_inc_file
createDE.main


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

.. py:data:: cmap
.. py:data:: style
:value: 'report'


.. py:data:: fc
:value: 'white'


.. py:function:: convert_names(conversion_file: str, el_dataset: str)
.. py:function:: make_inc_file(xarray: xarray.Dataset, data_variable: str, selection: Tuple[dict, None] = None, sets_to_sum: Tuple[str, list, None] = None)
.. py:function:: main(conversion_file: str, el_dataset: str, show_difference: bool = False)
Main function to process and convert dataset names, and create .inc files.
Args:
conversion_file (str): Path to the file containing conversion mappings.
el_dataset (str): Path to the dataset file to be processed.
show_difference (bool, optional): Flag to indicate whether to print the
dataset before and after conversion.
Defaults to False.
Returns:
None


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

.. py:module:: createDH
.. autoapi-nested-parse::

Creating Danish heat demand for Balmorel

Futuregas dataset default. Can be used to get temporal profiles

Aalborg dataset, can be used to get individual and district heat gross supply:
https://vbn.aau.dk/da/datasets/kommunepakker-varmeplan-danmark-2021
- Note that heat demand should be combined wrt. the s1-s5 scenarios (sums to 53.95 TWh without heat efficiency investments)

Python package requirements:
- xlrd

Created on 11.03.2024

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



Attributes
----------

.. autoapisummary::

createDH.cmap
createDH.style
createDH.fc
createDH.X


Classes
-------

.. autoapisummary::

createDH.DistrictHeat
createDH.DistrictHeatAAU


Functions
---------

.. autoapisummary::

createDH.find_value


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

.. py:data:: cmap
.. py:data:: style
:value: 'report'


.. py:data:: fc
:value: 'white'


.. py:class:: DistrictHeat(dataset: str = 'Denmark_Futuregas')
Class for district heating data

Existing datasets:
- Denmark_Futuregas

Args:
dataset (str, optional): _description_. Defaults to 'DK'.


.. py:method:: assign_DH(areas: geopandas.GeoDataFrame, df_intercepts: pandas.DataFrame, value_col: str = 'Value') -> None
DH data must have A and Y sets, where A matches the areas index

Ends up with format:

Y1 Y2 Y3 -- YN

A1

A2

|
AM



.. py:method:: assign_DHT(areas: geopandas.GeoDataFrame, df_intercepts: pandas.DataFrame, value_col: str = 'Value', agg_func: str = 'sum') -> None
DHT data must have S.T and A sets, where A matches the areas index

Ends up with format:

A1 A2 A3 -- AN

S01 . T001

S01 . T002

|
S52 . T168




.. py:method:: assign_DH_profile()
.. py:method:: join_geo_with(df: pandas.DataFrame, kwargs: dict = {'how': 'inner'}) -> None
.. py:method:: plot_original_data(year: str, areas: geopandas.GeoDataFrame, plot_density: bool = False, fc: str = 'white', area_fc: Union[str, list] = [0.85, 0.85, 0.85], ax: Union[matplotlib.axes._axes.Axes, str] = '') -> tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes]
.. py:method:: plot_aggregated_data(year: str, areas: geopandas.GeoDataFrame, plot_density: bool = False) -> tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes]
.. py:function:: find_value(df: pandas.DataFrame, element: any, func: str = 'max', ind: int = 0) -> any
.. py:class:: DistrictHeatAAU
.. py:attribute:: f1
.. py:attribute:: f2
.. py:method:: combine_data(plot: bool = False)
.. py:data:: X
Loading

0 comments on commit e3fc3e7

Please sign in to comment.