vega-lite icon indicating copy to clipboard operation
vega-lite copied to clipboard

automatically imputing time units for ordinal scales

Open kanitw opened this issue 4 years ago • 6 comments

(Forked from #6589)

For example, there are 7 days in a week, but without manual imputation we show this:

image

cc: @willium

kanitw avatar Jun 06 '20 18:06 kanitw

Though it's unclear (1) what should be the syntax to enable / disable automatic imputation and (2) which time units should be automatically imputed.

For (2), quarter, month, day obviously should be imputed. But what about "date", "hours", "seconds"?

kanitw avatar Jun 06 '20 18:06 kanitw

(1) If we make tick counts better for the day time units (as in the second screenshot in the original issue), will it be necessary to impute?

for (2) I think those ought to be as well (+ minutes) so long as we don't allow for fractional dates, hours, or minutes, seconds.

willium avatar Jun 06 '20 23:06 willium

For documentation's sake, I believe Vega's timeSequence expression will be useful for doing the imputation.

willium avatar Jun 06 '20 23:06 willium

For (1) could we not use the existing nice property? for example

If not, I propose we add a boolean temporal scale property impute much like how continuous scales have a interpolate property.

willium avatar Jun 06 '20 23:06 willium

Help me remember, but I think we removed imputation from time units with ordinal some time ago since we don’t really want imputation for any time unit (e.g. month date) with too many values. While I agree that imputation is often useful, I don’t think I want it to be the default.

domoritz avatar Jun 07 '20 04:06 domoritz

Would it be possible to update the documentation to say that it's not possible to impute temporal series? Or log a warning in the console?

colleen-love avatar May 03 '22 00:05 colleen-love