Example Visualizations
See original GitHub issueIn preparation for the Altair 2.0 release, we need some good example visualizations for the documentation! These could be everything from simple one-panel scatter and line plots, to more complicated layered or stacked plots, to more advanced interactive features.
Note that the v2 API is not finalized yet, and so another purpose of creating these is to find bugs in the current package as we prepare for release. If you find anything, please report it on the issues tracker!
I’ve started a folder for these examples in altair/vegalite/v2/examples/. You can treat simple_scatter.py as a template.
Every example should:
- have a descriptive docstring, which will eventually be extracted for the documentation website.
- define a
chart
variable with the main chart object (This will be used both in the unit tests to confirm that the example executes properly, and also eventually used to display the visualization on the documentation website). - not make any external calls to download data within the script (i.e. don’t use
urllib
). You can define your data directly within the example file, generate your data usingpandas
andnumpy.random
, or you can use data available in the vega_datasets package.
The easiest way to get started would be to adapt examples from the Vega-Lite example gallery. Or you can feel free to be creative and build your own visualizations.
Note that the new display architecture is still being built; for display troubleshooting please see the wiki page: https://github.com/altair-viz/altair/wiki/Display-Troubleshooting
We’ll look forward to your pull requests!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:36 (26 by maintainers)
Top GitHub Comments
Wow… a week later we have almost 60 new examples! Thanks for the help everyone!
New examples are still welcome, but I’m going to close this issue because we’re in pretty good shape at this point.
If anyone wants to create new “creative” examples that are not on the Vega-Lite gallery, please feel free to submit them to Vega-Lite repo too 😃