Giter Site home page Giter Site logo

janmallari / coronavirus-ph-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from palaganaskurl/coronavirus-ph-api

0.0 0.0 0.0 141 KB

🦠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.now.sh

License: MIT License

JavaScript 97.80% HTML 2.20%

coronavirus-ph-api's Introduction

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.now.sh (e.g: https://coronavirus-ph-api.now.sh/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

Deploy on ZEIT Now

The easiest way to deploy this app is to use the ZEIT Now Platform from the creators of Next.js.

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!

License & copyright

© Robert C Soriano

Licensed under the MIT License.

coronavirus-ph-api's People

Contributors

wobsoriano avatar kurlpalaganas 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.