Skip to content

Add event aggregation and outputs.#359

Draft
jetuk wants to merge 10 commits into
mainfrom
event-aggregator
Draft

Add event aggregation and outputs.#359
jetuk wants to merge 10 commits into
mainfrom
event-aggregator

Conversation

@jetuk
Copy link
Copy Markdown
Member

@jetuk jetuk commented Mar 27, 2025

I am putting this here for anyone to have a look at it. It is still a WIP that I've been playing with for a while. I am not totally sure the interface between the aggregators and recorders/outputs is correct. However, it is functional.

Some remaining TODOs:

  • Write some tests for event output.
  • Implement event aggregation (probably assumes event duration is the value for now).
  • Write some documentation in the book about how this all works.
  • Implement to_dataframe() for the memory recorder
    • Maybe convert the memory internal data to polars dataframe(s) during finalise.
      • Would this make the aggregation functions easier?
      • Will probably consume more memory as a flat dataframe though.
    • Add Python interface to access this.
  • Can aggregation functions be shared between parameters and outputs. Seems like we have duplicate implementations here.

@jetuk jetuk requested a review from Batch21 October 7, 2025 15:56
@jetuk
Copy link
Copy Markdown
Member Author

jetuk commented Oct 7, 2025

@Batch21 could you give this a high level review to see what you think?

# Conflicts:
#	pywr-schema/src/metric_sets/mod.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant