badc.aggregate_apiΒΆ

High-level helpers for working with canonical detection artifacts in Python.

The Typer CLI exposes aggregation/report commands, but notebooks/tests often need a lightweight API that returns DetectionRecord objects or pandas DataFrames without shelling out to the CLI. This module wraps the underlying badc.aggregate functions plus badc.duckdb_helpers so downstream code can load detections, write CSV/Parquet artifacts, and open DuckDB bundles directly.

Functions

aggregate_inference_outputs(detections_dir, *)

Load detections and optionally write CSV/Parquet artifacts.

detections_to_dataframe(records)

Convert DetectionRecord objects into a pandas DataFrame.

load_bundle_views(database, *[, ...])

Return pandas DataFrames for a DuckDB bundle produced by badc report bundle.

load_detection_dataframe(detections_dir[, ...])

Load detection records directly into a pandas DataFrame.

load_detection_records(detections_dir[, ...])

Return canonical detection records for detections_dir.