leiurus17 / coronavirus-ph-api

🦠A simple and fast (< 200ms) api for tracking the coronavirus (COVID-19, SARS-CoV-2) outbreak in the Philippines.

Home Page:https://coronavirus-ph-api.herokuapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

coronavirus-ph (API)

🦠A simple and fast (< 200ms) api for tracking the coronavirus (COVID-19, SARS-CoV-2) outbreak in the Philippines.

GitHub GitHub repo size GitHub stars GitHub forks GitHub last commit

Endpoints

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

Getting summary of COVID-19 cases in the Philippines:

GET /cases
[
  {
    "case_no": 1,
    "date": "2020-01-30",
    "age": 38,
    "gender": "F",
    "nationality": "Chinese",
    "hospital_admitted_to": "San Lazaro Hospital",
    "had_recent_travel_history_abroad": "Yes",
    "status": "Recovered",
    "other_information": "First case of COVID-19 in PH",
  },
  {...}
]

Getting confirmed cases of Filipino nationals outside the Philippines:

GET /cases-outside-ph
[
  {
    "country_territory_place": "Diamond Princess",
    "confirmed": 80,
    "recovered": 70,
    "died": 0
  },
  {...}
]

Getting Laboratory Status of Patients in the Philippines

GET /test-results
{
  "confirmed_cases": 636,
  "cases_tested_negative": 728,
  "cases_pending_test_results": 595
}

Getting Metro Manila Community Quarantine Checkpoints:

GET /mm-checkpoints
[
  {
    "id": 13,
    "district": "NORTHERN POLICE DISTRICT",
    "city": "VALENZUELA CITY",
    "location": "NLEX (ENTRANCE)",
    "type": "EntryExit",
    "lat": 14.768614,
    "lng": 120.967557,
    "description": "Not verified"
  },
  {...}
]

Getting a single Metro Manila Community Quarantine Checkpoint:

GET /mm-checkpoints/:id
{
  "id": 13,
  "district": "NORTHERN POLICE DISTRICT",
  "city": "VALENZUELA CITY",
  "location": "NLEX (ENTRANCE)",
  "type": "EntryExit",
  "lat": 14.768614,
  "lng": 120.967557,
  "description": "Not verified"
}

Getting Local government units under partial lockdown:

GET /lockdowns
[
  {
    "lgu": "Ilocos Norte",
    "region": "I",
    "start_date": "2020-03-14",
    "estimated_population": 593081,
    "cases": 0,
    "deaths": 0,
    "recovered": 0
  },
  {...}
]

Data

All data are programmatically retrieved, re-formatted and stored in the cache for one hour.

Installation

  • git clone https://github.com/sorxrob/coronavirus-ph-api.git
  • cd coronavirus-ph-api
  • cp .env.example .env
  • npm install
  • npm start

Running / Development

Testing

  • npm test

In the Wild

A list of public websites that are using this API

Other apps

I also launched a coronavirus tracking website and open-sourced it!

Donate

Buy Me A Coffee

License & copyright

© Robert C Soriano

Licensed under the MIT License.

About

🦠A simple and fast (< 200ms) api for tracking the coronavirus (COVID-19, SARS-CoV-2) outbreak in the Philippines.

https://coronavirus-ph-api.herokuapp.com

License:MIT License


Languages

Language:JavaScript 97.8%Language:HTML 2.2%