scicloj / tablecloth.time

Tools for the processing and manipulation of time-series data in Clojure.
Other
18 stars 1 forks source link

Will we support a notion of `keys` like they have in R's tsibble? #44

Open ezmiller opened 3 years ago

ezmiller commented 3 years ago

R's tsibble library identifies keys on a dataset. keys are the columns, in addition to the syntax, that if grouped by in addition to the time index will produce unique entries for each time observation.

A good example is a dataset containing daily stock price values for multiple stocks. In addition to the time index, they :symbol column would be a key. If you group by the index and the key, you get one daily stock price for each symbol. So even though there are duplicate time elements in the index, they are actually unique when combined with the key(s) and so the index remains valid.

We already have one function that could use keys: adjust-interval. We had support for it in a previous PR, but it will possibly be removed temporarily in #43 .