champpy.ChargingPlotter¶
The ChargingPlotter is a factory class to visualize synthetic charging profiles in CHAMPPy.
Different plots are created with the Python library plotly and merged in a html file.
The ChargingPlotter can be used to analyze the generated synthetic charging profiles and to compare different charging profiles.
The generated html file contains the following plots:
📊 Bar charts of charging characteristics: daily driving consumption, daily charging hours, daily charging energy, daily connected hours
📈 Total load profile of the fleet over the week
Basic workflow:
Initialize the plotter
ChargingPlotterwith user parametersUserParamsChargingPlotterCall
plot_charging_profiles()to create plots ofChargingProfiles.Analyze the generated plots in html format, that opens automatically after the plot is created.
- class champpy.ChargingPlotter(user_params=UserParamsChargingPlotter(filename='plots\\\\charging_plots.html', font_family='Segoe UI', save_plot=True, show=True, font_size=18, rgb_color=[[0.2078, 0.4235, 0.6471], [0.9686, 0.8353, 0.0275], [0.5412, 0.7098, 0.8824], [0.6706, 0.149, 0.149], [0.1216, 0.3059, 0.4745], [0.9255, 0.5765, 0.0078], [0.4784, 0.1098, 0.1098]], load_temp_res=1, clustering=False))[source]¶
Plotter for charging profiles.
This class provides multiple plotting utilities for charging profiles, including summary characteristics and load profiles.
- Parameters:
user_params (
Optional[UserParamsChargingPlotter]) – Plot configuration such as output filename, font, colors, and display/export behavior.
- plot_charging_profiles(charging_profiles)[source]¶
Main function to generate plots of charging profiles. The function calls
plot_charging_char()andplot_load_week()to create a combined HTML file.- Parameters:
charging_profiles (
ChargingProfiles) – Input charging profiles that are to be visualized.- Returns:
The method writes/opens a combined HTML plot report depending on user settings.
- Return type:
None
- plot_charging_char(charging_profiles)[source]¶
Plot charging characteristics: daily driving consumption, daily charging hours, daily charging energy, daily connected hours.
- Parameters:
charging_profiles (
ChargingProfiles) – Charging data to plot.- Returns:
Plotly figure object with charging characteristics.
- Return type:
Figure
- plot_load_week(charging_profiles)[source]¶
Plot the charging load profile over the course of an average week.
- Parameters:
charging_profiles (
ChargingProfiles) – Charging data to plot.- Returns:
Plotly figure object with weekly load profile.
- Return type:
Figure