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
Convenience method/ attribute to retrieve the EOS configuration data.
- __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.