holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
577 stars 75 forks source link

3d.js-style projections and maps #97

Open rabernat opened 6 years ago

rabernat commented 6 years ago

I am a big fan of geoviews, and I thank you all for this great package.

I am an oceanographer and experienced pydata user. What I would really love to be able to do is take my data and put it on a dj.js-style 3D globe like this: http://mbostock.github.io/d3/talk/20111018/azimuthal.html or this: https://www.jasondavies.com/maps/voronoi/airports/

I know this is possibly out of scope for geoviews. On the other hand, maybe you agree with me that this is the sort of thing would be just awesome. So my question is, how far away is such a feature from reality? I understand the geoviews --> holoviews --> bokeh dependency. Which layer of this cake needs the most work to make such a thing possible?

Thanks for indulging this whimsical issue.

philippjfr commented 6 years ago

There are two different layers where one could think about introducing something like this, I'll try to quickly outline the options for making something like this happen:

I'm not sure what the best approach here would be, the latter approach could probably be made to work much more quickly but writing bokeh models would afford more flexibility and will play nicely with existing plots. Neither is necessarily out of scope for geoviews.

jbednar commented 6 years ago

Right; you can see similar functionality outside of the geo world in the plotly backend, where there is a 3D JavaScript-based interactive interface already. I'd be supportive of having this type of functionality in GeoViews. I would think the second option there would be a good way to start, and would let the relevant functionality be identified and tested before trying to do some deeper integration. Globe plots are also only one of a variety of d3.js plot types that would be useful to have, which again would support having it as a separate backend.

jbednar commented 6 years ago

I also talked to Bryan Van de Ven about whether he'd be happy for such functionality to be contributed to Bokeh, and he was.

Bryan already has plans to address Philipp's question about about how such an extension would be distributed. He hopes to set up a mechanism by which "extra" bits of Bokeh can be loaded as needed without having to be conda/pip installed explicitly, to make there be a market for smaller chunks of functionality that extend Bokeh beyond what the core library does.

I think that does sound helpful, though I'd expect that D3.js and/or 3D support would be a big enough chunk to be worth installing separately, so we don't necessarily have to solve the marketplace/app-store question now. Whether there is such a distribution mechanism or not, looks like it does make sense to do it using Bokeh custom models if we choose to.

rabernat commented 6 years ago

Thanks for picking up this idea! I am very excited by the possibility. I would be happy to give feedback on any early prototypes that emerge.

philippjfr commented 6 years ago

As part of an ongoing contract we were tasked with prototyping something similar, so I've begun prototyping a rendering backend based on CesiumJS, which you can see here: https://anaconda.org/philippjfr/cesiumjs_backend/notebook