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
Issue 502 visually distinguish forecasts from measurements #503
Issue 502 visually distinguish forecasts from measurements #503
Conversation
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Pull Request Test Coverage Report for Build 3243005744
💛 - Coveralls |
Signed-off-by: F.N. Claessen <felix@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work, I tried it locally.
- One wish to document function parameters
- Any idea how to tell the user about what the dashed line means? My only idea was to mention it in the legend.
vega.expressionFunction('quantityWithUnitFormat', function(datum, params) { | ||
return d3.format(params[0])(datum) + " " + params[1]; | ||
}); | ||
vega.expressionFunction('timedeltaFormat', function(timedelta, params) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we document here what I had to find out by myself?
params[0] is a D3 format identifier (.e.g "d" for days)
params[1] is a multiplier which decides from how many X on we format as Y (e.g. <=3 days means we format as "hours")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, d stands for decimal notation, rounded to integer. It's a d3-format rather than a d3-time-format. I'm expanding the inline documentation.
Signed-off-by: F.N. Claessen <felix@seita.nl>
…rs to show Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…stinguish_forecasts_from_measurements # Conflicts: # documentation/changelog.rst
Signed-off-by: F.N. Claessen <felix@seita.nl>
I added a legend. That took me some time, but it was an significant hiatus, so thanks for pointing me to it. At the moment the legend uses the technical terms Recorded ex ante and Recorded ex post. An alternative like measurements and forecasts doesn't work very well, because they imply a belief horizon together with a specific (type of) source. For example, some ex-post beliefs are not measurements but rather still forecasts (such as a belief from a trader about day-ahead prices formed after gate closure but before publication by the exchange), while some ex-ante beliefs are not forecasts, but schedules. If we later start using more different strokes derived from a combination of belief horizon and source, we should probably reconsider the legend terms. |
flexmeasures/api/dev/sensors.py
Outdated
**{attr: getattr(asset, attr) for attr in attributes}, | ||
**{ | ||
"timerange_of_sensors_to_show": { | ||
"start": datetime.datetime(2020, 12, 3, 14, 0, tzinfo=pytz.utc), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a hard-coded value used in development?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I encountered significant page loading delay here. I'll make a new ticket to make this asynchronous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #515.
Signed-off-by: F.N. Claessen <felix@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the code out locally, and it works fine.
This PR creates a visual distinction between forecasts/schedules (dashed lines) and measurements (solid lines). It also expands the tooltip with timing info regarding the forecast/schedule horizon or measurement lag.
Closes #502.