Metadata-Version: 2.1
Name: altair-data-server
Version: 0.2.0
Summary: A background data server for Altair charts.
Home-page: http://github.com/altair-viz/altair_data_server/
Author: Jake VanderPlas
Author-email: jakevdp@google.com
License: BSD 3-clause
Download-URL: http://github.com/altair-viz/altair_data_server/
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/markdown
Requires-Dist: altair
Requires-Dist: portpicker
Requires-Dist: tornado

# Altair data server

[![build status](http://img.shields.io/travis/altair-viz/altair_data_server/master.svg?style=flat)](https://travis-ci.org/altair-viz/altair_data_server)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/altair-viz/altair_data_server/master?urlpath=lab/tree/AltairDataServer.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/altair-viz/altair_data_server/blob/master/AltairDataServer.ipynb)


This is a data transformer plugin for [Altair](http://altair-viz.github.io)
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:

```python
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:

```python
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](https://github.com/jupyterhub/jupyter-server-proxy) is
installed on the jupyter server. In your notebook, use the following
transformer:

```python
alt.data_transformers.enable('data_server_proxied')
```

## Example

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/altair-viz/altair_data_server/blob/master/AltairDataServer.ipynb)

You can see this in action, as well as read some of the motivation for this
plugin, in the example notebook: [AltairDataServer.ipynb](AltairDataServer.ipynb).
Click the "Open in Colab" link above to run a live version of the notebook.

## Known Issues

Because [jupyter-server-proxy](https://github.com/jupyterhub/jupyter-server-proxy)
requires at least Python 3.5, the methods described in
[Remote Systems](#remote-systems) do not work.


