Replies: 2 comments 1 reply
-
Thanks for sharing the material and some of the takeaways from Scipy!
Although it is breaking, it sounds quite useful to receive an error instead of the expression silently not doing what's expected, so maybe it could be considered for a future major Vega release? |
Beta Was this translation helpful? Give feedback.
-
@jonmmease I was holding off on this until an issue was opened, but I've rolled it into a longer-term RFC as the I thought it might be helpful sharing here how I arrived there, as it is an alternative solution for the same problem. Why not a mypy plugin?There are several other type checkers spec, discussion and this would only work for If not
|
Beta Was this translation helpful? Give feedback.
-
@ChristopherDavisUCI and I gave a Vega-Altair tutorial at SciPy 2024 Monday morning. The tutorial materials are at https://github.com/vega/SciPy2024-Altair-Tutorial. I just wanted to record some notes on potential Vega-Altair features / fixes that participants brought up.
filter
transform where they misspelled one of the columns in adatum.{col}
expressions. This doesn't result in an error, as Vega (and VegaFusion) follow JavaScript's semantics where this expressions returnsundefined
rather than erroring. This resulted in the entire filter expression coercing tofalse
, and all of the data being dropped. Making this an error in Vega would be a breaking change, but I think we could make VegaFusion more strict about this.alt.Y("countt()")
. I didn't know off hand whether there's a more general form possible here that would type check. Or perhaps we could write a mypy plugin that would validate these aggregation strings.png
renderer by settingscale_factor
to 2+, but I don't think it's possible to accomplish this with an interactive chart. This would need to be implemented in Vega if it's not already possible.pil_image_to_uri
utility function I added in plotly for this conversion.to_url()
andopen_editor()
methods to this instance. I'm thinking it could make a lot of sense to have Altair check for aVEGA_EDITOR_URL
environment variable, and it found use this for these methods. I'm also not sure if it's currently possible to override the editor URL in theOpen in Editor
dropdown entry.I can turn these into issues later, but just wanted to document the notes quickly while they were fresh in my mind.
Beta Was this translation helpful? Give feedback.
All reactions