Skip to main content

Altair data server

build status Binder Open In Colab

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.

Usage

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:

alt.data_transformers.enable('default')

and carry on from there.

Remote Systems

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:

alt.data_transformers.enable('data_server_proxied')

Example

Binder Open In Colab

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.

Known Issues

Because jupyter-server-proxy requires at least Python 3.5, the methods described in Remote Systems do not work do not work for older versions of Python.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

altair_data_server-0.2.1.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

altair_data_server-0.2.1-py2.py3-none-any.whl (10.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file altair_data_server-0.2.1.tar.gz.

File metadata

  • Download URL: altair_data_server-0.2.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for altair_data_server-0.2.1.tar.gz
Algorithm Hash digest
SHA256 26e3506bd74ad12e756307119b99abcc877be9f793e9cabacbccd8264f9dd29a
MD5 f7ad7bea7594c76f9a6df4cf73f25d98
BLAKE2b-256 ad60535b9cd88b43c00529be6e3632a5f1211c02b37d40b0cfdfc72fbcfd88da

See more details on using hashes here.

File details

Details for the file altair_data_server-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: altair_data_server-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for altair_data_server-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2a34517cae60dd689fb8046da1ad0008dec2eaf55eacc3226a19eb74347fb086
MD5 31c6a7903e3eaa5f9cec6eba950ba743
BLAKE2b-256 00c2caf8078f8baa3b3a107bac5669ee114598f880fda181e10c8a3b058dd302

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page