-
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 bf32afb
Showing
148 changed files
with
17,195 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.
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(plot_cf: bool = False) | ||
.. py:function:: cluster(con: 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,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 | ||
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,114 @@ | ||
createINDUSTRY | ||
============== | ||
|
||
.. py:module:: createINDUSTRY | ||
.. autoapi-nested-parse:: | ||
|
||
Created on 14.03.2024 | ||
|
||
@author: Mathias Berg Rosendal, PhD Student at DTU Management (Energy Economics & Modelling) | ||
|
||
Script for creating data for industry sector | ||
Sources: | ||
- Balmorel Data 2024 | ||
- Manz, Pia, Tobias Fleiter, and Wolfgang Eichhammer. “The Effect of Low-Carbon Processes on Industrial Excess Heat Potentials for District Heating in the EU: A GIS-Based Analysis.” Smart Energy 10 (May 1, 2023): 100103. https://doi.org/10.1016/j.segy.2023.100103. | ||
|
||
|
||
|
||
Attributes | ||
---------- | ||
|
||
.. autoapisummary:: | ||
|
||
createINDUSTRY.cmap | ||
createINDUSTRY.style | ||
createINDUSTRY.fc | ||
createINDUSTRY.XHLOSS | ||
createINDUSTRY.XHCOST | ||
createINDUSTRY.XHINVCOST | ||
|
||
|
||
Classes | ||
------- | ||
|
||
.. autoapisummary:: | ||
|
||
createINDUSTRY.Industry | ||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
.. py:data:: cmap | ||
.. py:data:: style | ||
:value: 'report' | ||
|
||
|
||
.. py:data:: fc | ||
:value: 'white' | ||
|
||
|
||
.. py:data:: XHLOSS | ||
:value: 0.1 | ||
|
||
|
||
.. py:data:: XHCOST | ||
:value: 0.001 | ||
|
||
|
||
.. py:data:: XHINVCOST | ||
:value: 396000 | ||
|
||
|
||
.. py:class:: Industry(dataset: str = 'EUBalmorel') | ||
Class for industry addon data | ||
|
||
Existing datasets: | ||
- Denmark | ||
|
||
Args: | ||
dataset (str, optional): _description_. Defaults to 'DK'. | ||
|
||
|
||
.. py:attribute:: PS | ||
.. py:attribute:: index | ||
.. py:attribute:: crs | ||
:value: 'EPSG:4326' | ||
|
||
|
||
|
||
.. py:attribute:: geoindex | ||
.. py:method:: assign_original_region() | ||
.. py:method:: assign_emission_fractions() | ||
.. py:method:: apply_ef_to_original_data(incfiles: dict, original_area: str, new_area: str, frac_sum: str, include_new_area: bool = False) -> None | ||
Assign industry heat demand from original area to new area | ||
|
||
|
||
|
||
.. py:method:: create_industry_data(areas: geopandas.GeoDataFrame, save_new_area_to_df: bool = False, plot_point_sources: bool = False, ax: matplotlib.axes.Axes = '') -> dict | ||
Prepares industry data .inc files | ||
|
||
|
||
|
||
|
||
.. py:method:: plot_original_data(emission_scale: float = 500000.0, bounds: list[float, float, float, float] = [-12, 30, 33, 73], 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(incfiles: dict, areas: geopandas.GeoDataFrame, indicator: str = 'DH') -> tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes] | ||
Oops, something went wrong.