Skip to main content

pyvisacharts

This package wraps @visa/charts web components for use in Python and jupyter notebooks, leveraging the widget-cookiecutter Python package. You can find pyvisacharts on pypi, installation steps provided below.


Installation Steps

  • Using pip:
    $ pip install pyvisacharts
    
  • or conda:
    $ conda install -c conda-forge pyvisacharts
    

Components with Ready status in this bundle

# Use VCC as Python functions


Step 1: Install:

$ pip install pyvisacharts

Step 2: Use component as any other Python function

import pyvisacharts as vcc
import pandas as pd

bar_chart_data = pd.read_json("https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/demo_data/bar_chart_data.json")
line_chart_data = pd.read_json("https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/demo_data/line_chart_data.json")

vcc.BarChart(
    accessibility={
        "purpose": "Demonstration of a bar chart built with VCC and minimal properties provided.",
        "statisticalNotes": "This chart is using dummy data."
    },
    data=bar_chart_data,
    ordinalAccessor="item",
    valueAccessor="value"
)

vcc.LineChart(
    accessibility={
        "purpose": "Demonstration of a line chart built with VCC and minimal properties provided.",
        "statisticalNotes": "This chart is using dummy data."
    },
    data=line_chart_data, # a pandas data frame
    ordinalAccessor="date",
    valueAccessor="value",
    seriesAccessor="category",
    config={
        "hoverOpacity": 0.25
    }
)

See our VCC Demo Notebook for more examples.


Development Steps

To the python widget locally, you will need to follow the below installation and build steps to symlink the necessary packages across the monorepo.

    $ yarn
    $ yarn dev --i
    $ yarn dev --b
    $ yarn dev --ipy
    $ yarn dev --spy (spins up a local jupyter notebook)
    or
    $ yarn dev --lpy (spins up a local jupyter lab)

After running these commands, the js lib @visa/charts will by symlink'd and a jupyter notebook will be spun up locally for development and testing work. If you update the js build and/or python code you will likely need to restart/refresh the juptyer notebook to see development changes reflected.

In addition to the core project team, special thanks to Luis Chaves Rodriguez (@visa) for his assistance in development of pyvisacharts.

Metadata

Release files for pyvisacharts 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvisacharts 3.0.1
File Size Uploaded
pyvisacharts-3.0.1.tar.gz 2.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyvisacharts 3.0.1
File Interpreter ABI Platform
pyvisacharts-3.0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 5.0 MB

Release files / pyvisacharts-3.0.1.tar.gz

Download URL pyvisacharts-3.0.1.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
647ea0cd3607d124a5d4673018a7bf1a6ec4a290564fd870c916e5971794bdaf
BLAKE2b-256 checksum
How to use checksums
9e9fe77a7b059dafac8d952546383d6a82a1285f37949dd198329d65cd3a56a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

Release files / pyvisacharts-3.0.1-py2.py3-none-any.whl

Download URL pyvisacharts-3.0.1-py2.py3-none-any.whl
Size 2.8 MB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1a3ea25ff5c162e5408020206923a64f7d0713db507705c22a807ab7343bcb39
BLAKE2b-256 checksum
How to use checksums
e4562bf66d0c42cae392dd1425283ba56ea0c7cb998fa081a05e0dc4258ada46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.0

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

2.2.0

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page