getInterpolatedRange
Get evenly spaced points between a start and end time.
Signature
Section titled “Signature”getInterpolatedRange(tags, start, end, count=1000, output="json")
tags(str | list[str])start(str | int | float | datetime)end(str | int | float | datetime)count(int, default: 1000)output(str):json(default),df,raw,string
Inputs
Section titled “Inputs”tags: Tag name or list of tags to interpolate.start: Start of time window.end: End of time window.count: Number of points per tag.output: Output format selector.
Examples
Section titled “Examples”JSON output (single tag)
Section titled “JSON output (single tag)”range_points = hm.getInterpolatedRange( "DEMO_02TI301.PV", "2024-01-01 00:00:00", "2024-01-01 12:00:00", 100,)Output:
[ { "timestamp": "2024-01-01T00:00:00Z", "value": 38.0, "status": "OK" }, { "timestamp": "2024-01-01T00:07:12Z", "value": 37.9, "status": "OK" }]DataFrame output (multiple tags)
Section titled “DataFrame output (multiple tags)”range_df = hm.getInterpolatedRange( ["DEMO_02TI301.PV", "DEMO_02TI201.PV"], "2024-01-01 00:00:00", "2024-01-01 06:00:00", 6, output="df",)Output (df):
DEMO_02TI301.PV DEMO_02TI201.PV2024-01-01 00:00:00 38.0 42.02024-01-01 01:00:00 37.7 41.8