Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Some Altair Plots for pythonplot.com #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

salbaroudi
Copy link
Contributor

@salbaroudi salbaroudi commented Apr 10, 2019

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:

  1. 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).

  2. 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.

  3. 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.

  4. 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.

  • Sean

@salbaroudi
Copy link
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.

@roycoding roycoding mentioned this pull request Dec 22, 2019
@tdhopper
Copy link
Owner

Thanks for doing this. I'm trying to fix the build now.

@tdhopper
Copy link
Owner

Plotly had breaking changes.

@tdhopper
Copy link
Owner

tdhopper commented Jan 2, 2020

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.

@tdhopper tdhopper closed this Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants