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 fromSensorData.outliersdf; * per-check outcome counts (flags per QC check) viaSensorData.get_qc_freq_statistics. Whenmake_plotis True, these counts are visualized withplotting.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_plotis True; otherwise a dictionary with keysall_labels,outlier_labels, andper_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 frompandas.DataFrametodict[str, pandas.Series]with keysall_labels,outlier_labels, andper_check_labels. Update any code that previously unpacked or indexed the returned DataFrame.