Giter Site home page Giter Site logo

dotspace_heroku's Introduction

The web app can be found here and is accessible through the shortened URL bit.ly/GrainGenerator.

I've included the steps for creating a simple web app like GrainGenerator below. This uses a combination of:

This wiki was created after attending a GUI workshop at RSE conference 2019 led by Diego Alonso Alvarez, where the combination of Jupyter+ipywidgets+Voila was suggested.

GrainGenerator uses Python, but this workflow should be compatible with any Jupyter kernel (C++, Julia etc).

1. Notebook with widgets

Use Jupyter Notebooks and ipywidgets to generate/read in and interact with data (create sliders, input text boxes etc) locally. I recommend using the ipywidgets documentation. You can see the GrainGenerator code example here.

2. Convert notebook to local web app

Use voila to convert the notebook into a simple standalone web application. For testing locally you can follow the installation and usage instructions here.

3. Deploy using Heroku

Deploy using Heroku so that others can access your web app (I prefer Heroku over Binder as it loads more quickly, and does not have an intermediate loading page). Sign up for a free Heroku account. There are deployment steps for voila here and there is a tutorial here but CAUTION the Procfile as outlined did not work for me; my Procfile contains

web: jupyter extension enable voila.server_extension --sys-prefix && jupyter server --ServerApp.default_url=/voila --ip=0.0.0.0 --ServerApp.open_browser=False --port=$PORT --ServerApp.token='' --ServerApp.default_url=/voila/render/path/to/notebook.ipynb

as outlined early in this discussion. Your requirements.txt should contain voila and jupyter extension.

Note:

  • heroku create does not need to be used after each new commit
  • git push heroku master to deploy to heroku after a new commit
  • git push origin master to push to github repository (as I have set this repository as an additional upstream)

dotspace_heroku's People

Contributors

lucydot avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.