anomalies, trend_avg, trend_stdev = _classify_anomalies(
{k: v for k, v in zip(x_axis, df[_VALUE[ttype]])}
anomalies, trend_avg, trend_stdev = _classify_anomalies(
{k: v for k, v in zip(x_axis, df[_VALUE[ttype]])}
for idx, anomaly in enumerate(anomalies):
if anomaly in (u"regression", u"progression"):
anomaly_x.append(x_axis[idx])
anomaly_y.append(trend_avg[idx])
anomaly_color.append(_ANOMALY_COLOR[anomaly])
for idx, anomaly in enumerate(anomalies):
if anomaly in (u"regression", u"progression"):
anomaly_x.append(x_axis[idx])
anomaly_y.append(trend_avg[idx])
anomaly_color.append(_ANOMALY_COLOR[anomaly])
+ hover_itm = (
+ f"date: {x_axis[idx].strftime('%d-%m-%Y %H:%M:%S')}<br>"
+ f"trend [pps]: {trend_avg[idx]}<br>"
+ f"classification: {anomaly}"
+ )
+ if ttype == "pdr-lat":
+ hover_itm = hover_itm.replace("[pps]", "[us]")
+ hover.append(hover_itm)