knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(cowin)
The goal of this package is to create R wrapper for cowin API It allows user to find slots for vaccination in your district or pincode. API has some restrictions - it allows maximum 100 request per 5 minutes per IP. Your IP address can be blocked if rate limit exceeds.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("deepanshu88/cowin")
library(cowin) library(dplyr) df.States <- extract_states()
df.District <- extract_districts(16)
df.Districts <- extract_districts_all(df.States)
slots <- slots_district(df.Districts[1,1])
slots <- slots_district(df.Districts[1,1], date = Sys.Date()+7)
slots2 <- slots_cleaned(slots) slots2 <- slots_cleaned(slots, age_limit = 45)
district.ids <- c(1,3) slots.all <- slots_district_all(district.ids)
slots.pincodes <- slots_pincode(201301) slots.pincodes2 <- slots_cleaned(slots.pincodes) slots.pincodes2 <- slots_cleaned(slots.pincodes, age_limit = 45)
slots.all <- slots_pincode_all(pincodes = c(201301,110032))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.