On Aug 19, 2016, at 12:59 PM, dejan.stojkovich@gmail.com wrote:
Hi,
Bokeh figure should be in `fig = mpl.to_bokeh(ax.figure)` with additional methods to user preference.
I would not recommend Bokeh in current shape, as shortcut to Web GIS. It would be easier to develop directly in JS then trying this kind of abstraction (Bokeh does not provide nor it claims to have GIS features for general use)
I would suggest you try "folium" Python package (interface to Leaflet), which is much easier for GIS data and supports geopandas among other things.
Altair/Vega are reasonably supported as well as D3/mpld3.
Cheers,
Dejan
On Monday, August 15, 2016 at 7:03:02 PM UTC+2, vedar wrote:
Hi,
I'm trying some shortcuts to get choropleth map in Bokeh.
I converted GIS vector to geojson, then load in geopandas:
import geopandas as gpd
df = gpd.read_file('sample.geo.json')
Result from this is pandas dataframe with GIS features. This dataframe has .plot() method which gives matplotlib AxesSubplot object:
ax = df.plot()
fig = mpl.to_bokeh(ax.figure)
show(fig)
This is perhaps as easy as it can get for this task.
However generated HTML file draws this object in pretty basic style and I would like to set some preferences as in regular Bokeh figure, like which tools, dimensions...
Any ideas?
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e02d2cdc-0239-48c1-8a2b-c478f1d5b7c8%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.