Flood Frequency Curve Plotting

After many attempts to integrate Bokeh server into my Django-backed website, and I’ve achieved a level of interactivity in communicating technical information that I’ve been wanting for a long time.

The Flood Measurement Error explorer is an attempt to convey the way plotting measured data in a deterministic ‘visual encoding’ way, especially highly uncertain measured data, is naturally misleading. I’ve written a slightly more detailed post about it here.

By far the most difficult part for me has been integrating Bokeh with Django and running the application behind an SSL proxy. Jonathan Bennet’s example repo was a big help, but the biggest hurdle was biting the bullet and leaving my old host (nearlyfreespeech) for DigitalOcean. The tutorials DO have created for everything server configuration, etc. are incredibly helpful. It came down to more trial and error than I’m happy to admit, but the documentation on reverse proxying and SSL termination has been growing, so thanks to all the contributors for that!


Hey Dan!

This is fantastic, and I so appreciate your sharing the details and story behind it. I’m so glad that you made it through your trial and error, and happy to hear that the docs were helpful!

The screenshot is good, but the link doesn’t seem to be working at the moment; do you expect it to be back up? If so, and if it’s okay with you, I’d like to tweet it out as a great example of Bokeh in the wild. If you’ve got a twitter account, let me know so I can tag you!


Thanks for the kind words Carolyn, and for the heads up about the application being down.

I have intermittently seen websocket errors in my bokeh server log, I think having to do with the websocket connection being called from my domain in different ways, i.e. with and without the leading ‘www’. I’m hoping by adding two separate entries for allow-websocket-origin will be the solution.

i.e. in my app.service file:

ExecStart=/app/path/env/bin/bokeh serve flood_msmt sliders \
          --prefix=/bokeh \
          --use-xheaders \
          --allow-websocket-origin=dkhydrotech.com \
          --allow-websocket-origin=www.dkhydrotech.com \

Previously I thought only one entry would work given I had both aliases named in the nginx configuration, but maybe it speaks more to how little I know about nginx.

Also, I’ve added more detail and interactivity to the UI: