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.
- 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.
- config = ConfigEOS(general=GeneralSettings(home_assistant_addon=False, version='0.2.0.dev58204789', data_folder_path=Path('/home/docs/.local/share/net.akkudoktor.eos'), data_output_subpath='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/checkouts/readthedocs.org/user_builds/akkudoktor-eos/checkouts/latest/docs'), config_file_path=Path('/home/docs/checkouts/readthedocs.org/user_builds/akkudoktor-eos/checkouts/latest/docs/EOS.config.json')), cache=CacheCommonSettings(subpath='cache', cleanup_interval=300.0), database=DatabaseCommonSettings(provider=None, compression_level=9, initial_load_window_h=None, keep_duration_h=None, autosave_interval_sec=10, compaction_interval_sec=604800, batch_size=100, providers=['LMDB', 'SQLite']), ems=EnergyManagementCommonSettings(startup_delay=5, interval=300.0, 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(historic_hours=17520, 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), keys=[]), prediction=PredictionCommonSettings(hours=48, historic_hours=48), elecprice=ElecPriceCommonSettings(provider=None, charges_kwh=None, vat_rate=1.19, elecpriceimport=ElecPriceImportCommonSettings(import_file_path=None, import_json=None), energycharts=ElecPriceEnergyChartsCommonSettings(bidding_zone=<EnergyChartsBiddingZones.DE_LU: 'DE-LU'>), providers=['ElecPriceAkkudoktor', 'ElecPriceEnergyCharts', 'ElecPriceImport']), feedintariff=FeedInTariffCommonSettings(provider=None, provider_settings=FeedInTariffCommonProviderSettings(FeedInTariffFixed=None, FeedInTariffImport=None), providers=['FeedInTariffFixed', 'FeedInTariffImport']), load=LoadCommonSettings(provider=None, provider_settings=LoadCommonProviderSettings(LoadAkkudoktor=None, LoadVrm=None, LoadImport=None), providers=['LoadAkkudoktor', 'LoadAkkudoktorAdjusted', 'LoadVrm', 'LoadImport']), pvforecast=PVForecastCommonSettings(provider=None, provider_settings=PVForecastCommonProviderSettings(PVForecastImport=None, PVForecastVrm=None), planes=None, max_planes=0, providers=['PVForecastAkkudoktor', 'PVForecastVrm', 'PVForecastImport'], planes_peakpower=[], planes_azimuth=[], planes_tilt=[], planes_userhorizon=[], planes_inverter_paco=[]), weather=WeatherCommonSettings(provider=None, provider_settings=WeatherCommonProviderSettings(WeatherImport=None), providers=['BrightSky', 'ClearOutside', 'WeatherImport']), server=ServerCommonSettings(host='127.0.0.1', port=8503, verbose=False, startup_eosdash=True, eosdash_host=None, eosdash_port=None), utils=UtilsCommonSettings(), adapter=AdapterCommonSettings(provider=None, homeassistant=HomeAssistantAdapterCommonSettings(config_entity_ids=None, load_emr_entity_ids=None, grid_export_emr_entity_ids=None, grid_import_emr_entity_ids=None, pv_production_emr_entity_ids=None, device_measurement_entity_ids=None, device_instruction_entity_ids=None, solution_entity_ids=None, homeassistant_entity_ids=[], eos_solution_entity_ids=[], eos_device_instruction_entity_ids=[]), nodered=NodeREDAdapterCommonSettings(host='127.0.0.1', port=1880), providers=['HomeAssistant', 'NodeRED']))