Skip to content

Commit

Permalink
feat: heatmap shows only data from a single source
Browse files Browse the repository at this point in the history
Signed-off-by: F.N. Claessen <felix@seita.nl>
  • Loading branch information
Flix6x committed Jul 31, 2023
1 parent 8222cf8 commit ef4563e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flexmeasures/data/models/charts/belief_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ def daily_heatmap(
"calculate": "datum.source.name + ' (ID: ' + datum.source.id + ')'",
"as": "source_name_and_id",
},
# In case of multiple sources, arbitrarily choose the first one occurring in the data
{
"window": [{"op": "first_value", "field": "source.id", "as": "first_source_id"}],
"groupby": [],
},
{"filter": "datum.source.id == datum.first_source_id"},
],
},
{
Expand Down

0 comments on commit ef4563e

Please sign in to comment.