Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

altair-data-server

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

altair-data-server

A background data server for Altair charts.

  • 0.4.1
  • PyPI
  • Socket score

Maintainers
1

Altair data server

build status github actions github actions 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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc