opennem / opennem-fe

An Open Platform for National Electricity Market Data
https://opennem.org.au
MIT License
62 stars 11 forks source link

12 month rolling issues with quarterly, seasonal and half-year grouping #114

Closed simonhac closed 1 year ago

simonhac commented 1 year ago

This looks reasonable — Year to August 2022 totals 207,554 GWh:

image

However, this looks dodgy:

  1. Year to Winter 2022 totals 620,928 GWh:

    image

    (This should sum the 4 seasons up to and including the selected season, but seems to be summing a period 3 times as long.)

  2. Year to 2022Q2 totals 618,004 GWh:

    image

    (This should sum the 4 quarters up to and including the selected quarter, but seems to be summing a period 3 times as long.)

  3. Year to 2022H1 totals 1,233,554 GWh:

    image

    (This should sum the 2 half-years up to and including the selected half-year, but seems to be summing a period 6 times as long)

chienleng commented 1 year ago

the base rolling sum is right but I didn't update the period grouping to take into account how the rolling sum works, so it was just summing the rolling sum dataset for season (3 months), quarter (3 months) and half year (6 months).

chienleng commented 1 year ago

I should summed up the period first, then run it through the rolling sum calculation.