livebook-dev / kino_vega_lite

Vega-Lite (graphics) integration for Livebook
Apache License 2.0
26 stars 8 forks source link

Infer field types #13

Closed jonatanklosko closed 2 years ago

jonatanklosko commented 2 years ago

Currently we default to no type and let Vega-Lite infer the type, however that inference is not really effective, especially for numbers that default to nominal (see the docs for the complete rules). Whenever a field changes, we should look at the value in the first row and set a default type based on that. For numbers it should always be quantitative, for strings we should try parsing as Date/DateTime, and fall back to nominal if this doesn't work.