Giter VIP home page Giter VIP logo

corona-api-india's Introduction

corona-api-india

Setup

  1. Clone the Project
  2. Create a virtual environment
  3. Install all packages from the requirements.txt file
  4. Go to cmd/terminal start the server

Details

git clone https://github.com/cavemendev-den/corona-api-india.git
vitualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
cd corona-api-india
python3 manage.py runserver

APIs

To get overall country wide information i.e Number of passengers screened at airports,Active cases,
cured or discharged cases,death cases,Migrated covid 19 patients

URL : http://127.0.0.1:8000/api/get-head/

Json Response

{
  "Passengers screened at airport": "15,17,327", 
  "Active COVID 2019 cases": "415", 
  "Cured/discharged cases ": "23", 
  "Death cases ": "7", 
  "Migrated COVID-19 Patient ": "1"
}

To get statewise information. We get the followings data : id,state name, confirmed cases (indian),confirmed cases (foreign)
cured/discharged, death

url http://127.0.0.1:8000/api/get-states/

Takes one GET parameter states

If you need all states data at once you can pass all as the value to the get parameter :

url http://127.0.0.1:8000/api/get-states/?states=all

If you need particular states you can pass an array of state ids according to the table given at the end :

url http://127.0.0.1:8000/api/get-states/?states=["1","2","3"]

{
  "id": "1", 
  "Name of State / UT": "Andhra Pradesh",
  "Total Confirmed cases (Indian National)": "5", 
  "Total Confirmed cases ( Foreign National )": "0", 
  "Cured/Discharged/Migrated": "0", 
  "Death": "0"
}

State id reference Table

State / UT Name id
Andhra Pradesh 1
Bihar 2
Chattisgarh 3
Delhi 4
Gujarath 5
Haryana 6
Himachal Pradesh 7
Karnataka 8
Kerala 9
Madhya Pradesh 10
Maharashtra 11
Odisha 12
Puducherry 13
Punjab 14
Rajasthan 15
Tamil Nadu 16
Telengana 17
Chandigarh 18
Jammu & Kashmir 19
Ladakh 20
Uttar Pradesh 21
Uttarakhand 22
West Bengal 23
Total of all States 24

corona-api-india's People

Contributors

cavemendev-den avatar tavisca-smishra 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.