HackerTrans
TopNewTrendsCommentsPastAskShowJobs

joelostblom

no profile record

comments

joelostblom
·2 anni fa·discuss
If you are interested in similar shortcuts for repeated charts in Altair, I'm experimenting a bit with such a syntax in the package altair-ally https://joelostblom.github.io/altair_ally/examples.html. Feel free to try it out and leave feedback!

(disclaimer: I'm a co-maintainer of Altair)
joelostblom
·2 anni fa·discuss
Altair actually does introspection when the data is passed as a dataframe (e.g. via pandas or polars). In these cases you can leave out the `:Q` and just write `x='abc'` and Altair will figure out that the encoding type shoudl be quantitative based on the column datatype in the dataframe.

If you are reading the data directly from a URL instead of via a dataframe, the URL is passed on to Vega-Lite and Python never sees the data, so no introspection can be made on the Altair side of things.

(disclaimer: I'm a co-maintainer of Altair)
joelostblom
·2 anni fa·discuss
Feel free to open an issue to let us know which parts of the documentation you find obscure and if you have suggestions for how to improve them. We did a larger overhaul a few months back and are always open to feedback on how to improve it further! https://altair-viz.github.io/

(disclaimer: I'm a co-maintainer of Altair)