Event Tracking Documentation

ecopipeline.event_tracking.flag_boundary_alarms(df: DataFrame, config: ConfigManager, default_fault_time: int = 15, site: str = '') DataFrame

Function will take a pandas dataframe and location of alarm information in a csv, and create an dataframe with applicable alarm events

Parameters:
df: pd.DataFrame

post-transformed dataframe for minute data. It should be noted that this function expects consecutive, in order minutes. If minutes are out of order or have gaps, the function may return erroneous alarms.

configecopipeline.ConfigManager

The ConfigManager object that holds configuration data for the pipeline. Among other things, this object will point to a file called Varriable_Names.csv in the input folder of the pipeline (e.g. “full/path/to/pipeline/input/Variable_Names.csv”). The file must have at least three columns which must be titled “variable_name”, “low_alarm”, and “high_alarm” which should contain the name of each variable in the dataframe that requires the alarming, the lower bound for acceptable data, and the upper bound for acceptable data respectively

default_fault_timeint

Number of consecutive minutes that a sensor must be out of bounds for to trigger an alarm. Can be customized for each variable with the fault_time column in Varriable_Names.csv

site: str

string of site name if processing a particular site in a Variable_Names.csv file with multiple sites. Leave as an empty string if not aplicable.

Returns:
pd.DataFrame:

Pandas dataframe with alarm events