875a745067a18343a7997dc737e7bbb3ccebb782,examples/glyphs/maps_cities.py,,,#,20

Before Change


from bokeh.resources import INLINE
from bokeh.sampledata.us_cities import data

x_range = Range1d()
y_range = Range1d()

map_options = GMapOptions(lat=35, lng=-100, zoom=4)

plot = GMapPlot(
    x_range=x_range, y_range=y_range,
    map_options=map_options,
    title = "US Cities",
    webgl=True,
)
plot.map_options.map_type="hybrid"

source = ColumnDataSource(data=data)

circle = Circle(x="lon", y="lat", size=10, line_color=None, fill_color="cyan", fill_alpha=0.1)
plot.add_glyph(source, circle)

pan = PanTool()
wheel_zoom = WheelZoomTool()
box_select = BoxSelectTool()

plot.add_tools(pan, wheel_zoom, box_select)

xaxis = LinearAxis(axis_label="lon", major_tick_in=0, formatter=NumeralTickFormatter(format="0.000"))
plot.add_layout(xaxis, "below")

yaxis = LinearAxis(axis_label="lat", major_tick_in=0, formatter=PrintfTickFormatter(format="%.3f"))
plot.add_layout(yaxis, "left")

overlay = BoxSelectionOverlay(tool=box_select)
plot.add_layout(overlay)

doc = Document()
doc.add(plot)


if __name__ == "__main__":
    filename = "maps_cities.html"

After Change


from bokeh.resources import INLINE
from bokeh.sampledata.world_cities import data

x_range = Range1d(-160, 160)
y_range = Range1d(-80, 80)

map_options = GMapOptions(lat=15, lng=0, zoom=2)

plot = GMapPlot(
    x_range=x_range,
    y_range=y_range,
    plot_width=1000,
    plot_height=500,
    map_options=map_options,
    title="Cities of the world with a population over 5,000 people.",
    webgl=True,
)

circle = Circle(x="lng", y="lat", size=5, line_color=None, fill_color="firebrick", fill_alpha=0.2)
plot.add_glyph(ColumnDataSource(data), circle)
plot.add_tools(PanTool(), WheelZoomTool())

if __name__ == "__main__":
    filename = "maps_cities.html"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 30

Instances


Project Name: bokeh/bokeh
Commit Name: 875a745067a18343a7997dc737e7bbb3ccebb782
Time: 2015-09-17
Author: sarah@bonvaya.com
File Name: examples/glyphs/maps_cities.py
Class Name:
Method Name:


Project Name: bokeh/bokeh
Commit Name: 06f5825d84b58a9207f4f50a88b0022741138d6f
Time: 2015-09-15
Author: sarah@bonvaya.com
File Name: examples/glyphs/maps_cities.py
Class Name:
Method Name:


Project Name: bokeh/bokeh
Commit Name: 713719ed877ef6bd8ab20ceb11ee67f241aedbfd
Time: 2015-09-17
Author: sarah@bonvaya.com
File Name: examples/glyphs/maps_cities.py
Class Name:
Method Name: