Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensor charts load most recent beliefs by default #307

Merged
merged 1 commit into from Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions flexmeasures/data/models/time_series.py
Expand Up @@ -244,6 +244,7 @@ def chart(
source: Optional[
Union[DataSource, List[DataSource], int, List[int], str, List[str]]
] = None,
most_recent_beliefs_only: bool = True,
include_data: bool = False,
dataset_name: Optional[str] = None,
**kwargs,
Expand All @@ -256,6 +257,7 @@ def chart(
:param beliefs_after: only return beliefs formed after this datetime (inclusive)
:param beliefs_before: only return beliefs formed before this datetime (inclusive)
:param source: search only beliefs by this source (pass the DataSource, or its name or id) or list of sources
:param most_recent_beliefs_only: only return the most recent beliefs for each event from each source (minimum belief horizon)
:param include_data: if True, include data in the chart, or if False, exclude data
:param dataset_name: optionally name the dataset used in the chart (the default name is sensor_<id>)
"""
Expand Down Expand Up @@ -283,6 +285,7 @@ def chart(
event_ends_before=event_ends_before,
beliefs_after=beliefs_after,
beliefs_before=beliefs_before,
most_recent_beliefs_only=most_recent_beliefs_only,
source=source,
)
# Combine chart specs and data
Expand Down