I see that we have an help entry for Google Maps. This is nice, however I noticed that it is possible to make use of OpenStreetMaps quite easily in python these days using pyrosm or osmnx.
I am following this tutorial https://automating-gis-processes.github.io/2017/lessons/L7/retrieve-osm-data.html and ok, I got plots, but these are static matplotlib ones.
This application really screams as one thing you want to zoom in dynamically as only bokeh does so greatly.
I was wondering if I had missed a similar tutorial for Bokeh or if it can be put aside to the Google Maps tutorial presently in the help guide.
OSM is one of the tile providers: https://docs.bokeh.org/en/latest/docs/reference/tile_providers.html#bokeh-tile-providers
I think it’s not mentioned at https://docs.bokeh.org/en/latest/docs/user_guide/geo.html simply because there many other providers.
Thanks a lot I did overlook the long list of providers and probably my googling failed because OSM is not the same as OpenStreetMap. Anyways, I can plot maps and the zoom function is great.
What I was stressing on the tutorial using OSMnx and pyrosm is the ability to fetch features, such as building, streets as shapes (or water fountains if you wish!). At this stage I see only how to import a map and essentially use it as a background.
If I wanted to get, for instance, the streets of a certain area as “segments” like here
do you think I can do this in bokeh or better stick to this tutorial with matplotlib?
OSM is not the same as OpenStreetMap
How so? Wiki says “OpenStreetMap (OSM)”, Bokeh says the same.
What I was stressing on the tutorial using OSMnx and pyrosm is the ability to fetch features
Please correct me if I’m wrong but I don’t think Bokeh supports map features for any provider. In this case, that’s not a documentation issue but a full-fledged feature request.
Thanks for clarifying that features are not supported, only tiles.
Regarding OSM I meant, that I was searching “OpenStreetMap” in google, and maybe OSM would have yield better results, just a comment on how I was googling.
In any case, as per the doc: " Please tell us your use cases through Discourse or on GitHub so that we can continue to extend these features to meet your needs." so I wanted to report my use case would to get street names and their shape and produce a color coded map to represent some data about each street. This would be plotting in a bokeh the mpl plot here https://pyrosm.readthedocs.io/en/latest/basics.html#Read-street-networks
I see. Could you please create a feature request on GitHub, where it can be properly tracked? Otherwise it’s very likely that this topic will just be forgotten. Thanks!
I think this may not be necessary in the end. This tutorial explains how to get a bokeh plot from the GeoPandas dataframe.
Getting the data is pretty straightforward with BBike generating a PDF file and pyrosm to read it in as GeoPandas