Giter Site home page Giter Site logo

chaitanyasaig / coronavirus-tracker-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from expdev07/coronavirus-tracker-api

0.0 1.0 0.0 217 KB

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🍼 Flask framework. Supports multiple sources!

Home Page: https://coronavirus-tracker-api.herokuapp.com/v2/locations

License: GNU General Public License v3.0

Python 99.54% Makefile 0.46%

coronavirus-tracker-api's Introduction

coronavirus-tracker (API)

This is a fast (< 200ms) and basic API for tracking development of the new coronavirus (COVID-19, SARS-CoV-2). It's written in python using 🍼 Flask. Supports multiple sources!

Travis build License All Contributors GitHub stars GitHub forks GitHub last commit GitHub pull requests GitHub issues Tweet

Live global stats (provided by fight-covid19/bagdes) from this API:

Covid-19 Confirmed Covid-19 Recovered Covid-19 Deaths

Endpoints

All requests must be made to the base url: https://coronavirus-tracker-api.herokuapp.com/v2/ (e.g: https://coronavirus-tracker-api.herokuapp.com/v2/locations). You can try them out in your browser to further inspect responses.

Picking data source

We provide multiple data-sources you can pick from, simply add the query parameter ?source=your_source_of_choice to your requests. JHU will be used as a default if you don't provide one. Dynamically retrieve available sources at /v2/sources.

Available sources:

Getting latest amount of total confirmed cases, deaths, and recoveries.

GET /v2/latest
{
  "latest": {
    "confirmed": 197146,
    "deaths": 7905,
    "recovered": 80840
  }
}

Getting all locations.

GET /v2/locations
{
  "latest": {
    "confirmed": 272166,
    "deaths": 11299,
    "recovered": 87256
  },
  "locations": [
    {
      "id": 0,
      "country": "Thailand",
      "country_code": "TH",
      "province": "",
      "last_updated": "2020-03-21T06:59:11.315422Z",
      "coordinates": {
        "latitude": "15",
        "longitude": "101"
      },
      "latest": {
        "confirmed": 177,
        "deaths": 1,
        "recovered": 41
      }
    },
    {
      "id": 39,
      "country": "Norway",
      "country_code": "NO",
      "province": "",
      "last_updated": "2020-03-21T06:59:11.315422Z",
      "coordinates": {
        "latitude": "60.472",
        "longitude": "8.4689"
      },
      "latest": {
        "confirmed": 1463,
        "deaths": 3,
        "recovered": 1
      }
    }
  ]
}

Additionally, you can also filter by any attribute, including province and country (alpha-2 country_code).

GET /v2/locations?country_code=US

Include timelines.

GET /v2/locations?timelines=1

Getting a specific location (includes timelines by default).

GET /v2/locations/:id
{
  "location": {
    "id": 39,
    "country": "Norway",
    "country_code": "NO",
    "province": "",
    "last_updated": "2020-03-21T06:59:11.315422Z",
    "coordinates": { },
    "latest": { },
    "timelines": {
      "confirmed": {
        "latest": 1463,
        "timeline": {
          "2020-03-16T00:00:00Z": 1333,
          "2020-03-17T00:00:00Z": 1463
        }
      },
      "deaths": { },
      "recovered": { }
    }
  }
}

Exclude timelines.

GET /v2/locations?timelines=0

Wrappers

These are the available API wrappers created by the community. They are not necessarily maintained by any of this project's authors or contributors.

PHP

Golang

C#

Python

Java

Node.js

Ruby

Lua

Prerequisites

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

Installation

  • git clone https://github.com/ExpDev07/coronavirus-tracker-api.git
  • cd coronavirus-tracker-api
  • pipenv shell
  • pipenv install

Running / Development

Running Tests

  • make test

Linting

  • make lint

Building

Deploying

Contributors ✨

Thanks goes to these wonderful people (emoji key):


ExpDev

πŸ’» πŸ“– 🚧

bjarkimg

πŸ’¬

Bost

πŸ“–

GRIBOK

πŸ’» ⚠️

Oliver Thamm

πŸ“–

Mauro M.

πŸ“–

JKSenthil

πŸ’» πŸ“– ⚠️

SeanCena

πŸ’» πŸ“– ⚠️

Abdirahiim Yassin

πŸ“–

DarΓ­o HereΓ±ΓΊ

πŸ“–

Oliver

πŸ“–

License

See LICENSE.md for the license. Please link to this repo somewhere in your project :).

coronavirus-tracker-api's People

Contributors

abdirahiim avatar allcontributors[bot] avatar benjozork avatar bostx avatar expdev07 avatar gribok avatar imolein avatar itsksaurabh avatar jaerodyne avatar jksenthil avatar kamaropoulos avatar kant avatar mm-coder avatar o-ba avatar oliver-xapix-io avatar seancena avatar sem1083 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.