sensortoolkit.evaluation_objs._performance_report.PerformanceReport

class PerformanceReport(sensor, param, reference, write_to_file=False, figure_search=False, **kwargs)[source]

Bases: sensortoolkit.evaluation_objs._sensor_eval.SensorEvaluation

Generate air sensor performance evaluation reports.

Reports are intended for evaluations following U.S. EPA’s recommendations for base testing of air sensors at outdoor ambient air monitoring sites and collocated alongside FRM/FEM monitors for use in NSIM applications.

In February 2021, U.S. EPA released two reports detailing recommended performance testing protocols, metrics, and target values for the evaluation of sensors measuring either fine particulate matter (PM2.5) or ozone (O3). More detail about EPA’s sensor evaluation research as well as both reports can be found online at EPA’s Air Sensor Toolbox (https://www.epa.gov/air-sensor-toolbox)

Important

PerformanceReport is an inherited class of SensorEvaluation. As a result, it inherits all the class and instance attributes of SensorEvaluation, including its numerous variables and data structures. Programmatically, PerformanceReport is intended as a direct extension of SensorEvaluation; users can easily interact with all the attributes and data stuctures for sensor evaluations. However, whereas SensorEvaluation allows analysis of a wide number of pollutants and parameters, PerformanceReport is presently intended for constructing reports pertaining to sensors measuring either fine particulate matter (PM2.5) or ozone (O3) following U.S. EPA’s recommended protocols and testing metrics for evaluating these sensors. Module will exit execution if parameters other than 'PM25' or 'O3' are specified.

Parameters
  • sensor (sensortoolkit.AirSensor object) – The air sensor object containing datasets with parameter measurements that will be evaluated.

  • param (sensortoolkit.Parameter object) – The parameter (measured environmental quantity) object containing parameter-specific attributes as well as metrics and targets for evaluating sensor performance.

  • reference (sensortoolkit.ReferenceMethod object) – The FRM/FEM reference instrument object containing datasets with parameter measurements against which air sensor data will be evaluated.

  • write_to_file (bool, optional) – If true, evaluation statistics will be written to the /data/eval_stats sensor subdirectory. Figures will also be written to the appropriate figures subdirectory. Defaults to False.

  • figure_search (bool, optional) – If true, PerformanceReport will search for figures in the /figures directory before attempting to create new figures. If false, PerformanceReport will create all new figures (may risk overwriting existing figures). Defaults to False.

  • **kwargs (dict) –

    • fmt_sensor_name

Methods

AddFigure

param fig_name

DESCRIPTION.

AddMetDistPlot

Add meteorological distribution (Temp, RH) to report.

AddMetInflPlot

Add normalized met.

AddMetricsPlot

Add Performance target metric boxplots/dot plots to report.

AddMultiScatter

Add Sensor vs reference scatter plots for all sensors.

AddSingleScatterPlot

Add sensor vs reference scatter plots to report.

AddSlideNumbers

Add slide numbers to slides generated during report construction.

AddTimeseriesPlot

Add timeseries plots to report.

CheckTargets

Evaluate how many sensors met a metric target, return textual depiction.

ConstructTable

Select and construct tables on report page 2.

CreateReport

Wrapper for running the various methods that construct reports.

EditErrorTable

Add error tabular statistics (page 2).

EditHeader

Insert header description (title, contact info, photo, etc.).

EditMetCondTable

Add meteorological conditions table (page 1).

EditMetInfTable

Add meteorological influence table (page 1).

EditRefConcTable

Add reference concentration tabular statistics (page 1).

EditRefTable

Add details to reference information table.

EditSensorRefTable

Add sensor-reference tabular statistics (page 2).

EditSensorSensorTable

Add intersensor (sensor-sensor) precision tabular stats (page 2).

EditSensorTable

Add information to sensor information table (page 1).

EditSiteTable

Add details to testing organzation and site info table (page 1).

EditTabularStats

Wrapper for constructing tables and adding entries (page 2).

FigPositions

Assign figure positions for reports.

FigureSearch

Indicate whether a figure exists and the full path to the figure.

FormatText

Set text attributes (font, size, bold, italic, alignment).

GetShape

Retrieve shape object for tables based on known shape ID.

MoveSlide

Move the supplemental info table to the last slide position.

PrintpptxShapes

Diagnostic tool for indicating shape ids and locations on reporting template slides.

SaveReport

Save the report to the /reports directory as a pptx file.

SetCellBorder

Edit tabular cell boarder attributes (border width, fill color, etc.).

SetSpanningCells

Merge tabular cells to form cells spanning multiple rows/columns.

SetSubscript

Workaround for making font object text subscript (not included in python-pptx as of v0.6.19)

SetSuperscript

Workaround for making font object text superscript (not included in python-pptx as of v0.6.19)

SubElement

Modify an XML element by adding a sub-element entry and assign attributes.

add_deploy_dict_stats

Populate deployment dictionary with statistical metrics.

calculate_metrics

Compute hourly, daily, and inter-sensor statistics dataframes.

plot_met_dist

Plot the distribution of temperature and RH recorded by meterological instruments at the collocation site.

plot_met_influence

Plot the influence meteorological parameters (temperature or relative humidity) on sensor measurements.

plot_metrics

Regression dot/boxplots for U.S EPA performance metrics and targets developed for PM2.5 and O3 sensor evaluations.

plot_sensor_met_scatter

Plot internal sensor temp or RH measurements against collocated reference monitor measurements.

plot_sensor_scatter

Plot sensor vs FRM/FEM reference measurement pairs as scatter.

plot_timeseries

Plot sensor and FRM/FEM reference measurements over time.

print_eval_conditions

Display conditions for the evaluation parameter and meteorological conditions during the testing period.

print_eval_metrics

Display a summary of performance evaluation results using EPA’s recommended performance metrics (‘PM25’ and ‘O3’).

Attributes

report_params

AddFigure(fig_name, fig_path)[source]
Parameters
  • fig_name (TYPE) – DESCRIPTION.

  • fig_path (TYPE) – DESCRIPTION.

Returns

None.

AddMetDistPlot(**kwargs)[source]

Add meteorological distribution (Temp, RH) to report.

Parameters

**kwargs (dict) – Keyword arguments passed to met_distrib() subroutine for drawing distribution plots.

Returns

None.

AddMetInflPlot(**kwargs)[source]

Add normalized met. influence scatter (Temp, RH) to report.

Parameters

**kwargs (dict) – Keyword arguments passed to normalized_met_scatter() subroutine for drawing distribution plots.

Returns

None.

AddMetricsPlot(**kwargs)[source]

Add Performance target metric boxplots/dot plots to report.

Parameters

**kwargs (dict) – Keyword arguments passed to performance_metrics() subroutine for drawing performance metric plots.

Returns

None.

AddMultiScatter(**kwargs)[source]

Add Sensor vs reference scatter plots for all sensors.

Parameters

**kwargs (dict) – Keyword arguments passed to plot_sensor_scatter() subroutine for drawing scatter plots.

Returns

None.

AddSingleScatterPlot(**kwargs)[source]

Add sensor vs reference scatter plots to report.

Parameters

**kwargs (dict) – Keyword arguments passed to plot_sensor_scatter() subroutine for drawing scatter plots.

Returns

None.

AddSlideNumbers()[source]

Add slide numbers to slides generated during report construction.

For some reason, the python pptx module can’t assign the footer page number to slides that are created by the library. While slides that are imported via the template (the first and last page of the report) have page number placeholders already assigned, the pptx library doesnt do this without explicity copying and pasting the page number placeholder from the layout to the slides that are created by the module.

Reference:

This code follows the basic outline Steve Canny (scanny) suggests in response to this GitHub post:

Returns

None.

AddTimeseriesPlot(**kwargs)[source]

Add timeseries plots to report.

Parameters

**kwargs (dict) – Keyword arguments passed to sensor_timeplot() subroutine for drawing timeseries plots.

Returns

None.

CheckTargets(metric_vals, metric)[source]

Evaluate how many sensors met a metric target, return textual depiction.

For a passed metric name ‘metric’, determine the number of sensors with metric values within the specified metric target range.

Example:

Say the ‘metric’ argument is ‘CV’ and the ‘metric_vals’ argument is [20.2, 43.6, 26.5] (values are percentages). Given that the target range for ‘CV’ is from 0% to 30%, two our of three sensors fall within the target range. Textually, this can be represented by a series of three dots, where two dots are closed and one is empty.

Text returned by CheckTargets():

‘●●○’

Parameters
  • metric_vals (float, int, or list) – Evaluation results for the indicated performance metric.

  • metric (str) – The name of the performance metric.

Returns

A textual representation of the number of sensors meeting the target range criteria for the performance metric.

Return type

text (str)

ConstructTable(slide, table_type='sensor_reference')[source]

Select and construct tables on report page 2.

Presets are set for constructing each table type (number of rows and columns, dimensions of tables, shading of cells and fill color, etc.)

Parameters
  • slide (pptx slide object) – The report slide on which the tabular statistics will be placed. This will likely be slide #2 (i.e., self.rpt.slides[1]).

  • table_type (str) –

    Name of the type of table to construct. Options include the following:

    • 'sensor_reference'

    • 'error'

    • 'sensor_sensor'

Returns

Two-element tuple containing:

  • frame (pptx GraphicFrame): Object in which the table is contained.

  • table (pptx table shape): Table shape formatted for the selected table type.

Return type

(tuple)

CreateReport()[source]

Wrapper for running the various methods that construct reports.

Existing figures are assumed to have been created on the same day of class instantiation. If a figure filename is not found, sensor data are loaded via the SensorEvaluation class and the figure is generated.

Returns

None.

EditErrorTable(table)[source]

Add error tabular statistics (page 2).

Parameters

table (pptx table object) – A table object for sensor vs. reference error (RMSE, NRMSE).

Returns

None.

EditHeader()[source]

Insert header description (title, contact info, photo, etc.).

Shape name

Slide Number

Shape ID

Report Title

1

35 (PM2.5), 9 (O3)

Report Title

2

21 (PM2.5), 21 (O3)

Report Title

3

13 (PM2.5), 15 (O3)

Deployment, contact info

1

34 (PM2.5), 33 (O3)

Deployment, contact info

2

20 (PM2.5), 22 (O3)

Deployment, contact info

3

12 (PM2.5), 16 (O3)

Photo placeholder

1

2 (PM2.5), 2 (O3)

Photo placeholder

2

4 (PM2.5), 3 (O3)

Photo placeholder

3

14 (PM2.5), 3 (O3)

Returns

None

EditMetCondTable()[source]

Add meteorological conditions table (page 1).

Table name

TableID

N outside target criteria

45 (O3), 74 (PM25)

Returns

None.

EditMetInfTable()[source]

Add meteorological influence table (page 1).

Table name

TableID

N paired met conc vals

48 (O3), 76 (PM25)

Returns

None.

EditRefConcTable()[source]

Add reference concentration tabular statistics (page 1).

Located in different boxes based on the evaluation parameter type.

Scatter plots box (PM2.5 only):

Table name

TableID

Reference conc info

75

Time series box (O3 only):

Table name

TableID

Reference conc info

56

Returns

None.

EditRefTable()[source]

Add details to reference information table.

Table name

TableID

Reference info

51

Returns

None.

EditSensorRefTable(table)[source]

Add sensor-reference tabular statistics (page 2).

Parameters

table (pptx table object) – A table object for sensor vs. reference regression statistics.

Returns

None.

EditSensorSensorTable(table)[source]

Add intersensor (sensor-sensor) precision tabular stats (page 2).

Parameters

table (pptx table object) – A table object for intersensor precision statistics.

Returns

None.

EditSensorTable()[source]

Add information to sensor information table (page 1).

Table name

TableID

Sensor info

49 (PM2.5), 30 (O3)

Returns

None.

EditSiteTable()[source]

Add details to testing organzation and site info table (page 1).

Table name

TableID

Testing org, site info

18

Returns

None.

EditTabularStats()[source]

Wrapper for constructing tables and adding entries (page 2).

Returns

None.

FigPositions()[source]

Assign figure positions for reports.

Values are in inches, specifying the left and top center location of each figure.

Returns

None.

FigureSearch(figure_name, subfolder=None)[source]

Indicate whether a figure exists and the full path to the figure.

Parameters
  • figure_name (str) – The filename for the figure.

  • subfolder (str, optional) – The subdirectory within the figure path where the file is located. Defaults to None.

Returns

Two-element tuple containing:

  • bool: True if the figure exists, false otherwise.

  • full_figure_path (str): The full directory path.

Return type

(tuple)

FormatText(text_obj, alignment='center', font_name='Calibri', font_size=24, bold=False, italic=False)[source]

Set text attributes (font, size, bold, italic, alignment).

Parameters
  • text_obj (pptx.text.text Subshape) – Object containing the text attributes.

  • alignment (str, optional) – Text alignment. Options are ‘center’ or ‘left’. Defaults to ‘center’.

  • font_name (str, optional) – The name of the font typeface. Defaults to ‘Calibri’.

  • font_size (int or float, optional) – The font size. Defaults to 24.

  • bold (bool, optional) – If true, text will be formatted in bold. Defaults to False.

  • italic (bool, optional) – If true, text will be formatted in italics. Defaults to False.

Returns

None.

GetShape(slide_idx, shape_id=None, shape_loc=None)[source]

Retrieve shape object for tables based on known shape ID.

Allows for editing, modifying the table and its cells.

Return either based on left and top location passed in inches to function (shape_loc=(left, top)), or by passing shape index to function.

Parameters
  • slide_idx (int) – The index position (beginning at zero) for the slide on which the shape is located.

  • shape_id (int, optional) – An integer assigned to the shape by the powerpoint API. If not known, can pass as none, but the shape_loc should be indicated. Defaults to None.

  • shape_loc (Two-element tuple, optional) – The x and y position of the top left-hand corner of the shape. The x-position is measured from the left-most part of the slide and the y-position is measured down (positive) from the topmost part of the slide. Defaults to None.

Returns

The slide shape object located at the location or ID specified.

Return type

shape (python-pptx.Presentation.slides[slide_idx]shapes.item)

MoveSlide(slides, slide, new_idx)[source]

Move the supplemental info table to the last slide position.

Reference:

Code via github user Amazinzay (Feb 17 2021):

https://github.com/scanny/python-pptx/issues/68

Parameters
  • slides (pptx.slide.Slides) – The collection of presentation slide objects.

  • slide (pptx.slide.Slide) – The slide object that will be reordered.

  • new_idx (int) – The integer position indicating where the slide will be relocated.

Returns

None.

PrintpptxShapes(slide_number=1, shape_type='all')[source]

Diagnostic tool for indicating shape ids and locations on reporting template slides.

Parameters
  • number (slide) – The number of the slide (starting at 1) for which shape ids and locations will be printed.

  • shape_type (str) – The types of shapes on the slide to print out. ‘all’ will return all shapes regardless of type, however, selecting a particular type (e.g., ‘table’) will only return shapes on the page corresponding to the specified type.

Returns

None

SaveReport()[source]

Save the report to the /reports directory as a pptx file.

Returns

None.

SetCellBorder(cell, border_color='ffffff', border_width='20000')[source]

Edit tabular cell boarder attributes (border width, fill color, etc.).

Reference:

Parameters
  • cell (pptx table._cell object) – The cell object within a pptx.table object that will be edited.

  • border_color (str, optional) – Cell border color in hex color code. Defaults to “ffffff” (white).

  • border_width (str, optional) – The width of the cell border (in english metric units). Defaults to ‘20000’.

Returns

None.

SetSpanningCells(table, span_dict)[source]

Merge tabular cells to form cells spanning multiple rows/columns.

Parameters
  • table (pptx.table.Table) – pptx table object to modify.

  • span_dict (dict) –

    Dictionary where each entry contains list of consecutive cell indicies in the table that will be spanned.

    Example

    Say you have a table with three rows and two columns for a total of 4 cells. Let’s say we want to make the first row of cells into a single cell that spans the row. The cells in the table are accessed by the index position starting at zero in the top left corner and incrementing from left to right. The table and the indicies for each cell can be visualized in the following way:

    0

    1

    2

    3

    4

    5

    Since we want to span the columns of the first row, we need to indicate in the span_dict that the starting cell for spanning the table is the cell at index position zero and the ending cell for spanning will be the cell at index position two.

    >>>span_dict = {‘name_of_spanned_cells’: [0, 2]}

    The spanned table will then be returned as:

Returns

Table cells that have been spanned.

Return type

cells (collection of pptx.table.Table.cell objects)

SetSubscript(font)[source]

Workaround for making font object text subscript (not included in python-pptx as of v0.6.19)

Reference:

Parameters

font (pptx text run object) – Font object containing various character properies.

Returns

None.

SetSuperscript(font)[source]

Workaround for making font object text superscript (not included in python-pptx as of v0.6.19)

Reference:

Parameters

font (pptx text run object) – Font object containing various character properies.

Returns

None.

SubElement(parent, tagname, **kwargs)[source]

Modify an XML element by adding a sub-element entry and assign attributes.

Reference:

Based on Steve Canny’s code at the following link:

https://groups.google.com/g/python-pptx/c/UTkdemIZICw

Parameters
  • parent (XML element) – An XML element.

  • tagname (str) – XML tagname for the sub-element to add to the parent attribute.

  • **kwargs (dict) – Attributes to assign to the sub-element.

Returns

Updated element with attributes added.

Return type

element (XML)

add_deploy_dict_stats()

Populate deployment dictionary with statistical metrics.

Add precision and error performance targets metrics, include details about reference (for selected evaluation parameter) and monitor statistics for meteorological parameters (Temp, RH).

Calculates:

  • CV for 1-hour averaged sensor datasets

  • CV for 24-hour averaged sensor datasets

  • RMSE for 1-hour averaged sensor datasets

  • RMSE for 24-hour averaged sensor datasets

  • Reference monitor concentration range, mean concentration during testing period for 1-hour averaged measurements

  • Reference monitor concentration range, mean concentration during testing period for 24-hour averaged measurements

  • Meteorological monitor measurement range, mean value for temperature and/or relative humidity measurements at 1-hour intervals

  • Meteorological monitor measurement range, mean value for temperature and/or relative humidity measurements at 24-hour intervals

Populates:

  • SensorEvaluation.deploy_dict

Writes Files:

  • Deployment dictionary

Returns

None.

calculate_metrics()

Compute hourly, daily, and inter-sensor statistics dataframes.

Note

calculate_metrics() will check whether SensorEvaluation.deploy_dict has been populated with statistics via the add_deploy_dict_stats() method and will call this method if the dictionary has not been populated yet.

Calculates:

  • 1-hour averaged sensor vs. reference regression statistics for each sensor

  • 24-hour averaged sensor vs. reference regression statistics for each sensor

  • 1-hour averaged sensor vs. intersensor average regression statistics for each sensor

  • 24-hour averaged sensor vs. intersensor average regression statistics for each sensor

Populates:

  • SensorEvaluation.stats_df

  • SensorEvaluation.avg_stats_df

Writes Files:

  • Statistics DataFrame - Sensor vs. FRM/FEM

  • Statistics DataFrame - Sensor vs. Intersensor Average

Returns

None.

plot_met_dist()

Plot the distribution of temperature and RH recorded by meterological instruments at the collocation site.

Displays the relative frequency of meteorological measurements recorded during the testing period. Temperature (left) and relative humidity (right) measurements are displayed on separate subplots. Measurements are grouped into 15 bins, and the frequency of measurements within bin is normalized by the total number of measurements (i.e., the relative frequency) is displayed as a histogram. Additionally, a polynomial estimating the kernel density of measurements is shown for each subplot and indicates the general distribution of measurements over the range of recorded values.

This method will prioritize plotting meteorological measurements made by reference instruments, as sensor measurements are commonly biased warmer and drier than ambient conditions if measurements are made by an onboard sensing component within the housing of the air sensor. If no meteorological reference measurements are available, the method will use sensor measurements; however, a disclaimer will displayed above subplots indicating that sensor measurements are shown in the figure.

Returns

None.

plot_met_influence(met_param='Temp', report_fmt=True, **kwargs)

Plot the influence meteorological parameters (temperature or relative humidity) on sensor measurements.

Sensor measurements that have been normalized by reference measurement values for the corresponding timestamp and are plotted along the y-axis. Meteorological measurements as measured by temperature or relative humidity monitors (rather than onboard sensor measurements) are plotted along the x-axis. Scatter for each sensor are displayed as separate colors to indicate the unique response of each sensor unit.

A gray 1:1 line indicates ideal agreement between sensor and reference measurements over the range of meteorological conditions (i.e., a ratio of 1 would indicate that the sensor and reference measure the same concentration value for a given timestamp). Scatter below the 1:1 line indicates underestimation bias, and scatter above the 1:1 line indicates overestimation bias.

Parameters
  • met_param (str, optional) – Either 'Temp' for displaying the influence of temperature or 'RH' for displaying the influence of relative humidity. Defaults to None.

  • report_fmt (bool, optional) – If true, format figure for inclusion in a performance report. Defaults to True.

  • **kwargs (dict) – Plotting keyword arguments.

Returns

None.

plot_metrics(**kwargs)

Regression dot/boxplots for U.S EPA performance metrics and targets developed for PM2.5 and O3 sensor evaluations.

Results for the following metrics are shown:

  • Linearity:

    • \(R^2\): The coefficient of determination, which is a measure of linearity between sensor and reference measurement pairs.

  • Bias:

    • Slope: The slope of the ordinary least-squares regression between sensor (y-axis) and reference (x-axis) measurements.

    • Intercept: The intercept term of the ordinary least-squares regression between sensor (y-axis) and reference (x-axis) measurements.

  • Error:

    • \(RMSE\): The root mean square error between sensor and reference measurements.

    • \(NRMSE\): The normalized root mean square error between sensor and reference measurements, where RMSE has been normalized by the mean reference concentration during the testing period.

  • Precision:

    • \(CV\): The coefficient of variation of concurrently recorded sensor measurements.

    • \(SD\): The standard deviation of concurrently recorded sensor measurements.

Results are shown as either colored dots (if the number of sensors is less than four) or as boxplots (if the number of sensors exceeds three). Target ranges are indicated by gray shaded regions, and target goals are indicated by dark gray lines. Results are grouped by data averaging interval, including 1-hour and 24-hour intervals (note that some pollutants such as O3 are analyzed only at 1-hour intervals due to significant diurnal variability, so the formatting of the figure will depend on which averaging interval(s) are indicated for the parameter via the sensortoolkit.Parameter.averaging attribute).

Parameters

**kwargs (dict) – Plotting keyword arguments.

Returns

None.

plot_sensor_met_scatter(averaging_interval='1-hour', met_param='Temp', **kwargs)

Plot internal sensor temp or RH measurements against collocated reference monitor measurements.

Plots generated by this method: * Internal sensor RH vs Reference monitor RH * Internal sensor Temp vs Reference monitor Temp

Sensor measurements are plotted along the y-axis with reference measurements along the x-axis. Statistical quantities are displayed for each scatter plot including the ordinary least-squares (OLS) regression equation, R^2, RMSE, and N (the number of measurement pairs). The one-to-one line (indicating ideal agreement between sensor and reference measurements) is shown as a dashed gray line.

Parameters
  • averaging_interval (str, optional) – The measurement averaging intervals commonly utilized for analyzing data corresponding the the selected parameter. Defaults to ‘1-hour’.

  • met_param (str, optional) – The meteorological parameter to display. Defaults to None.

  • **kwargs (dict) – Plotting keyword arguments.

Returns

None.

plot_sensor_scatter(averaging_interval='24-hour', plot_subset=None, **kwargs)

Plot sensor vs FRM/FEM reference measurement pairs as scatter.

FRM/FEM reference concentrations are plotted along the x-axis, and sensor concentrations are plotted along the y-axis. Measurement pairs (i.e., concentration values for sensor and reference datasets recorded at matching timestamp entries) are colored by the relative humidity recorded by an independent meteorological instrument at the monitoring site if RH data are located within the reference_object.data['Met'] DataFrame.

Parameters
  • averaging_interval (str, optional) – The measurement averaging intervals commonly utilized for analyzing data corresponding the the selected parameter. Defaults to ‘24-hour’.

  • plot_subset (list, optional) – A list of either sensor serial IDs or the keys associated with the serial IDs in the serial dictionary. Defaults to None.

Keyword Arguments

Parameters
  • report_fmt (dict) – For displaying scatter plots on the first page of the performance report included alongside U.S. EPA’s documents outlining recommended testing protocols, performance metrics, and target values. Defaults to False.

  • **kwargs

    Additional keyword arguments passed to the underlying sensortoolkit.plotting.scatter_plotter() method.

Returns

None.

plot_timeseries(report_fmt=True, **kwargs)

Plot sensor and FRM/FEM reference measurements over time.

Sensor measurements are indicated by distinct colors in a discrete color palette. FRM/FEM measurements are shown as black lines. The x-axis indicates the date in 5-day increments (default, although customizable). Measurement values are plotted along the y-axis.

Parameters
  • report_fmt (bool, optional) – If true, format figure for inclusion in a performance report. Defaults to True.

  • **kwargs (dict) – Plotting keyword arguments.

Returns

None.

print_eval_conditions(averaging_interval='24-hour')

Display conditions for the evaluation parameter and meteorological conditions during the testing period.

Values for the evaluation parameter recorded by the sensor, FRM/FEM instrument, and temperature and relative humidity values are displayed by the mean of 1-hour or 24-hour averages during the testing period. The range (min to max) of each parameter is listed below the mean in parentheses.

Parameters

averaging_interval (str, optional) – The measurement averaging intervals commonly utilized for analyzing data corresponding the the selected parameter. Defaults to ‘24-hour’.

Returns

None.

print_eval_metrics(averaging_interval='24-hour')

Display a summary of performance evaluation results using EPA’s recommended performance metrics (‘PM25’ and ‘O3’).

The coefficient of variation, sensor vs FRM/FEM OLS regression slope, intercept, and R2, and RMSE are displayed. Regression statistics are computed for each sensor, and the mean metric value is presented alongside the range (min to max).

Parameters

averaging_interval (dict, optional) – The measurement averaging intervals commonly utilized for analyzing data corresponding the the selected parameter. Defaults to ‘24-hour’.

Returns

None.