Hello folks,
I am trying to plot a list of locations(venues) on a map using Bokeh. I followed instruction provided here.
**Input data file(****mstr_venue.xlsx)**is as given below:
VENUE_NAME
UTM_ZONE
UTM_EASTING
UTM_NORTHING
YOKOSUKA
54S
378799.0717
3905309.408
YESOU
52S
362069.0896
3868327.02
PENGERANG
48N
401730.9231
151075.9234
SINGAPORE
48N
334963.429
140052.0691
LUANDA
33L
305811.3973
9022728.704
PORT GENTIL
32M
475891.8916
9920786.506
CAPE LOPEZ
32M
466619.3812
9930033.487
LAS PALMAS
28R
459085.6772
3113889.013
SARROCH
32S
500810.613
4324075.234
ALGECIRAS
30S
280896.4098
4001779.527
The code that I wrote is as follows:
from bokeh.plotting import figure, show, output_file, ColumnDataSource
from bokeh.tile_providers import CARTODBPOSITRON_RETINA
from bokeh.models.sources import ColumnarDataSource
from bokeh.layouts import layout, widgetbox, column, row
from bokeh.models import Range1d, PanTool, ResetTool, HoverTool
import pandas as pd
import numpy as np
df = pd.read_excel(‘mstr_venue.xlsx’)
output_file(“venue.html”)
source = ColumnDataSource(data=dict(longitude=df[‘UTM_EASTING’], latitude=df[‘UTM_NORTHING’], venue_name=df[‘VENUE_NAME’]))
p = figure(plot_width=400, plot_height=400, x_range=(-2000000, 6000000), y_range=(-1000000, 7000000), x_axis_type=“mercator”, y_axis_type=“mercator”)
p.add_tile(CARTODBPOSITRON_RETINA)
p.circle(x=‘longitude’, y=‘latitude’, source=source)
hover = HoverTool(tooltips=[(“Venue: “,”@venue_name”)])
p.add_tools(hover)
show(p)
The output is as shown below:
Observation:
The circle glyph are not plotted in the correct geographic location. I am not sure what I am missing. Looking for some references.
Thanking you in advance,
clemy