holoviz-topics / examples

Visualization-focused examples of using HoloViz for specific topics
https://examples.holoviz.org
Creative Commons Attribution 4.0 International
82 stars 24 forks source link

Update census example to use datashader 0.14.5a1 #271

Open ianthomas23 opened 1 year ago

ianthomas23 commented 1 year ago

Work in progress to update the census example environment to use the latest datashader, bokeh, panel, etc. Initially using datashader dev release 0.14.5a from pyviz/label/dev channel, and other packages from conda-forge rather than defaults until everything required is on defaults, which is well underway. The other change is to use pyarrow rather than fastparquet.

It results in the following packages used:

Package Before this PR With this PR
bokeh 2.4.3 3.1.1
dask 2022.11.1 2023.5.0
datashader 0.14.4 0.14.5a1
holoviews 1.16.0 1.16.0
pandas 1.5.3 2.0.1
panel 0.14.4 1.0.3
pyarrow N/A 12.0

It still includes the workaround for https://github.com/holoviz/datashader/issues/1202.

Tested locally on osx-arm64, historically one of the most problematic. It gives a bunch of datashader warnings, all of which are fixed and will be in the imminent 0.15.0 release. The output renders correctly for me except one plot is missing with a tornado error reported at the command-line, and the interactive plots at the end work correctly.

Given these results, I conclude that there is nothing fundamentally wrong with datashader to prevent going ahead with the 0.15.0 release. Once that is done here is a possible plan:

  1. Update environment to use datashader 0.15.0 to confirm that warnings have gone.
  2. Ensure all holoviz packages are available on defaults.
  3. Update environment to use defaults rather than conda-forge and pyviz/label/dev.
  4. Investigate and/or deal with the tornado error if it still occurs.
  5. Deal with https://github.com/holoviz/datashader/issues/1202.
jbednar commented 1 year ago

Sounds very promising. The tornado errors that I've encountered recently have appeared to be due to zero-length messages implying that Datashader output wasn't available when expected, generally with the symptom that the interactive plots fail to update on zoom or pan. If what you see is similar, that's definitely something to address before merge, as the interactive updates are critical for this application, and definitely test the interactive capabilities when debugging.