Skip to content

Instantly share code, notes, and snippets.

@yassineAlouini
Created February 5, 2018 16:28
Show Gist options
  • Save yassineAlouini/eaa810a3ffb44bf5e073e3ce04046a3d to your computer and use it in GitHub Desktop.
Save yassineAlouini/eaa810a3ffb44bf5e073e3ce04046a3d to your computer and use it in GitHub Desktop.
Use CartoDB as a tile provider for Bokeh
# Inspired from here: https://bokeh.pydata.org/en/latest/docs/user_guide/geo.html
from bokeh.tile_providers import CARTODBPOSITRON
from bokeh.io import output_file, show
from bokeh.plotting import figure
bound = 20000000 # meters
fig = figure(tools='pan, wheel_zoom', x_range=(-bound, bound), y_range=(-bound, bound))
fig.axis.visible = False
fig.add_tile(CARTODBPOSITRON)
show(fig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment