metobs_toolkit.station.Station.get_qc_stats#

Station.get_qc_stats(obstype: str = 'temp', make_plot: bool = True) dict[str, pd.Series] | Figure[source]#

Summarize QC label frequencies for one station and optionally plot pies.

The method gathers: * final label counts across all records (including gaps) from SensorData.df; * outlier-only label counts from SensorData.outliersdf; * per-check outcome counts (flags per QC check) via SensorData.get_qc_freq_statistics. When make_plot is True, these counts are visualized with plotting.qc_overview_pies.

Parameters:
  • obstype (str, optional) – Observation type to evaluate, by default “temp”.

  • make_plot (bool, optional) – If True, return a figure with pie charts; if False, no figure is created. Default is True.

Returns:

Figure with QC overview pies when make_plot is True; otherwise a dictionary with keys all_labels, outlier_labels, and per_check_labels.

Return type:

matplotlib.figure.Figure or dict[str, pandas.Series]

Notes

Changed in version 1.1.0: When make_plot=False, the return type changed from pandas.DataFrame to dict[str, pandas.Series] with keys all_labels, outlier_labels, and per_check_labels. Update any code that previously unpacked or indexed the returned DataFrame.