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

ibis-vega-transform

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibis-vega-transform

A JupyterLab extension for performing Vega transforms lazily using Ibis.

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
1
Weekly downloads
 
Created
Source

ibis-vega-transform
binder logo

Python evaluation of Vega transforms using Ibis expressions.

For inspiration, see https://github.com/jakevdp/altair-transform

Getting started

pip install ibis-vega-transform
jupyter labextension install ibis-vega-transform

Then in a notebook, import the Python package and pass in an ibis expression to a Altair chart:

import altair as alt
import ibis_vega_transform
import ibis
import pandas as pd


source = pd.DataFrame({
    'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
    'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]
})

connection = ibis.pandas.connect({'source': source })
table = connection.table('source')

alt.Chart(table).mark_bar().encode(
    x='a',
    y='b'
)

Check out the notebooks in the ./examples/ directory to see some options using interactive charts and the OmniSci backend.

Dashboards

You can also create dashboards with this with Phoila.

pip install git+https://github.com/Quansight/phoila.git@comm_open "notebook<6.0"
phoila install ibis-vega-transform
phoila "examples/Charting Example.ipynb"

Tracing

If you want to see traces of the interactiosn for debugging and performance analysis, install the jaeger-all-in-one binary and the jupyterlab-server-proxy-saulshanabrook lab extension to see the Jaeger icon in the launcher.

conda install jaeger -c conda-forge
jupyter labextension install jupyterlab-server-proxy-saulshanabrook

The Jaeger server won't actually be started until a HTTP request is sent to it, so before you run your visualization, click the "Jaeger" icon in the JupyterLab launcher or go to /jaeger to open the UI. Then run your visualization and you should see the traces appear in Jaeger.

You also will likely have to increase the max UDP packet size on your OS to accomdate for the large logs:

Mac

# Edit now
sudo sysctl net.inet.udp.maxdgram=200000
# Edit on restart
echo net.inet.udp.maxdgram=200000 | sudo tee -a /etc/sysctl.conf

Development

To install from source, run the following in a terminal:

git clone git@github.com:Quansight/ibis-vega-transform.git

cd ibis-vega-transform
conda env create -f binder/environment.yml
conda activate ibis-vega-transform

pip install -e .[dev]
jlpm
jupyter labextension install . --no-build


jupyter lab --watch
jlpm run watch

A pre-commit hook is installed usig Husky (Git > 2.13 is required!) to format files.

Run the formatting tools at any time using:

black ibis_vega_transform
jlpm run prettier

Dashboards

You can create dashboards from notebooks by using Phoila:

# Need his PR https://github.com/vidartf/phoila/pull/11
pip install git+https://github.com/Quansight/phoila.git@comm_open "notebook<6.0"
phoila install .
phoila "examples/Charting Example.ipynb"

Tracing

We are using jupyter-jaeger to trace each interaction for benchmarking.

Releasing

First create a test environment:

conda env remove -n tmp --yes
conda env create -f binder/environment.yml --name tmp
conda activate tmp
conda install -c conda-forge wheel twine black

Then bump the Python version in setup.py and upload a test version:

rm -rf dist/
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Install the test version in your new environment:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple ibis-vega-transform

Now bump the version for the Javascript package in package.json. The run a build, create a tarball, and install it as a JupyterLab extension:

yarn run build
yarn pack --filename out.tgz
jupyter labextension install out.tgz

Now open JupyterLab and run through all the notebooks in examples to make sure they still render correctly.

Now you can publish the Python package:

twine upload dist/*

And publish the node package:

npm publish out.tgz

And add a git tag for the release and push:

rm out.tgz
git add package.json setup.py
git commit -m 'Version <new version>'
git tag <new version>
git push
git push --tags

Keywords

FAQs

Package last updated on 22 Feb 2020

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