QC Frameworks

Apply QC Framework

Methods to apply QC qc_frameworks to apply to rainfall data to create quality controlled data.

rainfallqc.qc_frameworks.apply_qc_framework.run_qc_framework(data, qc_framework, qc_methods_to_run, qc_kwargs, user_defined_framework=None)[source]

Run QC methods from a QC framework.

Parameters:
  • data (DataFrame) – Rainfall data to QC.

  • qc_framework (str) – QC framework to run, can be ‘in-built’ type i.e. IntenseQC or pyPWSQC or ‘custom’ for user-defined.

  • qc_methods_to_run (list) – Which methods should be run within that framework i.e. [QC1, QC2]

  • qc_kwargs (dict) – Keyword arguments to pass to QC framework methods.

  • user_defined_framework (dict) – A user-defined QC framework dictionary, required if qc_framework is ‘custom’.

Return type:

DataFrame

Returns:

:
qc_results

Results of running QC framework.

In-built QC Frameworks

In-built QC frameworks to apply to rainfall data to create quality controlled data.

rainfallqc.qc_frameworks.inbuilt_qc_frameworks.get_qc_name_from_qc_key(qc_key)[source]

Return the name of a QC check.

Parameters:
  • qc_key: – QC check ID

  • qc_key (str)

Return type:

str

Returns:

:
qc_name:

QC check name