h2integrate.tools.plot#
Functions
|
Takes in two times in datetime format and returns the two times as hour of the year. |
|
Generates a plot of electricity and hydrogen dispatch for the specified period |
|
Generates a plot of the hydrogen dispatch from the h2integrate output. |
- h2integrate.tools.plot.get_hour_from_datetime(dt_start, dt_end)#
Takes in two times in datetime format and returns the two times as hour of the year. This function is intended for use with plots where data may span a full year, but only a portion of the year is desired in a given plot.
- Parameters:
dt_start (dt.datetime) -- start time in datetime format
dt_end (dt.datetime) -- end time in datetime format
- Returns:
hour_start (int) -- hour of the year corresponding to the provided start time hour_end (int): hour of the year corresponding to the provided end time
- Return type:
tuple[int, int]
- h2integrate.tools.plot.plot_hydrogen_flows(energy_flow_data_path='./output/data/production/energy_flows.csv', start_date_time=datetime.datetime(2024, 1, 1, 0, 0), end_date_time=datetime.datetime(2024, 12, 31, 23, 0), save_path='./output/figures/production/hydrogen-flow.pdf', show_fig=True, save_fig=True)#
Generates a plot of the hydrogen dispatch from the h2integrate output.
- Parameters:
energy_flow_data_path (str) -- path to where the h2integrate energy flow output file is saved
start_date_time (dt.datetime, optional) -- start time for plot. Defaults to dt.datetime(2024, 1, 1, 0).
end_date_time (dt.datetime, optional) -- end time for plot. Defaults to dt.datetime(2024, 12, 31, 23).
save_path (str, optional) -- relative path for saving the resulting plot. Defaults to "./output/figures/production/hydrogen-flow.pdf".
show_fig (bool, optional) -- if True, figure will be displayed. Defaults to True.
save_fig (bool, optional) -- if True, figure will be saved. Defaults to True.
- Return type:
None
- h2integrate.tools.plot.plot_energy_flows(energy_flow_data_path='./output/data/production/energy_flows.csv', start_date_time=datetime.datetime(2024, 1, 5, 14, 0), end_date_time=datetime.datetime(2024, 1, 10, 14, 0), save_path='./output/figures/production/energy_flows.pdf', show_fig=True, save_fig=True)#
Generates a plot of electricity and hydrogen dispatch for the specified period
- Parameters:
energy_flow_data_path (str, optional) -- Path to energy flow output file. Defaults to Path("./output/figures/production/energy_flows.csv").
start_date_time (dt.datetime, optional) -- Start time for plot. Defaults to dt.datetime(2024, 1, 5, 14).
end_date_time (dt.datetime, optional) -- End time for plot. Defaults to dt.datetime(2024, 1, 10, 14).
save_path (str, optional) -- Path to save figure to. Defaults to Path("./output/data/production/energy_flows.pdf").
show_fig (bool, optional) -- If True, figures will be displayed. Defaults to True.
save_fig (bool, optional) -- If True, figures will be saved. Defaults to True.
- Return type:
None