sensortoolkit.calculate._uptime.uptime

uptime(dataframe_object, key=None)[source]

Compute uptime for either sensor or reference data.

Uptime calculated as the number of non-null data points recorded within the deployment period divided by the total number of data points (null + non-null).

Parameters
  • dataframe_object (pandas dataframe or a list of dataframes) – Sensor dataframe or list of sensor dataframes

  • key (str) – A unique identifier corresponding to the dataframe passed (either a serial ID, number, or other string).

Returns

A dictionary containing entries for each sensor in the testing group and sub-dictionaries for each sensor indicating the uptime, as well as how many hourly periods met or did not meet the completeness threshold and the total number of hours that the sensors were sampling.

Return type

uptime_dict (dict)