Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive charts - from a map! #1232

Closed
AnneEstoppey opened this issue Nov 27, 2018 · 7 comments
Closed

Interactive charts - from a map! #1232

AnneEstoppey opened this issue Nov 27, 2018 · 7 comments

Comments

@AnneEstoppey
Copy link

Hello there,

I was wondering if it would be possible to have interactive chart also working on a map.

Meaning that by selecting a group of points on my map, I would be able to see the corresponding data in my bar chart, for instance. Similarly as below, just that the scatter point would be, in fact, a map.

I don't think I have seen that in any other package (but I should perhaps investigate). I think it would be a really great additional interactive feature.

If you need sample datasets (in my case in the exploration well public data of Norway), please let me know.

Thanks in advance,
Cheers
Anne

interactive_chart

@jakevdp
Copy link
Collaborator

jakevdp commented Nov 27, 2018

Currently, no, that's not possible. This would require adding interval selection support to geographic projections in Vega-Lite. This is an open issue in Vega-Lite: vega/vega-lite#3306

@jakevdp
Copy link
Collaborator

jakevdp commented Nov 27, 2018

though note that some interactions (based on single/multi selections rather than interval selections) do work currently, e.g. https://altair-viz.github.io/gallery/us_state_capitals.html

@AnneEstoppey AnneEstoppey changed the title Interactive charts - from a map! - enhancement Interactive charts - from a map! Nov 28, 2018
@AnneEstoppey
Copy link
Author

AnneEstoppey commented Nov 28, 2018

Oh ok I see. Hmm. I hope 'they' find a way. That would be really cool.

Yes the utility from your link, I can do that in mapbox.
I am intensively using mapbox for more elaborate maps.
Maybe I should also ask them about interactivity between a map and a graph. I thought actually that it might be 'easier' to add this functionality from where you are in Altair :-)

Cheers
Anne

@jakevdp
Copy link
Collaborator

jakevdp commented Nov 28, 2018

No, we don't really have control over any of that in Altair. Altair just produces JSON specifications that are interpreted and rendered by the vega stack... so all aspects of the rendering are in the domain of vega & vega-lite.

@AnneEstoppey
Copy link
Author

AnneEstoppey commented Nov 29, 2018

Ok, I understand, thanks a lot for information, that makes sense.

I'll follow the vega github :-)

Cheers
Anne

@joelostblom
Copy link
Contributor

@AnneEstoppey is this what your are looking for https://stackoverflow.com/a/65948144/2166823?

@binste
Copy link
Contributor

binste commented May 26, 2023

This was added in Vega-Lite 5.7 and hence is available in Altair 5. See vega/vega-lite#6953 for a Vega-Lite example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants