pvanalytics.quality.gaps.completeness_score#

pvanalytics.quality.gaps.completeness_score(series, freq=None, keep_index=True)#

Calculate a data completeness score for each day.

The completeness score for a given day is the fraction of time in the day for which there is data (a value other than NaN). The time duration attributed to each value is equal to the timestamp spacing of series, or freq if it is specified. For example, a 24-hour time series with 30 minute timestamp spacing and 24 non-NaN values would have data for a total of 12 hours and therefore a completeness score of 0.5.

Parameters
  • series (Series) – A DatetimeIndexed series.

  • freq (str, default None) – Interval between samples in the series as a pandas frequency string. If None, the frequency is inferred using pandas.infer_freq().

  • keep_index (boolean, default True) – Whether or not the returned series has the same index as series. If False the returned series will be indexed by day.

Returns

A series of floats giving the completeness score for each day (fraction of the day for which series has data).

Return type

Series

Raises

ValueError – If freq is longer than the frequency inferred from series.

Examples using pvanalytics.quality.gaps.completeness_score#

Missing Data Periods

Missing Data Periods

PV Fleets QA Process: Temperature

PV Fleets QA Process: Temperature

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Irradiance

PV Fleets QA Process: Power

PV Fleets QA Process: Power