Skip to main content

Altair data server

build status code style black 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.3.0.tar.gz (10.2 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.3.0-py2.py3-none-any.whl (10.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: altair_data_server-0.3.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

File hashes

Hashes for altair_data_server-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a1e98eff5301b8e38faa5cc97e6109a84ec03dee905ce4c2753596598b76ea2e
MD5 fc75ae4eb0862881f6e0c6c76d318faf
BLAKE2b-256 1f977e1d502f52bd46db07063061603a61d415174b46c5bfbfd7d3c77380bcdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: altair_data_server-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.22.0 setuptools/41.0.0 requests-toolbelt/0.8.0 tqdm/4.40.0 CPython/3.6.9

File hashes

Hashes for altair_data_server-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08b8805dde14074c5c215680bac6ee85b41de82a90bfe3b5991c87ec00a05d9e
MD5 a60bb089d0f1d7fad7015ec9f73348fd
BLAKE2b-256 cce148df54653a66afb8ae93a7b69e2542e9efd9b68c6cd20c866544087555d9

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 Pingdom Monitoring Sentry Error logging StatusPage Status page