A background data server for Altair charts.
Altair data server
This is a data transformer plugin for Altair that transparently serves data for Altair charts via a background WSGI server.
Note that charts will only render as long as your Python session is active.
The data server is a good option when you'll be generating multiple charts as part of an exploration of data.
First install the package and its dependencies:
$ pip install altair_data_server
Next import altair and enable the data server:
import altair as alt alt.data_transformers.enable('data_server')
Now when you create an Altair chart, the data will be served in the background rather than embedded in the chart specification.
Once you are finished with exploration and want to generate charts that will have their data fully embedded in the notebook, you can restore the default data transformer:
and carry on from there.
Remotely-hosted notebooks (like JupyterHub or Binder) usually do not allow the end user to access arbitrary ports. To enable users to work on that setup, make sure jupyter-server-proxy is installed on the jupyter server, and use the proxied data server transformer:
You can see this in action, as well as read some of the motivation for this plugin, in the example notebook: AltairDataServer.ipynb. Click the Binder or Colab links above to try it out in your browser.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size altair_data_server-0.4.1-py3-none-any.whl (12.6 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size altair_data_server-0.4.1.tar.gz (12.7 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for altair_data_server-0.4.1-py3-none-any.whl