Some Altair Plots for pythonplot.com #16
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Tim,
While researching the Altair library, I came across your plot comparison website. On it, you mention that you wanted additional examples (including Altair). Since I needed to learn Altair anyways, I figured I would contribute some plots (hence - this pull request was born).
A few notes:
I got everything working correctly. However, I did not use a Conda environment as stated in your ReadMe.md. I instead used venv + python3.7.2. All the scripts, notebooks and web server seemed to work just fine (on my end).
Getting Altair to work with Jupyter Notebook is a bit troublesome. I had to downgrade the vega package. It seems that the latest vega package (which contains both vega 3 and vega3-lite), is made to work with altair3 (not yet released). Downgrading to vega==1.3.0 solved the issue. See: NoSuchEntryPoint: No 'notebook' entry point found in group 'altair.vegalite.v2.renderer' vega/altair#1114 for details.
In the plots, I tried to balance simplicity with features. For the earlier plots (bar-chart, simple-histogram), I use terse code. For more sophisticated ones, I add more calls to show off Altair's features.
There were a few plots that I could not easily generate: the regression and line fitting plots, and the KDE plot. Much like your regression plots (with plotly?), Altair does not do this out of the box easily. I didn't have the time to work them out.