Skip to content
Branch: master
Find file History
captainsafia Publish
 - @nteract/nbextension@1.1.1
 - nteract-on-jupyter@2.1.1
 - @nteract/actions@2.6.0
 - @nteract/commutable@7.1.2
 - @nteract/connected-components@6.2.1
 - @nteract/core@10.5.0
 - @nteract/data-explorer@7.0.1
 - @nteract/editor@9.1.1
 - enchannel-zmq-backend@9.0.6
 - @nteract/epics@2.4.0
 - @nteract/fixtures@2.0.10
 - @nteract/fs-kernels@2.0.8
 - @mybinder/host-cache@2.0.7
 - @nteract/messaging@6.0.6
 - @nteract/notebook-app-component@5.1.1
 - @nteract/outputs@2.1.4
 - @nteract/reducers@2.5.0
 - rx-jupyter@5.2.1
 - @nteract/selectors@2.2.1
 - @nteract/types@4.2.1
Latest commit d79aa32 May 21, 2019

README.md

Binder

nteract Data Explorer

Data Explorer Examples

Read @emeek's post on designing the data explorer.

Using the Data Explorer

yarn add @nteract/data-explorer

Install react and styled-components if you are not already using them.

yarn add react styled-components

The data prop must be a tabular data resource application/vnd.dataresource+json

// Default import complete with right side toolbar
import DataExplorer from "@nteract/data-explorer";

<DataExplorer data={data} />;

Or, with custom Toolbar position:

// Individual components as named imports
import { DataExplorer, Toolbar, Viz } from "@nteract/data-explorer";

<DataExplorer data={data}>
  <Toolbar />
  <Viz />
</DataExplorer>;

// Toolbar is optional
<DataExplorer data={data}>
  <Viz />
</DataExplorer>;

Hacking on the nteract Data Explorer

For expedited development, we recommend using the Jupyter Extension to contribute.

Note: the desktop app can be used instead, but you'll have to manually reload to see changes

Installation

1. Setup the monorepo

Navigate to the base directory of the repo and install all dependencies

yarn

2. Setup Jupyter Extension

Note: this requires Python >= 3.6

Now, install the Python package

cd applications/jupyter-extension
pip install -e .
jupyter serverextension enable nteract_on_jupyter

3. Build JS assests and run a Jupyter server with hot reloading

First we need to run the webpack server to live reload javascript and html assets. Anywhere in the nteract repository, run

npx lerna run hot --scope nteract-on-jupyter --stream

In another terminal, go to the directory that you want to run notebooks from and run

jupyter nteract --NteractConfig.asset_url="http://localhost:8080/"

The --NteractConfig.asset_url flag tells the Jupyter server where the webpack server will be serving the assets.

Once the assets have been built, you won't need to refresh the page, but you may need to manually refresh the page if it loads before the assets are built.

4. Initialize data explorer in the notebook

In the notebook launched from step 3, run the following code in a cell before anything else ⬇️

import pandas as pd
pd.options.display.html.table_schema = True
pd.options.display.max_rows = None

Now you are ready to contribute πŸŽ‰

You can’t perform that action at this time.