Skip to content

๐Ÿฆ  A simple API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the ๐Ÿผ Flask framework.

Notifications You must be signed in to change notification settings

ManjurHKhan/coronavirus-tracker-api

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

61 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

coronavirus-tracker (API)

This app is modified to run on GCP appengine

This is a basic API for tracking development of the new coronavirus (COVID-19, SARS-CoV-2). It's written in python using ๐Ÿผ Flask.

All Contributors GitHub stars GitHub forks GitHub last commit GitHub pull requests GitHub issues Tweet

Endpoints

All requests must be made to the base url: https://corona-covid-19-map.appspot.com (e.g: https://corona-covid-19-map.appspot.com/all). You can try them out in your browser to further inspect responses.

Getting confirmed cases, deaths, and recoveries:

GET /all
{
  "confirmed": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "deaths": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "recovered": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "latest": {
    "confirmed": ...,
    "deaths": ...,
    "recovered": ...
  },
  "source": "https://github.com/ManjurHKhan/coronavirus-tracker-api",
  "comment": "Forked from https://github.com/ExpDev07/coronavirus-tracker-api"
}

Getting just confirmed:

GET /confirmed
{
  "confirmed": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "source": "https://github.com/ManjurHKhan/coronavirus-tracker-api",
  "comment": "Forked from https://github.com/ExpDev07/coronavirus-tracker-api"
}

Getting just deaths:

GET /deaths
{
  "deaths": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "source": "https://github.com/ManjurHKhan/coronavirus-tracker-api",
  "comment": "Forked from https://github.com/ExpDev07/coronavirus-tracker-api"
}

Getting just recoveries:

GET /recovered
{
  "recovered": {
    "latest": ...,
    "locations": {
      "Mainland China": [ ... ],
      "US": [...],
      ...
    },
    "last_updated": "2020-03-07T18:08:58.432242Z"
  },
  "source": "https://github.com/ManjurHKhan/coronavirus-tracker-api",
  "comment": "Forked from https://github.com/ExpDev07/coronavirus-tracker-api"
}

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 cache for one hour.

Wrappers

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

Java

Prerequisites

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

Installation

  • git clone https://github.com/ManjurHKhan/coronavirus-tracker-api.git
  • cd coronavirus-tracker-api
  • pip3 install

Running using GCP dev_appserver.py

  • dev_appserver.py .
  • It will tell you what port to run it on.

Running / Development

Deploying to GCP AppEngine

# login to be able to deploy the app
$ gcloud auth login

# create new GCP project (change name here)
$ export PROJECT_ID=simple-gae-project-2134
$ gcloud projects create $PROJECT_ID

# set this project to current project
$ gcloud config set project $PROJECT_ID

# check your config
$ gcloud config list

# you need to create the app first in the specific region.
# omit the region to choose it interactivelly.
$ gcloud app create --region=us-east1

# now deploy the code
$ gcloud app deploy

# open app in the browser
$ gcloud app browse

# tail live log
$ gcloud app logs tail -s default

Running Tests

Linting

Building

Deploying

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


ExpDev

๐Ÿ’ป ๐Ÿ“– ๐Ÿšง

bjarkimg

๐Ÿ’ฌ

Bost

๐Ÿ“–

License

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

About

๐Ÿฆ  A simple API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the ๐Ÿผ Flask framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%