transition-zero / tz-client

A client repository for accessing FEO data programmatically.
https://docs.feo.transitionzero.org
Apache License 2.0
21 stars 4 forks source link

Time ranges for records #129

Open isabellasoldner opened 4 months ago

isabellasoldner commented 4 months ago

Feature Type

Problem Description

Currently not possible to get time ranges using python client, which is needed to use the power generation data

records = []
for id in assets.id.unique():
  record_collection = RecordCollection.search(
      id,
      valid_timestamp_start="2023-01-01 00:00:00",
      datum_type=["production"],
      limit=1000
  )
  records.append(record_collection)
records = pd.concat(records)

# Can't get records within a date range !!

records = records[records.valid_timestamp_start < "2023-02-15 00:00:00"]

Feature Description


records = []
for id in assets.id.unique():
  record_collection = RecordCollection.search(
      id,
      valid_timestamp_start="2023-01-01 00:00:00",
      valid_timestamp_end="2024-01-01 00:00:00",
      datum_type=["production"],
      limit=1000
  )
  records.append(record_collection)
records = pd.concat(records)