# pyvisacharts
This package wraps [@visa/charts](https://github.com/visa/visa-chart-components/tree/main/packagescharts) web components for use in [Python](https://www.python.org/) and [jupyter notebooks](https://jupyter.org/), leveraging the [widget-cookiecutter](https://github.com/jupyter-widgets/widget-cookiecutter) Python package. You can find pyvisacharts on [pypi](https://pypi.org/project/pyvisacharts/), 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
- [@visa/bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesbar-chart)
- [@visa/clustered-bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesclustered-bar-chart)
- [@visa/stacked-bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesstacked-bar-chart)
- [@visa/line-chart](https://github.com/visa/visa-chart-components/tree/main/packagesline-chart)
- [@visa/pie-chart](https://github.com/visa/visa-chart-components/tree/main/packagespie-chart)
- [@visa/scatter-plot](https://github.com/visa/visa-chart-components/tree/main/packagesscatter-plot)
- [@visa/heat-map](https://github.com/visa/visa-chart-components/tree/main/packagesheat-map)
- [@visa/circle-packing](https://github.com/visa/visa-chart-components/tree/main/packagescircle-packing)
- [@visa/parallel-plot](https://github.com/visa/visa-chart-components/tree/main/packagesparallel-plot)
- [@visa/dumbbell-plot](https://github.com/visa/visa-chart-components/tree/main/packagesdumbbell-plot)
- [@visa/world-map](https://github.com/visa/visa-chart-components/tree/main/packagesworld-map)
- [@visa/alluvial-diagram](https://github.com/visa/visa-chart-components/tree/main/packagesalluvial-diagram)
## <!-- #### Components with `Development` status -->
#### <a name="Python_components" href="#Python_components">#</a> Use VCC as Python functions
<br>
Step 1: Install:
```
$ pip install pyvisacharts
```
Step 2: Use component as any other Python function
```python
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](https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/VCC%20Demo%20Notebook.ipynb) for more examples.
<hr>
### 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](https://github.com/luis-chaves-visa)) for his assistance in development of `pyvisacharts`.
Raw data
{
"_id": null,
"home_page": "https://github.com/visa/visa-chart-components/tree/main/packages/charts-python",
"name": "pyvisacharts",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "ipython, jupyter, widgets, visa, charts, visualization, viz, accessibility, a11y, d3",
"author": "Visa Data Experience Team",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/9e/9f/e77a7b059dafac8d952546383d6a82a1285f37949dd198329d65cd3a56a1/pyvisacharts-3.0.1.tar.gz",
"platform": null,
"description": "# pyvisacharts\n\nThis package wraps [@visa/charts](https://github.com/visa/visa-chart-components/tree/main/packagescharts) web components for use in [Python](https://www.python.org/) and [jupyter notebooks](https://jupyter.org/), leveraging the [widget-cookiecutter](https://github.com/jupyter-widgets/widget-cookiecutter) Python package. You can find pyvisacharts on [pypi](https://pypi.org/project/pyvisacharts/), installation steps provided below.\n\n---\n\n### Installation Steps\n\n- Using `pip`:\n ```\n $ pip install pyvisacharts\n ```\n- or `conda`:\n ```\n $ conda install -c conda-forge pyvisacharts\n ```\n\n---\n\n#### Components with `Ready` status in this bundle\n\n- [@visa/bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesbar-chart)\n- [@visa/clustered-bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesclustered-bar-chart)\n- [@visa/stacked-bar-chart](https://github.com/visa/visa-chart-components/tree/main/packagesstacked-bar-chart)\n- [@visa/line-chart](https://github.com/visa/visa-chart-components/tree/main/packagesline-chart)\n- [@visa/pie-chart](https://github.com/visa/visa-chart-components/tree/main/packagespie-chart)\n- [@visa/scatter-plot](https://github.com/visa/visa-chart-components/tree/main/packagesscatter-plot)\n- [@visa/heat-map](https://github.com/visa/visa-chart-components/tree/main/packagesheat-map)\n- [@visa/circle-packing](https://github.com/visa/visa-chart-components/tree/main/packagescircle-packing)\n- [@visa/parallel-plot](https://github.com/visa/visa-chart-components/tree/main/packagesparallel-plot)\n- [@visa/dumbbell-plot](https://github.com/visa/visa-chart-components/tree/main/packagesdumbbell-plot)\n- [@visa/world-map](https://github.com/visa/visa-chart-components/tree/main/packagesworld-map)\n- [@visa/alluvial-diagram](https://github.com/visa/visa-chart-components/tree/main/packagesalluvial-diagram)\n\n## <!-- #### Components with `Development` status -->\n\n#### <a name=\"Python_components\" href=\"#Python_components\">#</a> Use VCC as Python functions\n\n<br>\n\nStep 1: Install:\n\n```\n$ pip install pyvisacharts\n```\n\nStep 2: Use component as any other Python function\n\n```python\nimport pyvisacharts as vcc\nimport pandas as pd\n\nbar_chart_data = pd.read_json(\"https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/demo_data/bar_chart_data.json\")\nline_chart_data = pd.read_json(\"https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/demo_data/line_chart_data.json\")\n\nvcc.BarChart(\n accessibility={\n \"purpose\": \"Demonstration of a bar chart built with VCC and minimal properties provided.\",\n \"statisticalNotes\": \"This chart is using dummy data.\"\n },\n data=bar_chart_data,\n ordinalAccessor=\"item\",\n valueAccessor=\"value\"\n)\n\nvcc.LineChart(\n accessibility={\n \"purpose\": \"Demonstration of a line chart built with VCC and minimal properties provided.\",\n \"statisticalNotes\": \"This chart is using dummy data.\"\n },\n data=line_chart_data, # a pandas data frame\n ordinalAccessor=\"date\",\n valueAccessor=\"value\",\n seriesAccessor=\"category\",\n config={\n \"hoverOpacity\": 0.25\n }\n)\n```\n\nSee our [VCC Demo Notebook](https://github.com/visa/visa-chart-components/tree/main/packages/charts-pythondocs/VCC%20Demo%20Notebook.ipynb) for more examples.\n\n<hr>\n\n### Development Steps\n\nTo the python widget locally, you will need to follow the below installation and build steps to symlink the necessary packages across the monorepo.\n\n```\n $ yarn\n $ yarn dev --i\n $ yarn dev --b\n $ yarn dev --ipy\n $ yarn dev --spy (spins up a local jupyter notebook)\n or\n $ yarn dev --lpy (spins up a local jupyter lab)\n```\n\nAfter 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.\n\nIn addition to the core project team, special thanks to Luis Chaves Rodriguez ([@visa](https://github.com/luis-chaves-visa)) for his assistance in development of `pyvisacharts`.\n",
"bugtrack_url": null,
"license": "SEE LICENSE IN LICENSE",
"summary": "A Jupyter Widget for Visa Chart Components",
"version": "3.0.1",
"project_urls": {
"Bug Reports": "https://github.com/visa/visa-chart-components/issues",
"Homepage": "https://github.com/visa/visa-chart-components/tree/main/packages/charts-python",
"Source": "https://github.com/visa/visa-chart-components/tree/main/packages/charts-python",
"Storybook Demo": "https://visa.github.io/visa-chart-components/",
"Visa Chart Components": "https://github.com/visa/visa-chart-components"
},
"split_keywords": [
"ipython",
" jupyter",
" widgets",
" visa",
" charts",
" visualization",
" viz",
" accessibility",
" a11y",
" d3"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e4562bf66d0c42cae392dd1425283ba56ea0c7cb998fa081a05e0dc4258ada46",
"md5": "e9d1c8e3245400f720761abe7f133843",
"sha256": "1a3ea25ff5c162e5408020206923a64f7d0713db507705c22a807ab7343bcb39"
},
"downloads": -1,
"filename": "pyvisacharts-3.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9d1c8e3245400f720761abe7f133843",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 2809578,
"upload_time": "2024-11-15T05:49:49",
"upload_time_iso_8601": "2024-11-15T05:49:49.857165Z",
"url": "https://files.pythonhosted.org/packages/e4/56/2bf66d0c42cae392dd1425283ba56ea0c7cb998fa081a05e0dc4258ada46/pyvisacharts-3.0.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9e9fe77a7b059dafac8d952546383d6a82a1285f37949dd198329d65cd3a56a1",
"md5": "3d9c0e783852cb7d3d228fce1071973c",
"sha256": "647ea0cd3607d124a5d4673018a7bf1a6ec4a290564fd870c916e5971794bdaf"
},
"downloads": -1,
"filename": "pyvisacharts-3.0.1.tar.gz",
"has_sig": false,
"md5_digest": "3d9c0e783852cb7d3d228fce1071973c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2171322,
"upload_time": "2024-11-15T05:49:53",
"upload_time_iso_8601": "2024-11-15T05:49:53.115761Z",
"url": "https://files.pythonhosted.org/packages/9e/9f/e77a7b059dafac8d952546383d6a82a1285f37949dd198329d65cd3a56a1/pyvisacharts-3.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-15 05:49:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "visa",
"github_project": "visa-chart-components",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyvisacharts"
}