Bokeh is a Python interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords high-performance interactivity over large or streaming datasets. Bokeh can produce not just standalone HTML documents and server-hosted content.
In this article, we will delve into various methods of crafting a straightforward map using Bokeh.
Using the Esri World Imagery
One solution is to use the Esri World Imagery which is a basemap that offers the most recent satellite imagery for any place in the world. This allows you to access satellite imagery with high resolution and accurate geospatial information without having to purchase or manage large datasets:
from bokeh.plotting import figure, show
p = figure(x_range=(-2000000, 6000000),
p.add_tile("Esri World Imagery")
The code above imports the necessary components from Bokeh, sets the output file to be generated, and creates a figure with specified range bounds. The
add_tile() function overlays a satellite image on top of the figure, and
show() renders the map in an HTML document.
We can then zoom out gradually:
|Mapping Geo Data
|Creating an interactive map in Python using Bokeh and pandas
|Mapping geo data