Reporting
Overview Structs
GEMS.AbstractSectionGEMS.BatchReportGEMS.PlotSectionGEMS.ReportGEMS.ReportPlotGEMS.SectionGEMS.SimulationReport
Overview Functions
GEMS.abstractGEMS.abstract!GEMS.addsection!GEMS.addtimer!GEMS.authorGEMS.author!GEMS.buildreportGEMS.contentGEMS.content!GEMS.dateGEMS.date!GEMS.descriptionGEMS.description!GEMS.dpiGEMS.dpi!GEMS.filenameGEMS.filename!GEMS.fontfamilyGEMS.fontfamily!GEMS.generateGEMS.glossaryGEMS.glossary!GEMS.pltGEMS.reportdataGEMS.sectionsGEMS.subsectionsGEMS.subtitleGEMS.subtitle!GEMS.titleGEMS.title!
Structs
GEMS.AbstractSection — Type
Supetype for all report sections
GEMS.BatchReport — Type
BatchReport <: ReportA Type for generating a batch-run simulation report.
Fields
Batch Data
bd::BatchData: Batch data object used to generate this report
Meta Information
title::String: Report titlesubtitle::String: Report subtitleauthor::String: Report authorsdate::String: Simulation execution date (post processing)abstract::String: Report abstract
Configuration
glossary::Bool: flag to add or remove glossary with term definitionsdpi::Int64: dots per inch for report plots (default: 300)fontfamily::String: font family for report (default: Times New)
GEMS.PlotSection — Type
PlotSection <: AbstractSectionThis type wraps a ReportPlot into an AbstractSection struct. Thus the only field is a report plot. Its mainly used to add plots to reports. You can look up the aviailable default report styles to get an idea how that might look like.
You can either pass an instance of a SimulationPlot to the constructor like:
PlotSection(TickCases())or pass the SimulationPlot type as a Symbol like:
PlotSection(:TickCases)The gemsplot() function contains a comprehensive list on the available plot types.
GEMS.Report — Type
Supertype for all simulation reports
GEMS.ReportPlot — Type
Supertype for all plots that go into reports
GEMS.Section — Type
Section(title::String = "", content::String = "", subsections::Vector{AbstractSection} = [])
Section(rd::ResultData, type::Symbol)
Section(rd::BatchData, type::Symbol)A type for Report Sections. All reports consist of (nested) sections. A report section will be parsed into a markdown section (indicated by "#"s) during report generation. Each section must have a title and content. It can have an arbitrary number of subsections.
Example
This code creates two sections. The first one having a title and some content. The second section contains the first secion as a subsection.
sec_1 = Section(
title = "My Section Title",
content = "Great section contents"
)
sec_2 = Section(
title = "My Second Section
subsections = [sec_1]
)Defaut Sections
There are a number of default sections that you can simply plug into your report by calling the Section() constructor and pass a ResultData or BatchData object and a Symbol qualifying the type of section you'd like to get:
# run simulation
sim = Simulation()
run!(sim)
rd = ResultData(sim)
overview_section = Section(rd, :Overview)Default Sections for Single Simulation Reports
Input must be ResultData.
| Type | Title | Content |
|---|---|---|
:Debug | Debug Information | Contains :Memory, :Processor,:Repo, and :System section. |
:General | General | Geeral simulation info; tick unit, start conditions, and others. |
:InputFiles | Input Files | Config- and population file paths. |
:Interventions | Interventions | Triggers, strategies, and measures. |
:Memory | Memory | Available and used system memory. |
:Model | Model Configuration | Contains :InputFiles, :Interventions, :General, :Pathogens, and :Settings |
:Observations | Observations | Summary of observed progression, detection rate, dark figure, and others. |
:Overview | Overview | Simulation summmary with initial infections, total attack rate, and others. |
:Pathogens | Pathogens | Pathogen configuration with one subsection per pathogen. |
:Processor | Processor | Processor model, cores, and others. |
:Repo | Repository | Current repo-, branch- and commit-ID. |
:Settings | Settings | Number of settings per type and min, max, average number of individuals. |
:System | System Information | Julia config, number of threads, and others. |
Default Sections for Batch Reports
Input must be BatchData.
| Type | Title | Content |
|---|---|---|
:Allocations | Allocations | Summary statistics on memory usage across simulation runs in BatchData object. |
:Debug | Debug Information | Contains :Memory, :Processor,:Repo, and :System section. |
:General | Genera | Geeral simulation info; tick unit, start conditions, and others. |
:Memory | Memory | Available and used system memory. |
:Overview | Overview | Summary statistics on total infections, attack rates, and others. |
:Processor | Processor | Processor model, cores, and others. |
:Repo | Repository | Current repo-, branch- and commit-ID. |
:Resouces | Resources | Contains :Runtime and :Allocations sections. |
:Runtime | Runtime | Summary statistics on runtime across simulation runs in BatchData object. |
:Settings | Settings | Number of settings per type and min, max, average number of individuals. |
:System | System Information | Julia config, number of threads, and others. |
GEMS.SimulationReport — Type
SimulationReport <: ReportA Type for generating a single-run simulation report.
Fields
Result Data
rd::ResultData: Result data object used to generate this report
Meta Information
title::String: Report titlesubtitle::String: Report subtitleauthor::String: Report authorsdate::String: Simulation execution date (post processing)abstract::String: Report abstract
Configuration
glossary::Bool: flag to add or remove glossary with term definitionsdpi::Int64: dots per inch for report plots (default: 300)fontfamily::String: font family for report (default: Times New)
Functions
GEMS.abstract — Function
abstract(report::Report)Returns the abstract of a Report.
GEMS.abstract! — Function
abstract!(report::Report, abstract::String)setss the abstract of a Report.
GEMS.addsection! — Function
addsection!(section::Section, subsection::AbstractSection)Adds a subsection to a provided section.
addsection!(section::Section, subsections::Vector)Adds multiple subsection to a provided section.
addsection!(report::Report, section::AbstractSection)Adds a Section to a Report. It can either be a regular section or a plot section.
GEMS.addtimer! — Function
addtimer!(rep::SimulationReport, to::TimerOutput)Generates a Section from the consolue output of a TimerOutput object and adds it to a SimulationReport.
GEMS.author! — Function
author!(report::Report, author::String)Sets the author of a Report.
GEMS.author — Function
author(report::Report)Returns the author of a Report.
GEMS.buildreport — Function
buildreport(data::Union{ResultData,BatchData}, style::String = "")Initializes and configures a simulation report with the tile, abstract, sections etc. provided in config. If config is an empty dictionary all available standard sections, plots, and the glossary etc. will be used. It returns a full SimulationReport object which can then be generated using the generate() function.
GEMS.content! — Function
content!(section::Section, content::String)Sets a section's content.
GEMS.content — Function
content(section::Section)Returns a section's content.
GEMS.date! — Function
date!(report::Report, date::String)Sets the date of a Report.
GEMS.date — Function
date(report::Report)Returns the date of a Report.
GEMS.description! — Method
description!(plot::ReportPlot, description::String)Setter for report plot description.
GEMS.description — Method
description(plot::ReportPlot)Return description from report plot object.
GEMS.dpi — Function
dpi(report)Returns dpi (dots per inch) from a report object. dpi conditions the resolution of images generated for the report.
GEMS.dpi! — Method
dpi!(report, dpi)Setter for report dpi (dot per inch) for images.
Missing docstring for escape_markdown(::String). Check Documenter's build log for details.
GEMS.filename! — Method
filename!(plot::ReportPlot, filename::String)Setter for report plot filename.
GEMS.filename — Method
filename(plot::ReportPlot)Return filename from report plot object.
GEMS.fontfamily! — Function
fontfamily!(report, fontfamily)Setter for report fontfamily.
GEMS.fontfamily — Function
fontfamily(report)Returns font family config from a report object.
GEMS.generate — Method
generate(report::Report, directory::AbstractString)Generates markdown string from a Report object including its nested subsections. The report will be stored as PDF, HTML, and MD in the provided directory. Images are generated and stored in an "/img" subfolder.
GEMS.glossary! — Function
glossary!(report::Report, glossary::Bool)Sets the glossary flag of a Report. If true, the glossary will be copied into the report upon generation.
GEMS.glossary — Function
glossary(report::Report)Returns the glossary flag of a Report.
Missing docstring for plotpackage(::PlotSection). Check Documenter's build log for details.
GEMS.plt — Function
plt(section::PlotSection)Return the nested ReportPlot from a PlotSection object.
GEMS.reportdata — Method
reportdata(report::Report)Returns the associated ReportData object from a Report.
Missing docstring for savepath(::String). Check Documenter's build log for details.
GEMS.sections — Method
sections(report::Report)Returns the array of sections of a Report.
GEMS.subsections — Method
subsections(section::Section)Returns a section's array of subsections.
GEMS.subtitle! — Method
subtitle!(report::Report, subtitle::String)Sets the subtitle of a Report.
GEMS.subtitle — Method
subtitle(report::Report)Returns the subtitle of a Report.
GEMS.title! — Function
title!(plot::ReportPlot, title::String)Setter for report plot title.
title!(section::Section, title::String)Sets a section's title.
title!(report::Report, title::String)Sets the title of a Report.
GEMS.title — Function
title(plot::ReportPlot)Returns title from report plot object.
title(section::Section)Returns a section's title.
title(report::Report)Returns the title of a Report.