Giter VIP home page Giter VIP logo

palo_covid's Introduction

Sources for a technical test

Objective: build a few webservices based on a rest API to provide data from online covid datasets

Usage

Create a virtual environment, pip install all requirements

(.venv) $ pip install -r requirements.txt

Update data (or reset DB)

(.venv) $ ./update_data.py [path/to/covid_19_data.csv]

Start server in dev mode (only local access)

(.venv) $ ./start_server.sh

A server will be listening on port 5000: http://localhost:5000.

To see available endpoints, see http://localhost:5000/apidocs

Predict future data

(.venv) $ ./predict "US UK France"

Uses implementation describes in https://www.kaggle.com/eswarchandt/covid-19-forecasting-xgboost/comments

Status

  • 28/07/2020 (4h):
    • flask REST API prototype working on several endpoints
    • prototype for API doc using flasgger
    • get datapoint by date and country: OK, but needs to be optimized since it performs the group by at each call
    • Limitations:
      • used only srk dataset covid_19_data.csv
      • some hardcoded values
      • does not use online data, but local csv
  • 29/07/2020 (4h):
    • difficulty: generification for multiple sources, lost a lot of time...
    • split data extraction/uniformization and api responses which are now only data queries
    • enriched /covid/countries/ endpoint with a special keyword latest to get latests stats for the country
    • set up automatic tests (basic availability of endpoints for now)
    • Added Post method on countries endpoint + test
  • 30/07/2020 (5h):
    • difficulty (4h): parametrizing xgboost to try (unsuccessfully) to extrapolate future datapoints. Given implementation seems to be overfitting the training set
    • implemented notebook from kaggle, adapted for a routine job, and for our data
    • writing predictions to DB (csv)
  • 31/07/2020 (10 min):
    • Parametrizable path
  • Wished to do, but no time:
    • storage of data in a DB
    • deploy online on public IP
    • online retrieving of data
    • prediction of future data from parameter, e.g. predict the next 10 days.
    • API endpoints to trigger data refresh, prediction etc.
    • more detailed tests, behavior driven tests (behave)
    • add sources
    • package

palo_covid's People

Contributors

ycouble avatar dependabot[bot] avatar

Watchers

James Cloos 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.