Coder Social home page Coder Social logo

deployment_example's Introduction

covid-data

A dash app to display covid data pulled from an XPrize supplied csv file which is updated daily.

Live as of January 2021 at: https://violet-covid-data.herokuapp.com/

Built with Pandas, Plotly, and Dash in a Flask app. Deployed to Heroku.

Inspired by participation in the XPrize Covid Response competition of 2020-2021 via team Lavender Spiral.

Created by

Josh @Caellwyn - Data Scientist

Layla @laylar - DevOps, Front End Developer

How to Use

Make your selections at the top and a new graph will appear, displaying up-to-date data below!

Checkboxes and a graph

Some Story About Our Process

We started this in a Jupyter Notebook, even got as far as building a prediction model with 99+% accuracy for the United stats between 12/01 and 1/01 using statsmodels SARIMAX. We experimented with fbprophet, too, but didn't have as much success.

Data and displays are useless if no one can see them, however! So we decided to deploy it live.

First, we had to decide which tool to use - React (Dash plays well with React as a component!) or Flask (Flask embraces Python ). Layla has built apps and websites with React before, so why not learn a new framework? We went with Flask.

After some learning curve, trial and error, and a bit of luck, we got a basic Flask app live on Heroku.

From there, we added bit by bit of code on the deploy_branch, testing that it didn't break things by temporarily deploying that branch on Heroku before we pushed to the main branch, which Heroku automatically deploys from.

Unfortunately, we found that the predictive model took too long for Heroku and would timeout before displaying the graph. So we have modified this site to display current data based on user selected criteria, which does not require the predictive modeling to work.

To experience the predictive modeling as it worked locally on 12/07, you can run from git commit c12aa65c9a9dcf69a144efaf5eaf4642dc16d654, "Merge branch 'deploy_model' of https://github.com/Violet-Spiral/covid-predict into deploy_model" on main branch.

deployment_example's People

Contributors

github-actions[bot] avatar caellwyn avatar

Watchers

 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.