Hi fellow Bokeh-er,
I’m trying to figure out how to use date/datetime embedded within a GeoJSONDataSource. My desire to use the GeoJSONDataSource is to keep data-binding between map objects and the features.
Toy example:
#load data
geojson = """
{"type": "FeatureCollection",
"features": [
{"id": "1",
"type": "Feature",
"properties":
{
"dates": ["2020-01-22T00:00:00", "2020-01-23T00:00:00"],
"x": [0,1],
"y": [0,1]
},
"geometry": {"type":"Point","coordinates":[0,0]}
},
{"id": "2",
"type": "Feature",
"properties":
{
"dates": ["2020-01-22T00:00:00", "2020-01-23T00:00:00"],
"x": [0,1],
"y": [1,1]
},
"geometry": {"type":"Point","coordinates":[0,0]}
}
]}
"""
geosource = GeoJSONDataSource(geojson=geojson)
# Try without dates works
p1 = figure(plot_width=400, plot_height=400)
p1.multi_line(xs='x',ys='y',source = geosource)
show(p1)
# Trying with dates does not work
p2 = figure(plot_width=400, plot_height=400, x_axis_type="datetime")
p2.multi_line(xs='dates',ys='y',source = geosource)
show(p2)
Thanks for any input