Coder Social home page Coder Social logo

khondakar / covid-19-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omaroid/covid-19-api

0.0 1.0 0.0 969 KB

A realtime API for coronavirus cases on Heroku. Data automatically updated every 10 minutes!

Home Page: https://covid19api.herokuapp.com/

License: MIT License

Python 100.00%

covid-19-api's Introduction

COVID-19 API

This is a fast (< 200ms) and basic API for tracking development of the new coronavirus (2019-nCoV). It's written in Python using ๐Ÿผ Flask and also contains historical data ๐Ÿ“ˆ. I've also programmed a scheduler on the app to refresh the data every 10 minutes.

Endpoints

All requests must be made to the base url: https://covid19api.herokuapp.com/. You can try it out in your browser to further inspect responses.

Getting confirmed cases, deaths, and recoveries:

GET /
{ "latest": { ... }, "confirmed": { ... }, "deaths": { ... }, "recovered": { ... }, "updatedAt": "2020-03-27 12:00:12.067975" }

Getting just confirmed:

GET /confirmed
{ "latest": 418678, "locations": [ ... ] }

Getting just deaths:

GET /deaths
{ "latest": 18625, "locations": [ ... ] }

Getting just recovered:

GET /recovered
{ "latest": 35000, "locations": [ ... ] }

Getting just latest data:

GET /latest
{ "confirmed": 418678, "deaths": 18625, "recovered": 35000}

Getting update UTC datetime:

GET /updatedAt
"2020-03-27 12:00:12.067975"

Data

The data comes from the 2019 Novel Coronavirus (nCoV) Data Repository, provided by JHU CCSE. It is programmatically retrieved, re-formatted and stored in the server for every 10 minutes.

Prerequisites

You will need the following things properly installed on your computer.

Installation

  • git clone https://github.com/Omaroid/Covid-19-API
  • cd Covid-19-API
  • pip install -r requirements.txt

Running / Development

Deploying

  • Create a Heroku account
  • Create a Heroku application
  • heroku login
  • git init
  • heroku git:remote -a <AppName>
  • git add .
  • git commit -am "first commit"
  • git push heroku master

Testing

  • Visit your application webpage
  • https://<AppName>.herokuapp.com/

License

The data is available to the public strictly for educational and academic research purposes.

covid-19-api's People

Contributors

omaroid avatar

Watchers

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