-
Notifications
You must be signed in to change notification settings - Fork 611
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
feat: support pre-binned timeUnit #8971
Conversation
a90d830
to
e201a97
Compare
4e318f5
to
aa264b4
Compare
Extracting since we'll later use this for other calculation too
f4c4c59
to
fd898bb
Compare
499a82d
to
9c018f3
Compare
9c018f3
to
b9efade
Compare
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.
Just made a minor comment. It looks good to me.
site/docs/transform/timeunit.md
Outdated
By default, all time units represent date time using local time. To use UTC time, you can add the `utc` prefix (e.g., `"utcyear"`, `"utcyearmonth"`). | ||
- By default, all time units represent date time using local time. | ||
- To use UTC time, you can add the `utc` prefix (e.g., `"utcyear"`, `"utcyearmonth"`). | ||
- For timeUnit in encoding, you can also add `"binned"` prefix (e.g., `"binnedyearmonth"` or `"binnedutcyearmonth"`) for Chronological time unit (i.e., units that are truncated date time) |
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.
Not sure what Chronological time unit
means here. Can we just say truncated (or binned) date time directly?
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.
It's another semantic-based way to explain date trunc (which focus on action being done on the date object, rather than the semantics).
It's a term that Jeff uses in Vega doc. https://vega.github.io/vega/docs/transforms/timeunit/
I added a bit more explanation so I hope it makes more sense now.
Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
Fix #8969
This allows us to use timeUnit without adding unnecessary timeUnit to re-bin the data, if the data has already been binned.