3 ms·
Take a look at the underlying Vega-Lite library (https://vega.github.io/vega-lite/ https://vega.github.io/vega-lite/) and the paper that introduces the grammar
by domoritz 6y ago
Take a look at the underlying Vega-Lite library (https://vega.github.io/vega-lite/ https://vega.github.io/vega-lite/) and the paper that introduces the grammar of interactions (https://idl.cs.washington.edu/papers/vega-lite/ https://idl.cs.washington.edu/papers/vega-lite/) for some insights into the design.
What specifically do you find unergonomic about the design of Altair?
- animal_spirits 6y agoAltair is a cool library and I hope it continues to improve. I like using it, but the main problem I've had with Altair is the size of the plots. Unless you save the plot as an image, the plot is rendered as a Vega-Lite spec JSON object. The JSON spec stores the entire dataset, so it limits you to using 5,000 data points. Otherwise you'll have this insanely large JSON object representing the plot. There are work-arounds like using a data server however.
- prepend 6y agoYou can disable that if you need to and “insanely” large json objects are still just hundreds of megs or maybe a few gigs, still reasonable. But I’ve also been able to just preprocess some of the aggregation and calculation before the visualization and that’s worked out ok. I’ve used it over plotly a few times because there’s no offline/online issue with plotly, and I think the Altair method of saving interactive javascript versions more straightforward than plotly.
- xkcd-sucks 6y ago> the plot is rendered as a Vega-Lite spec JSON object. The JSON spec stores the entire dataset, so it limits you to using 5,000 data points Use "named datasets", specify data via URL, etc. Do not ever specify data inline with the spec. It might get loaded into a JSON object under the hood regardless, IDK, but it's remarkably faster and simple plots of ~100000 points will work on the average computer/vm