-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b63ea8c
Showing
139 changed files
with
17,162 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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 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 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 not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# About this code | ||
|
||
This documentation is under construction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\\src\\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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
createFLEXDEM | ||
============= | ||
|
||
.. py:module:: createFLEXDEM | ||
.. autoapi-nested-parse:: | ||
|
||
Created on 22.06.2024 | ||
|
||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
ASSUMPTIONS: | ||
- Assumes one demand and charging capacity pr. electric vehicle | ||
- Assumes a uniform distribution of EV demand within country regions (very bad for FR15-FR00 and UK00-UKNI) | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
createFLEXDEM.FD | ||
createFLEXDEM.x | ||
|
||
|
||
Classes | ||
------- | ||
|
||
.. autoapisummary:: | ||
|
||
createFLEXDEM.FlexDem | ||
|
||
|
||
Functions | ||
--------- | ||
|
||
.. autoapisummary:: | ||
|
||
createFLEXDEM.distribute_road_flex_electricity_demand | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:class:: FlexDem | ||
.. py:method:: load_traffic_data(path: str = 'Data\\PyPSA-Eur-Sec Data\\emobility', file: str = 'KFZ__count') | ||
.. py:method:: create_general_demand(demand_pr_vehicle: float = 100 * 52 / 1000, charger_capacity_pr_vehicle: float = 1.5 / 1000) | ||
.. py:method:: create_charging_profile(area_choice: str = 'AntBalm') | ||
.. py:data:: FD | ||
.. py:function:: distribute_road_flex_electricity_demand() | ||
.. py:data:: x | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
createHYDROGEN | ||
============== | ||
|
||
.. py:module:: createHYDROGEN | ||
.. autoapi-nested-parse:: | ||
|
||
Created on 17.03.2024 | ||
|
||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
createHYDROGEN.style | ||
createHYDROGEN.fc | ||
createHYDROGEN.XH2LOSS | ||
createHYDROGEN.XH2COST | ||
createHYDROGEN.XH2INVCOST | ||
|
||
|
||
Classes | ||
------- | ||
|
||
.. autoapisummary:: | ||
|
||
createHYDROGEN.Hydrogen | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: style | ||
:value: 'report' | ||
|
||
|
||
.. py:data:: fc | ||
:value: 'white' | ||
|
||
|
||
.. py:data:: XH2LOSS | ||
:value: 2.5e-08 | ||
|
||
|
||
.. py:data:: XH2COST | ||
:value: 1e-06 | ||
|
||
|
||
.. py:data:: XH2INVCOST | ||
:value: 0.55 | ||
|
||
|
||
.. py:class:: Hydrogen(choice: str) | ||
.. py:attribute:: grid | ||
.. py:attribute:: gasstorage | ||
.. py:method:: create_hydrogen_data(areas: geopandas.GeoDataFrame, the_index: str) -> dict | ||
Oops, something went wrong.