Enabling Jupyter notebook dashboards python programming
If you perform EDA using jupyter notebooks, it’s really easy to share those results with some moderate interaction via a jupyter dashboard. Here are the basic steps:
- Build the analysis, etc. Assuming this is done locally. Install the dashboard layout extension and lay out some sweet graphs. Optional: decorate some graph function with `@interact`.
- Commit to github/bitbucket. An example: git commit -am "so much wow"; git push github exploratory.
- Ssh to server. Pull commit down on the server.
- Back to local. Scp the data files up to the server, in the same place they were locally. It comes in handy to have put them in a folder called `data`. This looks like `scp -r data myserver:project-dir/`.
- Ssh back to server. Install virtualenv, all necessary libs (numpy, pandas, etc).
- Install the dashboard layout (you definitely need it now, if you didn’t do the layout in step 1): https://github.com/jupyter/dashboards.
- Enable widgets `jupyter nbextension enable –py –sys-prefix widgetsnbextension`.
- Launch server, point browser, choose dashboard view, run notebook!
I’ve done this all in a screen environment to leave it running. Overhead should be minimal on the server. Before launching the notebook server, I put my necessary credentials into environment variables as well.
Another potentially important step is to password protect the server. This can be done by calling `jupyter notebook password`.
This way, you don’t need the other two dashboard pieces (the bundler or standalone server). Although if someone were to set those up, it could make this process even easier!