| Hosted by CoCalc | Download
1
import os
2
import dask.dataframe as dd
3
import holoviews as hv
4
from holoviews.operation.datashader import datashade
5
6
hv.extension('bokeh')
7
8
# 1. Load data and Datashade it
9
ddf = dd.read_parquet("blob_data.parq")[['xgal', 'ygal']].persist()
10
points = hv.Points(ddf, kdims=['xgal', 'ygal'])
11
shaded = datashade(points).opts(plot=dict(width=800, height=600))
12
13
# 2. Instead of Jupyter's automatic rich display, render the object as a bokeh document
14
doc = hv.renderer('bokeh').server_doc(shaded)
15
doc.title = 'HoloViews Bokeh App'
16
17
18