Some Altair Plots for pythonplot.com#16
Closed
salbaroudi wants to merge 3 commits intotdhopper:masterfrom
Closed
Conversation
Contributor
Author
|
Travis CI failed because plotly won't authenticate. I ran the http.server module locally and saw plotly working, so I didn't do this originally. I signed up for some credentials and initialized my plotly .config file. I notice that in your authenticate_plotly.py script first imports plotly and then os, before calling the os.environ dictionary. For me, my credentials don't get written to the os.environ mapping. I can just plug in my credentials directly, but this isn't good practice. |
Closed
Owner
|
Thanks for doing this. I'm trying to fix the build now. |
Owner
|
Plotly had breaking changes. |
Owner
|
Took me a long time to get read to add altair examples. I ended up using the ones proposed by @roycoding, but I added both of you as coauthors to the commits. Thanks for your help. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.