visualisation module

visualisation.extract_node_centroids(model_input_data: dict) dict[source]

Provides a dictionary with node names as keys and centroids as values.

Parameters:

model_input_data (dict) -- dictionary with the input data of the model

Returns:

dictionary with node names as keys and centroids as values

Return type:

dict

visualisation.extract_node_shapes(model_input_data: dict) dict[source]

provides a dictionary with node names as keys and shapes of heat node areas as values.

Parameters:

model_input_data (dict) -- dictionary with the input data of the model

Returns:

dictionary with node names as keys and shapes of heat node areas as values

Return type:

dict

visualisation.make_basic_plots(case_study_name: str, model_name: str, time_invervall: str = 'h', start_hour: int = 0, duration_hours: int = 168)[source]

Generates basic plots for the given case study and model.

Parameters:
  • case_study_name (str) -- name of the case study

  • model_name (str) -- name of the model to be plotted

  • time_invervall (str, optional) -- Sets the time interval for resampling the data (i.e. 'H' for hourly), defaults to 'W' (weekly), defaults to 'h'

  • start_hour (int, optional) -- index of the starting our of the range in the plot time axis, defaults to 0

  • duration_hours (int, optional) -- duration of time steps to plot in the time axis, defaults to 24*7 (one week)

visualisation.merge_time_series(model_input_data: dict, model_output_data: dict) DataFrame[source]

Merge all time series data from the model input and output data into a single dataframe.

Parameters:
  • model_input_data (dict) -- input data of the model, including heat demand and waste heat profiles

  • model_output_data (dict) -- output data of the model, including local heat production and central heat production

Returns:

a dataframe with the energy balance of the local heat production, central heat production, waste heat from heat generation units and heat demand

Return type:

pd.DataFrame

visualisation.plot_HD_interactive(gdf_buildings: GeoDataFrame)[source]

Generates an interactive map of the buildings with their yearly heat demand.

Parameters:

gdf_buildings (gpd.GeoDataFrame) -- geodataframe with the buildings and their yearly heat demand

Returns:

an interactive map of the buildings with their yearly heat demand

Return type:

folium.Map

visualisation.plot_energy_balance(df_energy_balance: DataFrame, figure_path: str)[source]

Plot the annual energy balance of the local heat production, central heat production, waste heat from heat generation units and heat demand as a pie chart.

Parameters:
  • df_energy_balance (pd.DataFrame) -- dataframe with the energy balance of the local heat production, central heat production, waste heat from heat generation units and heat demand

  • figure_path (str) -- path to the directory where the figure should be saved

visualisation.plot_investment_decisions(model_input_data: dict, model_output_data: dict, dict_nodes: dict, dict_shapes: dict, figure_path: str)[source]

Generates a plot of the investment decisions made by the model on a geospatial map.

Parameters:
  • model_input_data (dict) -- input data of the model, including heat network and heat generation units

  • model_output_data (dict) -- output data of the model, including investment decisions and mass flow

  • dict_nodes (dict) -- dictionary with node names as keys and centroids as values

  • dict_shapes (dict) -- dictionary with node names as keys and shapes of heat node areas as values

  • figure_path (str) -- path to the directory where the figure should be saved

visualisation.plot_time_resolved(df_energy_balance: DataFrame, figure_path: str, time_invervall='W', start_hour: int = None, duration_hours: int = None)[source]

Generates a time resolved plot of the energy balance of the local heat production, central heat production, waste heat from heat generation units and heat demand.

This function resamples the input dataframe to the specified time interval and plots the energy balance as a stackplot. The x-axis is adjusted to show the time interval, and the plot is saved as a PDF file.

Parameters:
  • df_energy_balance (pd.DataFrame) -- dataframe with the energy balance of the local heat production, central heat production, waste heat from heat generation units and heat demand

  • figure_path (str) -- path to the directory where the figure should be saved

  • time_invervall (str, optional) -- Sets the time interval for resampling the data (i.e. 'H' for hourly), defaults to 'W' (weekly)

  • start_hour (int, optional) -- index of the starting our of the range in the plot time axis, defaults to None

  • duration_hours (int, optional) -- duration of time steps to plot in the time axis, defaults to None