How would one extract the most recent timeseries from timeseries data and compare it to various values .
Thanks!
How would one extract the most recent timeseries from timeseries data and compare it to various values .
Thanks!
There are multiple ways you can do what you are describing depending on where in the Platform you are interacting with time series data.
If you are interacting with timeseries data in workshop through an object type that has a time series property this documentation page explains how to do a lot of the things you are asking about: documentation
If you are interacting with timeseries data using Functions, this documentation page would be useful: documentation. There is a code example there for how to get the last point which you explicitly ask about.
If you want a low-code way to perform simple analysis against time series data, Quiver would be the way to do that: documentation
Alternatively, you can use FoundryTS which is a Python library for running queries against time series data in applications like code repositories and workbooks: documentation
Hi @BeltwayData, in addition to @pchristofi 's suggestions, this is how you would get the latest point in a given timeseries using FoundryTS:
>>> series_1 = F.points((1, 1.0), (101, 2.0), (200, 4.0), (201, 8.0), name="series-1")
>>> print(series_1.to_pandas())
timestamp value
0 1970-01-01 00:00:00.000000001 1.0
1 1970-01-01 00:00:00.000000101 2.0
2 1970-01-01 00:00:00.000000200 4.0
3 1970-01-01 00:00:00.000000201 8.0
>>> latest_point = F.last_point()(series_1)
>>> print(latest_point.to_pandas())
timestamp value
0 1970-01-01 00:00:00.000000201 8.0
Once you have the dataframe, you can use the timeseries data point’s timestamp or value for further analysis.