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

Remote systems (JupyterHub instances like 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. In your notebook, use the following transformer:

alt.data_transformers.enable('data_server_proxied')

Example

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 "Open in Colab" link above to run a live version of the notebook.

Known Issues

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

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.0.tar.gz (9.6 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.0-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.0.tar.gz.

File metadata

  • Download URL: altair_data_server-0.2.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for altair_data_server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eaa25bf76ac80f67420b92b10919d142615b7812a7feea0e010d436185d358fb
MD5 e7a0bc94e69df9ed54a0256230352f93
BLAKE2b-256 f50ed2af9934bbcef6321d8e9570e3fd7776458f0c89ee724c710d98140db2c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: altair_data_server-0.2.0-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.18.4 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for altair_data_server-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bff61d25bcfb20a142b02a7d8e523d28e9a47a698a4269fd7d9f59d35c5116ed
MD5 570174a91ff04b0b76362f1fa9f5eb45
BLAKE2b-256 52e24fe126dbc775dbb8f15ff628a1290b6b188387219fe4edacf67ab32e68f7

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