Is there a way to count the number of cycles in a graph of repeated cycles?

Hi again @clawsonpaul

This is not perfect, but might help you get started…

I think you will need to define the time interval for a typical cycle (10 minutes, 14 hours, 1 day, etc.).

Below is some temperature data that I have for 5 days, where it’s very clear there is a peak every 1 day. So I wrote the query as shown:

from(bucket: "sampledata")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "WeatherData")
  |> filter(fn: (r) => r["_field"] == "OutdoorTemp")
  |> aggregateWindow(every: 1d, fn: max, createEmpty: false)
  |> count()
  |> yield(name: "max")