From b6b1a4b67554eaf5a988ad17dab48e225207b17e Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Thu, 2 Jan 2020 15:13:03 -0500 Subject: [PATCH 01/35] Build without conda --- .travis.yml | 14 +++++++------- Examples.ipynb | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5de56ae..4c4a1da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,16 @@ language: python python: - - '3.6' + - '3.7' notifications: email: true before_install: - - export PATH="./.travis:$HOME/miniconda/bin:$PATH" - - sudo apt-get -qq update - - bash .travis/install_conda.sh + - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage + - chmod +x orca.AppImage install: "pip install --quiet -r requirements.txt" dist: xenial services: - xvfb script: make travis -after_script: - - echo "Rendered notebook http://nbviewer.jupyter.org/urls/s3.amazonaws.com/pythonplotbuilds/tdhopper/pythonplot.com/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER/Examples.$(git log -1 --pretty=format:'%h').ipynb" before_deploy: - npm install netlify-cli -g deploy: @@ -25,5 +22,8 @@ deploy: addons: artifacts: true apt: + sources: + - r-packages-precise packages: - firefox-geckodriver + - firefox-geckodriver + - r-base diff --git a/Examples.ipynb b/Examples.ipynb index 79f666d..a1f800b 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -8,6 +8,7 @@ "source": [ "%matplotlib inline\n", "\n", + "import readline\n", "import altair as alt\n", "import pandas as pd\n", "import seaborn as sns\n", From b019968be7ec3445dd0d81aa9b49ff92cbef664f Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:21:04 -0500 Subject: [PATCH 02/35] get R version --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4c4a1da..00474da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: notifications: email: true before_install: + - R --version - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - chmod +x orca.AppImage install: "pip install --quiet -r requirements.txt" From 33a8f254bd924dcec721ced927c43cacc4092238 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:26:17 -0500 Subject: [PATCH 03/35] pip freeze --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00474da..09a79a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,12 @@ notifications: email: true before_install: - R --version +install: - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - - chmod +x orca.AppImage -install: "pip install --quiet -r requirements.txt" + - chmod +x orca.AppImage + - pip install --quiet -r requirements.txt +after_install: + - pip freeze dist: xenial services: - xvfb From 9aa969a57a9444c3ab1b5b5d9148b2418f63543c Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:30:57 -0500 Subject: [PATCH 04/35] pip freeze correctly --- .travis.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 09a79a8..f7d569e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,12 @@ +dist: xenial +addons: + artifacts: true + apt: + sources: + - r-packages-precise + packages: + - firefox-geckodriver + - r-base language: python python: - '3.7' @@ -9,9 +18,8 @@ install: - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - chmod +x orca.AppImage - pip install --quiet -r requirements.txt -after_install: - - pip freeze -dist: xenial +before_script: + - pip freeze services: - xvfb script: make travis @@ -22,12 +30,4 @@ deploy: script: ./netlify_deploy.sh skip_cleanup: true on: - all_branches: true -addons: - artifacts: true - apt: - sources: - - r-packages-precise - packages: - - firefox-geckodriver - - r-base + all_branches: true \ No newline at end of file From 5478aa35b070bebbb3b85d16125773ea61a6328c Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:42:31 -0500 Subject: [PATCH 05/35] INSTALL r 3.5 --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7d569e..2698461 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,17 @@ dist: xenial addons: artifacts: true apt: - sources: - - r-packages-precise packages: - firefox-geckodriver - - r-base language: python python: - '3.7' notifications: email: true -before_install: - - R --version install: + - add-apt-repository ppa:marutter/rrutter3.5 + - apt-get update + - apt install r-api-3.5 - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - chmod +x orca.AppImage - pip install --quiet -r requirements.txt From 66acf8ce7a9cc56b2231a930abad727729b93e66 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:44:42 -0500 Subject: [PATCH 06/35] add sudo --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2698461..26b22e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,9 @@ python: notifications: email: true install: - - add-apt-repository ppa:marutter/rrutter3.5 - - apt-get update - - apt install r-api-3.5 + - sudo add-apt-repository ppa:marutter/rrutter3.5 + - sudo apt-get update + - sudo apt install r-api-3.5 - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - chmod +x orca.AppImage - pip install --quiet -r requirements.txt From c7de6f815e786679bdc1f6fe5952ec542f8a151c Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:48:07 -0500 Subject: [PATCH 07/35] --yes --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 26b22e0..1cb6290 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,9 @@ python: notifications: email: true install: - - sudo add-apt-repository ppa:marutter/rrutter3.5 - - sudo apt-get update - - sudo apt install r-api-3.5 + - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 + - sudo apt-get update --yes + - sudo apt install r-api-3.5 --yes - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage - chmod +x orca.AppImage - pip install --quiet -r requirements.txt From 5ba5adfb35239b646d7f352b8be154e0c27a6ae8 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 07:53:18 -0500 Subject: [PATCH 08/35] install orca --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 1cb6290..542cc35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ python: notifications: email: true install: + - npm install -g electron@1.8.4 orca - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes From efcae06951d3b8ed9a4a3bab4c44ba24c757a976 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 08:00:09 -0500 Subject: [PATCH 09/35] fix orca --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 542cc35..d721949 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,16 @@ python: notifications: email: true install: - - npm install -g electron@1.8.4 orca - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O orca.AppImage + - mkdir orca + - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O ./orca/orca - chmod +x orca.AppImage + - export PATH="${HOME}/orca:${PATH}" - pip install --quiet -r requirements.txt before_script: + - orca --help - pip freeze services: - xvfb From f1bae338454a4b86bcdb1e9e31b934c269f3e56c Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 08:03:12 -0500 Subject: [PATCH 10/35] make executable --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d721949..6597581 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ install: - sudo apt install r-api-3.5 --yes - mkdir orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O ./orca/orca - - chmod +x orca.AppImage + - chmod +x ./orca/orca - export PATH="${HOME}/orca:${PATH}" - pip install --quiet -r requirements.txt before_script: From cde108a475806abae69134cd801a6017f9f74c2a Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 08:24:20 -0500 Subject: [PATCH 11/35] fix orca --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6597581..8a27f2e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,11 +14,13 @@ install: - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - mkdir orca - - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O ./orca/orca + - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca - chmod +x ./orca/orca - export PATH="${HOME}/orca:${PATH}" - pip install --quiet -r requirements.txt before_script: + - echo $PATH + - $HOME/orca/orca --help - orca --help - pip freeze services: From 325ec7fc552b05970c8406caff0824e0733ab3e0 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 08:28:58 -0500 Subject: [PATCH 12/35] fix orca again --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a27f2e..8a7a6f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,9 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - - mkdir orca + - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca - - chmod +x ./orca/orca + - chmod +x $HOME/orca/orca - export PATH="${HOME}/orca:${PATH}" - pip install --quiet -r requirements.txt before_script: From 55ec815109030b985382a4340261a4b315a23247 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 11:09:28 -0500 Subject: [PATCH 13/35] install ggplot 2from apt --- .travis.yml | 1 + Examples.ipynb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8a7a6f4..44bd3e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes + - sudo apt install r-cran-ggplot2 --yes - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca - chmod +x $HOME/orca/orca diff --git a/Examples.ipynb b/Examples.ipynb index a1f800b..72967cf 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -105,7 +105,6 @@ "outputs": [], "source": [ "%%R\n", - "install.packages(\"ggplot2\", repos='http://cran.us.r-project.org')\n", "library(ggplot2) \n", "theme_set(theme_grey(base_size = 24))" ] From 40baaba5d7b785f5a3106fa71c7351925742e957 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 11:14:41 -0500 Subject: [PATCH 14/35] install ggplot dependencies --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 44bd3e9..cbd8fd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,8 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes + - sudo apt-get install r-cran-plyr --yes + - sudo apt-get install r-cran-reshape2 --yes - sudo apt install r-cran-ggplot2 --yes - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca From cd3a611d5ad9dd92c14b0df389b5fb2a54b93a36 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 11:18:01 -0500 Subject: [PATCH 15/35] more dependencies --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cbd8fd0..724e11d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ install: - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - sudo apt-get install r-cran-plyr --yes - - sudo apt-get install r-cran-reshape2 --yes + - sudo apt-get install r-cran-reshape2 r-api-3 r-cran-rcpp --yes - sudo apt install r-cran-ggplot2 --yes - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca From e34cdd349f12cff1d6d4ffa486b1829833ed7cb4 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 11:21:11 -0500 Subject: [PATCH 16/35] more dependencies --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 724e11d..70a3ecf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,7 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - - sudo apt-get install r-cran-plyr --yes - - sudo apt-get install r-cran-reshape2 r-api-3 r-cran-rcpp --yes + - sudo apt-get install r-cran-plyr r-cran-reshape2 r-api-3 r-cran-rcpp --yes - sudo apt install r-cran-ggplot2 --yes - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca From 7bd3ce47a101fe19c088aafc2ccf2dc577e5b4c2 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 11:26:58 -0500 Subject: [PATCH 17/35] remove r-api-3 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 70a3ecf..c2d97ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - - sudo apt-get install r-cran-plyr r-cran-reshape2 r-api-3 r-cran-rcpp --yes + - sudo apt-get install r-cran-plyr r-cran-reshape2 r-cran-rcpp --yes - sudo apt install r-cran-ggplot2 --yes - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca From c992ffac463cddff335eb6fce8f9cf193cce07a8 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 12:13:30 -0500 Subject: [PATCH 18/35] install ggplot directly --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c2d97ac..e0bfe8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,7 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes - - sudo apt-get install r-cran-plyr r-cran-reshape2 r-cran-rcpp --yes - - sudo apt install r-cran-ggplot2 --yes + - sudo su - -c "R -e \"install.packages('ggplot2', repos='http://cran.rstudio.com/')\"" - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca - chmod +x $HOME/orca/orca From aa54373029ec881b39a1a9dab29103509af3b4bd Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Fri, 3 Jan 2020 19:50:25 -0500 Subject: [PATCH 19/35] sudo apt-get install r-cran-mgcv --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e0bfe8b..c05740d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ install: - sudo add-apt-repository --yes ppa:marutter/rrutter3.5 - sudo apt-get update --yes - sudo apt install r-api-3.5 --yes + - sudo apt-get install r-cran-mgcv - sudo su - -c "R -e \"install.packages('ggplot2', repos='http://cran.rstudio.com/')\"" - mkdir $HOME/orca - wget --quiet https://github.com/plotly/orca/releases/download/v1.2.1/orca-1.2.1-x86_64.AppImage -O $HOME/orca/orca @@ -34,4 +35,4 @@ deploy: script: ./netlify_deploy.sh skip_cleanup: true on: - all_branches: true \ No newline at end of file + all_branches: true From a5bf462c04fcc2dc95e4b72f7cc36f4c389aee38 Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Mon, 6 Jan 2020 14:27:07 -0500 Subject: [PATCH 20/35] set renderer --- Examples.ipynb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Examples.ipynb b/Examples.ipynb index 72967cf..22d9251 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -48,7 +48,9 @@ "\n", "templated_fig = pio.to_templated(fig)\n", "pio.templates['my_template'] = templated_fig.layout.template\n", - "pio.templates.default = 'my_template'" + "pio.templates.default = 'my_template'\n", + "\n", + "alt.renderers.enable('png')" ] }, { @@ -354,7 +356,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "(\n", " alt.Chart(\n", " mpg, title=\"Number of Cars by Make\"\n", From 1a2e7f5d9881a74580d346e6788be1f8c5f17ee3 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Mon, 6 Jan 2020 18:23:15 -0500 Subject: [PATCH 21/35] set webdriver --- Examples.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples.ipynb b/Examples.ipynb index 22d9251..add16c4 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -50,7 +50,7 @@ "pio.templates['my_template'] = templated_fig.layout.template\n", "pio.templates.default = 'my_template'\n", "\n", - "alt.renderers.enable('png')" + "alt.renderers.enable('png', webdriver='firefox')" ] }, { From 7893641bab6c60512b00cf8240998c908a530f51 Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Tue, 7 Jan 2020 10:27:58 -0500 Subject: [PATCH 22/35] remove altair magic --- Examples.ipynb | 56 -------------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/Examples.ipynb b/Examples.ipynb index add16c4..d70a77f 100644 --- a/Examples.ipynb +++ b/Examples.ipynb @@ -53,44 +53,6 @@ "alt.renderers.enable('png', webdriver='firefox')" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from io import BytesIO\n", - "\n", - "def render_altair(chart):\n", - " b = BytesIO()\n", - " chart.save(b, scale_factor=2.0, format='png', webdriver='firefox')\n", - " b.seek(0)\n", - " return b.read()\n", - "\n", - "\n", - "import ast\n", - "\n", - "def exec_then_eval(code, shell):\n", - " block = ast.parse(code, mode='exec')\n", - "\n", - " # assumes last node is an expression\n", - " last = ast.Expression(block.body.pop().value)\n", - "\n", - " _globals, _locals = {}, {}\n", - " shell.ex(compile(block, '', mode='exec'))\n", - " return shell.ev(compile(last, '', mode='eval'))\n", - "\n", - "@magics_class\n", - "class AltairMagic(Magics):\n", - " @cell_magic\n", - " def altair(self, line, cell):\n", - " return Image(render_altair(exec_then_eval(cell, self.shell)))\n", - "\n", - "\n", - "ip = get_ipython()\n", - "ip.register_magics(AltairMagic)" - ] - }, { "cell_type": "code", "execution_count": null, @@ -111,13 +73,6 @@ "theme_set(theme_grey(base_size = 24))" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, @@ -476,7 +431,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "(\n", " alt.Chart(mpg)\n", " .mark_bar()\n", @@ -567,7 +521,6 @@ }, "outputs": [], "source": [ - "%%altair \n", "alt.Chart(mpg).mark_circle().encode(\n", " alt.X(\n", " \"displ\",\n", @@ -814,7 +767,6 @@ }, "outputs": [], "source": [ - "%%altair \n", "(\n", " alt.Chart(\n", " mpg,\n", @@ -949,7 +901,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "(\n", " alt.Chart(\n", " mpg,\n", @@ -1069,7 +1020,6 @@ }, "outputs": [], "source": [ - "%%altair \n", "alt.Chart(mpg).mark_circle().encode(\n", " x=alt.X(\"displ\"),\n", " y=alt.Y(\"hwy\"),\n", @@ -1191,7 +1141,6 @@ }, "outputs": [], "source": [ - "%%altair \n", "(alt\n", " .Chart(mpg)\n", " .mark_circle()\n", @@ -1307,7 +1256,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "scatter = (\n", " alt.Chart(\n", " mpg,\n", @@ -1464,7 +1412,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "alt.data_transformers.disable_max_rows()\n", "alt.Chart(diamonds).mark_bar().encode(\n", " x=\"cut\", y=\"count(cut)\", color=\"clarity\"\n", @@ -1553,7 +1500,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "alt.data_transformers.disable_max_rows()\n", "alt.Chart(diamonds).mark_bar().encode(\n", " x=\"clarity\",\n", @@ -1728,7 +1674,6 @@ }, "outputs": [], "source": [ - "%%altair\n", "alt.data_transformers.disable_max_rows()\n", "alt.Chart(diamonds).transform_density(\n", " \"depth\",\n", @@ -1850,7 +1795,6 @@ }, "outputs": [], "source": [ - "%%altair \n", "alt.Chart(ts).mark_line().encode(\n", " x=\"date\", y=\"value\"\n", ")" From 1407a815d8a0eee3eac18b27d1eaefd98cf4f4c2 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Tue, 14 Apr 2020 12:48:15 -0400 Subject: [PATCH 23/35] install altair_saver --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 44159dd..71f1571 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,4 +19,5 @@ plotly tzlocal simplegeneric altair +altair_saver selenium From ffd47bc570573a2d2a66d7d2564ae7438660f392 Mon Sep 17 00:00:00 2001 From: Timothy Hopper Date: Tue, 14 Apr 2020 12:49:23 -0400 Subject: [PATCH 24/35] fix name --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 71f1571..9fc0c35 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,5 +19,5 @@ plotly tzlocal simplegeneric altair -altair_saver +altair-saver selenium From 7324a8beb03656359fa8f6fe82f687d032abdef9 Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Sat, 13 Jun 2020 12:27:38 -0400 Subject: [PATCH 25/35] remove mail chimp for now --- templates/t_index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/t_index.html b/templates/t_index.html index 01df5d6..adaf73d 100644 --- a/templates/t_index.html +++ b/templates/t_index.html @@ -190,6 +190,5 @@
Note:
}); $.bigfoot(); - From 63240e2f55500517ef89db23cf4cfcc80668658e Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Sat, 13 Jun 2020 14:36:39 -0400 Subject: [PATCH 26/35] upgrade statsmodels --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9fc0c35..180d28e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ scikit-misc boto3 pytest chart-studio -statsmodels==0.10.0rc2 --pre +statsmodels==0.11.1 rpy2 psutil plotly From 3cfe6e5f776b82279a23ab8e2ccaf48264a2ca83 Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Sat, 13 Jun 2020 14:45:03 -0400 Subject: [PATCH 27/35] pin plotnine at <0.7 started getting a MemoryError running (ggplot(diamonds) + aes('depth', fill='cut', color='cut') + geom_density(alpha=0.1)) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 180d28e..a0aaeb2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ ipython pandas jupyter seaborn -plotnine +plotnine<0.7.0 jinja2 jinja2-highlight markdown From 41aca4c2481d8c44b4f2e3e0a9d5f932d1a1933d Mon Sep 17 00:00:00 2001 From: Tim Hopper Date: Sat, 13 Jun 2020 15:11:42 -0400 Subject: [PATCH 28/35] Use bootstrap from cdn --- templates/t_index.html | 18 +- web/css/bootstrap-grid.css | 1339 ---- web/css/bootstrap-grid.css.map | 1 - web/css/bootstrap-grid.min.css | 1 - web/css/bootstrap-grid.min.css.map | 1 - web/css/bootstrap-reboot.css | 459 -- web/css/bootstrap-reboot.css.map | 1 - web/css/bootstrap-reboot.min.css | 1 - web/css/bootstrap-reboot.min.css.map | 1 - web/css/bootstrap.css | 9320 -------------------------- web/css/bootstrap.css.map | 1 - web/css/bootstrap.min.css | 6 - web/css/bootstrap.min.css.map | 1 - web/css/custom.css | 35 - web/css/pygments-github.css | 61 - web/css/pygments-murphy.css | 63 - web/css/pygments-native.css | 72 - web/js/bootstrap.js | 3535 ---------- web/js/bootstrap.min.js | 7 - 19 files changed, 5 insertions(+), 14918 deletions(-) delete mode 100644 web/css/bootstrap-grid.css delete mode 100644 web/css/bootstrap-grid.css.map delete mode 100644 web/css/bootstrap-grid.min.css delete mode 100644 web/css/bootstrap-grid.min.css.map delete mode 100644 web/css/bootstrap-reboot.css delete mode 100644 web/css/bootstrap-reboot.css.map delete mode 100644 web/css/bootstrap-reboot.min.css delete mode 100644 web/css/bootstrap-reboot.min.css.map delete mode 100644 web/css/bootstrap.css delete mode 100644 web/css/bootstrap.css.map delete mode 100644 web/css/bootstrap.min.css delete mode 100644 web/css/bootstrap.min.css.map delete mode 100644 web/css/custom.css delete mode 100644 web/css/pygments-github.css delete mode 100644 web/css/pygments-murphy.css delete mode 100644 web/css/pygments-native.css delete mode 100644 web/js/bootstrap.js delete mode 100644 web/js/bootstrap.min.js diff --git a/templates/t_index.html b/templates/t_index.html index adaf73d..6b6443e 100644 --- a/templates/t_index.html +++ b/templates/t_index.html @@ -33,12 +33,8 @@ - - - + - - @@ -174,15 +170,11 @@
Note:
- - - - + + + + - - +