akkudoktoreos.utils.visualize.VisualizationReport
- class akkudoktoreos.utils.visualize.VisualizationReport(filename: str = 'visualization_results.pdf', version: str = '0.0.1', create_img: bool = True)
Bases:
ConfigMixin- __init__(filename: str = 'visualization_results.pdf', version: str = '0.0.1', create_img: bool = True) None
Methods
__init__([filename, version, create_img])add_chart_to_group(chart_func, title)Add a chart function to the current group and save it as a PNG and SVG.
add_json_page(json_obj[, title, fontsize])Add a page with a formatted JSON object to the PDF.
add_text_page(text[, title, fontsize])Add a page with text content to the PDF.
create_bar_chart(labels, values_list, title, ...)Create a bar chart and add it to the current group.
create_line_chart(start_hour, y_list, title, ...)Create a line chart and add it to the current group.
create_line_chart_date(start_date, y_list, ...)Create a line chart and add it to the current group.
create_scatter_plot(x, y, title, xlabel, ylabel)Create a scatter plot and add it to the current group.
create_violin_plot(data_list, labels, title, ...)Create a violin plot and add it to the current group.
Finalize the current group and prepare for a new group.
Generate the PDF report with all the added chart groups.
Attributes
- __init__(filename: str = 'visualization_results.pdf', version: str = '0.0.1', create_img: bool = True) None
- add_chart_to_group(chart_func: Callable[[], None], title: str | None) None
Add a chart function to the current group and save it as a PNG and SVG.
- finalize_group() None
Finalize the current group and prepare for a new group.
- create_line_chart_date(start_date: DateTime, y_list: list[ndarray | list[float | None] | list[float]], ylabel: str, xlabel: str | None = None, title: str | None = None, labels: list[str] | None = None, markers: list[str] | None = None, line_styles: list[str] | None = None, x2label: str | None = 'Hours Since Start') None
Create a line chart and add it to the current group.
- create_line_chart(start_hour: int | None, y_list: list[ndarray | list[float | None] | list[float]], title: str, xlabel: str, ylabel: str, labels: list[str] | None = None, markers: list[str] | None = None, line_styles: list[str] | None = None) None
Create a line chart and add it to the current group.
- create_scatter_plot(x: ndarray, y: ndarray, title: str, xlabel: str, ylabel: str, c: ndarray | None = None) None
Create a scatter plot and add it to the current group.
- create_bar_chart(labels: list[str], values_list: Sequence[int | float | list[int | float]], title: str, ylabel: str, xlabels: list[str] | None = None, label_names: list[str] | None = None, colors: list[str] | None = None, bar_width: float = 0.35, bottom: int | None = None) None
Create a bar chart and add it to the current group.
- create_violin_plot(data_list: list[ndarray], labels: list[str], title: str, xlabel: str, ylabel: str) None
Create a violin plot and add it to the current group.
- add_text_page(text: str, title: str | None = None, fontsize: int = 12) None
Add a page with text content to the PDF.
- add_json_page(json_obj: dict, title: str | None = None, fontsize: int = 12) None
Add a page with a formatted JSON object to the PDF.
- Parameters:
json_obj (dict) – The JSON object to display.
title (Optional[str]) – An optional title for the page.
fontsize (int) – The font size for the JSON text.
- generate_pdf() None
Generate the PDF report with all the added chart groups.
- config = ConfigEOS(general=GeneralSettings(version='0.2.0', data_folder_path=Path('/home/docs/.local/share/net.akkudoktor.eos'), data_output_subpath=Path('output'), latitude=52.52, longitude=13.405, timezone='Europe/Berlin', data_output_path=Path('/home/docs/.local/share/net.akkudoktor.eos/output'), config_folder_path=Path('/home/docs/.config/net.akkudoktor.eos'), config_file_path=Path('/home/docs/.config/net.akkudoktor.eos/EOS.config.json')), cache=CacheCommonSettings(subpath=Path('cache'), cleanup_interval=300.0), ems=EnergyManagementCommonSettings(startup_delay=5.0, interval=None, mode=None), logging=LoggingCommonSettings(console_level='INFO', file_level=None, file_path=Path('/home/docs/.local/share/net.akkudoktor.eos/output/eos.log')), devices=DevicesCommonSettings(batteries=None, max_batteries=None, electric_vehicles=None, max_electric_vehicles=None, inverters=None, max_inverters=None, home_appliances=None, max_home_appliances=None, measurement_keys=[]), measurement=MeasurementCommonSettings(load_emr_keys=None, grid_export_emr_keys=None, grid_import_emr_keys=None, pv_production_emr_keys=None, keys=[]), optimization=OptimizationCommonSettings(horizon_hours=24, interval=3600, algorithm='GENETIC', genetic=GeneticCommonSettings(individuals=300, generations=400, seed=None, penalties=None)), prediction=PredictionCommonSettings(hours=48, historic_hours=48), elecprice=ElecPriceCommonSettings(provider=None, charges_kwh=None, vat_rate=1.19, provider_settings=ElecPriceCommonProviderSettings(ElecPriceImport=None)), feedintariff=FeedInTariffCommonSettings(provider=None, provider_settings=FeedInTariffCommonProviderSettings(FeedInTariffFixed=None, FeedInTariffImport=None)), load=LoadCommonSettings(provider=None, provider_settings=LoadCommonProviderSettings(LoadAkkudoktor=None, LoadVrm=None, LoadImport=None)), pvforecast=PVForecastCommonSettings(provider=None, provider_settings=PVForecastCommonProviderSettings(PVForecastImport=None, PVForecastVrm=None), planes=None, max_planes=0, planes_peakpower=[], planes_azimuth=[], planes_tilt=[], planes_userhorizon=[], planes_inverter_paco=[]), weather=WeatherCommonSettings(provider=None, provider_settings=WeatherCommonProviderSettings(WeatherImport=None)), server=ServerCommonSettings(host='127.0.0.1', port=8503, verbose=False, startup_eosdash=True, eosdash_host=None, eosdash_port=None), utils=UtilsCommonSettings())