Quality control

Time Series Quality Control (QC) Module

This module provides a framework for applying quality control checks to TimeFrame using Polars. QC checks are implemented as subclasses of QCCheck and can be registered and instantiated by name, class, or instance.

It supports various QC checks including:

  • ComparisonCheck: Compare values against thresholds or sets.

  • RangeCheck: Verify values fall within or outside a given range.

  • TimeRangeCheck: Apply range checks directly to the time column.

  • SpikeCheck: Detect sudden spikes based on differences with neighbors.

  • FlatLineCheck: Detect flat lines by checking for consecutive repeated values.

Quality control methods

ComparisonCheck

Compares values against a given value using a comparison operator.

FlatLineCheck

Detect flat lines by checking for consecutive repeated values.

RangeCheck

Check that values fall within an acceptable range.

SpikeCheck

Detect spikes by assessing differences with neighboring values.

TimeRangeCheck

Flag rows where the primary time column of the time series fall within an acceptable range.

Pipeline

QcCheckPipeline

Encapsulates the logic for the QC pipeline steps.