Day 32 - Python Script to track Available COVID-19 Vaccine Slots for 18+ in India

 Booking a COVID-19 vaccination slot reminds me of good old days of booking a TATKAL ticket in   Indian train. If you are lucky and very fast with Keyboard then we would be able to book the train   ticket  under TATKAL quota. Otherwise Surprise !!! 





Same rule applies here too but we don't have idea about the next available slot timings for vaccination.

When is the next slot going to open ? Still it's a suspense for us. By the time we come to know that there are few slots available, CoWIN portal (https://www.cowin.gov.in/home) shows that it's already booked.


I have observed that people are struggling to find an available slots in their locality. So I thought of writing a python script using public API to track the available COVID-19 vaccine slots in the entire city.


Task for interested folks who want to send an alert to a group/channel:

Please trigger an email or message on WhatsApp/Telegram group whenever you get any data in the output file - "18plus_vaccination_slot.csv" or data frame - "18plus_vaccination_slot"


Co-WIN Public APIs to find appointment availability and to download vaccination certificates. These APIs are available for use by all third party applications

Co-WIN Public APIs Portal:

https://apisetu.gov.in/public/marketplace/api/cowin


JSON structure of COVID-19 Vaccine Slot response By District & Date:

https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByDistrict?district_id=276&date=05-05-2021


There are 88 Centers in District - Bangalore Rural i.e. 276




Sample payload of one Centre:

    {

      "center_id": 247428,

      "name": "Gundumgere Hosahalli PHC",

      "address": "Gundumgere Hosahalli PHC,Doddaballapura Taluk,Bangalore Rural",

      "state_name": "Karnataka",

      "district_name": "Bangalore Rural",

      "block_name": "Doddaballapura",

      "pincode": 561204,

      "lat": 13,

      "long": 77,

      "from": "10:00:00",

      "to": "16:00:00",

      "fee_type": "Free",

      "sessions": [

        {

          "session_id": "320bea64-785b-4baf-93c6-691f5c056a10",

          "date": "05-05-2021",

          "available_capacity": 10,

          "min_age_limit": 45,

          "vaccine": "COVISHIELD",

          "slots": [

            "10:00AM-11:00AM",

            "11:00AM-12:00PM",

            "12:00PM-01:00PM",

            "01:00PM-04:00PM"

          ]

        },

        {

          "session_id": "9e91aeab-8025-4382-94b0-220df98dd336",

          "date": "06-05-2021",

          "available_capacity": 0,

          "min_age_limit": 45,

          "vaccine": "COVISHIELD",

          "slots": [

            "10:00AM-11:00AM",

            "11:00AM-12:00PM",

            "12:00PM-01:00PM",

            "01:00PM-04:00PM"

          ]

        },

        {

          "session_id": "b9d694be-09b2-4986-8568-ca9b135f119d",

          "date": "07-05-2021",

          "available_capacity": 10,

          "min_age_limit": 45,

          "vaccine": "COVISHIELD",

          "slots": [

            "10:00AM-11:00AM",

            "11:00AM-12:00PM",

            "12:00PM-01:00PM",

            "01:00PM-04:00PM"

          ]

        },

        {

          "session_id": "8f7733f9-9af4-4b0c-a1ad-f99dab820671",

          "date": "08-05-2021",

          "available_capacity": 10,

          "min_age_limit": 45,

          "vaccine": "COVISHIELD",

          "slots": [

            "10:00AM-11:00AM",

            "11:00AM-12:00PM",

            "12:00PM-01:00PM",

            "01:00PM-04:00PM"

          ]

        }

      ]

    }


Please get the python script to track available COVID-19 vaccine slots from my GitHub repository

https://github.com/rr1989/COVID-19-Available-Vaccine-Slot-Python-Script-for-18plus-45plus


#RR #Day32 #Python #COVID19 #18Plus #AvailableSlots #India #HappyLearning #WeLearnEveryday






Comments

Popular posts from this blog

DAY 13 - Import data dynamically from Oracle DB using Python script in Power BI Desktop

DAY 31 - Organize a Secret Santa Game in your organization using a Python Script