Skip to content

Add Richard Muir's plotly examples #7

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

Merged
merged 6 commits into from
Jul 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis/authenticate_plotly.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import plotly
import os
plotly.tools.set_credentials_file(username=os.environ.get('PLOTLY_USER'), api_key=os.environ.get('PLOTLY_API_KEY'))
946 changes: 802 additions & 144 deletions Examples.ipynb

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ clean:
rm -f *.pyc
rm -f .Rhistory

travis: test render
travis: plotly_auth test render

plotly_auth:
python ./.travis/authenticate_plotly.py

test:
python -m pytest tests/
Expand All @@ -34,4 +37,4 @@ dev_environment:
cloudfront_invalidate:
python .travis/invalidate_cloudfront.py

.PHONY: all qrender render s3_upload run_nb travis clean cloudfront_invalidate test dev_environment
.PHONY: all qrender render s3_upload run_nb travis clean cloudfront_invalidate test dev_environment plotly_auth
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dependencies:
- python>=3.6
- pip
- r-essentials
- r:rpy2
- rpy2
1 change: 1 addition & 0 deletions render.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"plotnine": "plotnine",
"ggplot": "ggplot2 (R)",
"bokeh": "Bokeh",
"plotly": "plotly",
}

names = {
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ jinja2-highlight
markdown
scikit-misc
boto3
pytest
pytest
plotly
statsmodels
26 changes: 13 additions & 13 deletions tests/test_plots.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import render

defined_plots = {'bar-counts': ['pandas', 'plotnine', 'ggplot', ],
'dodged-bar-chart': ['pandas', 'plotnine', 'ggplot', ],
'scatter-plot': ['pandas', 'plotnine', 'ggplot', ],
defined_plots = {'bar-counts': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
'dodged-bar-chart': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
'scatter-plot': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
'scatter-plot-with-colors': ['matplotlib',
'seaborn',
'plotnine',
'ggplot',
],
'scatter-plot-with-facet': ['seaborn', 'plotnine', 'ggplot', ],
'scatter-plot-with-facets': ['seaborn', 'plotnine', 'ggplot', ],
'scatter-plot-with-size': ['pandas', 'plotnine', 'ggplot', ],
'scatter-with-regression': ['seaborn', 'plotnine', 'ggplot', ],
'simple-histogram': ['pandas', 'matplotlib', 'plotnine', 'ggplot', ],
'stacked-bar-chart': ['pandas', 'plotnine', 'ggplot', ],
'stacked-kde': ['pandas', 'seaborn', 'plotnine', 'ggplot', ],
'stacked-smooth-line-and-scatter': ['plotnine', 'ggplot', ],
'timeseries': ['pandas', 'plotnine', 'ggplot', ]}
'plotly', ],
'scatter-plot-with-facet': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
'scatter-plot-with-facets': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
'scatter-plot-with-size': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
'scatter-with-regression': ['seaborn', 'plotnine', 'ggplot', 'plotly', ],
'simple-histogram': ['pandas', 'matplotlib', 'plotnine', 'ggplot', 'plotly', ],
'stacked-bar-chart': ['pandas', 'plotnine', 'ggplot', 'plotly', ],
'stacked-kde': ['pandas', 'seaborn', 'plotnine', 'ggplot', 'plotly', ],
'stacked-smooth-line-and-scatter': ['plotnine', 'ggplot', 'plotly', ],
'timeseries': ['pandas', 'plotnine', 'ggplot', 'plotly', ]}


def test_exist():
Expand Down