Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/h2oai/nitro-altair
Altair plugin for H2O Nitro
https://github.com/h2oai/nitro-altair
altair apps charting-library charts data-science data-visualization h2o-nitro plotting plugin python visualization
Last synced: 1 day ago
JSON representation
Altair plugin for H2O Nitro
- Host: GitHub
- URL: https://github.com/h2oai/nitro-altair
- Owner: h2oai
- License: apache-2.0
- Created: 2022-05-30T20:32:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T15:55:32.000Z (over 1 year ago)
- Last Synced: 2024-09-03T11:37:41.210Z (2 months ago)
- Topics: altair, apps, charting-library, charts, data-science, data-visualization, h2o-nitro, plotting, plugin, python, visualization
- Language: Python
- Homepage: https://nitro.h2o.ai/plugins/
- Size: 250 KB
- Stars: 1
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Altair plugin for H2O Nitro
This plugin lets you use [Altair](https://altair-viz.github.io/index.html) visualizations in
[Nitro](https://github.com/h2oai/nitro) apps.## Demo
![Demo](demo.gif)
[View source](examples/altair_basic.py).
## Install
```
pip install h2o-nitro-altair
```## Usage
1. Import the plugin:
```py
from h2o_nitro_altair import altair_plugin, altair_box
```2. Register the plugin:
```py
nitro = View(main, title='My App', caption='v1.0', plugins=[altair_plugin()])
```3. Use the plugin:
```py
# Make a chart:
chart = alt.Chart(data.cars()).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color='Origin',
).interactive()# Display the chart:
view(altair_box(chart))
```## Advanced Usage
You can pass [Vega Embed Options](https://github.com/vega/vega-embed#options) to `altair_box()` for
more control:```py
altair_box(chart, options=dict(renderer='svg', scaleFactor=2))
```## Change Log
- v0.1.1 - Jun 09, 2022
- Fixed
- Don't return value from plots.
- v0.1.0 - May 25, 2022
- Initial Version