Top Related Projects
API for Current cases and more stuff about COVID-19 and Influenza
JSON time-series of coronavirus cases (confirmed, deaths and recovered) per country - updated daily
Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
Quick Overview
The mathdroid/covid-19-api is a GitHub repository that provides a REST API for COVID-19 data. It serves as a wrapper around multiple data sources, offering up-to-date information on COVID-19 cases worldwide. The API is built using Vercel's serverless functions and is designed to be easily integrated into various applications.
Pros
- Easy to use and integrate with existing applications
- Provides data from multiple reliable sources
- Regularly updated to ensure accuracy of information
- Free to use and open-source
Cons
- May experience rate limiting or downtime during high traffic periods
- Depends on external data sources, which could potentially affect data availability
- Limited historical data compared to some other COVID-19 data APIs
- Lacks advanced querying capabilities for complex data analysis
Code Examples
- Fetching global COVID-19 data:
const response = await fetch('https://covid19.mathdro.id/api');
const data = await response.json();
console.log(data);
- Getting data for a specific country:
const country = 'USA';
const response = await fetch(`https://covid19.mathdro.id/api/countries/${country}`);
const data = await response.json();
console.log(data);
- Retrieving daily summary data:
const response = await fetch('https://covid19.mathdro.id/api/daily');
const data = await response.json();
console.log(data);
Getting Started
To use the COVID-19 API in your project, follow these steps:
-
Make sure you have a way to make HTTP requests in your application (e.g., fetch API, axios, etc.).
-
Use the base URL
https://covid19.mathdro.id/api
for your requests. -
Make a GET request to the desired endpoint. For example, to get global data:
async function getGlobalData() {
try {
const response = await fetch('https://covid19.mathdro.id/api');
const data = await response.json();
return data;
} catch (error) {
console.error('Error fetching data:', error);
}
}
// Usage
getGlobalData().then(data => console.log(data));
- Refer to the API documentation in the repository for more endpoints and options.
Competitor Comparisons
API for Current cases and more stuff about COVID-19 and Influenza
Pros of disease-sh/API
- More comprehensive data coverage, including historical data and vaccine information
- Supports multiple data sources, offering greater reliability and cross-verification
- Provides additional endpoints for country-specific data and global statistics
Cons of disease-sh/API
- Potentially more complex to use due to its broader scope and feature set
- May have higher latency due to aggregating data from multiple sources
- Requires more frequent updates to maintain accuracy across diverse data points
Code Comparison
covid-19-api:
const data = await api.countries({countries: ['USA', 'China']});
console.log(data);
disease-sh/API:
const data = await api.countries(['USA', 'China']);
const historical = await api.historical.countries(['USA', 'China'], 30);
console.log(data, historical);
The code snippets demonstrate that disease-sh/API offers more granular control over data retrieval, including historical data, while covid-19-api provides a simpler interface for basic country data.
JSON time-series of coronavirus cases (confirmed, deaths and recovered) per country - updated daily
Pros of covid19
- Simpler data structure with a focus on time series data
- Includes a visualization tool for data exploration
- Offers data in both JSON and CSV formats
Cons of covid19
- Less frequent updates (daily vs. hourly for covid-19-api)
- Fewer data points and less granular information
- Limited to global and country-level data, lacking regional breakdowns
Code Comparison
covid19:
fetch("https://pomber.github.io/covid19/timeseries.json")
.then(response => response.json())
.then(data => {
data["Argentina"].forEach(({ date, confirmed, recovered, deaths }) =>
console.log(`${date} active cases: ${confirmed - recovered - deaths}`)
)
})
covid-19-api:
const api = require('covid19-api');
api.getReports()
.then((result) => {
console.log(result);
})
.catch((error) => {
console.log(error);
});
The covid19 repository provides a simple fetch-based approach for accessing time series data, while covid-19-api offers a more structured API with various endpoints for different types of data. covid19 focuses on ease of use for time series analysis, whereas covid-19-api provides more comprehensive and up-to-date information across multiple categories.
Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE
Pros of COVID-19
- Comprehensive dataset: Provides detailed global COVID-19 data, including cases, deaths, and recoveries
- Regular updates: Data is updated daily, ensuring up-to-date information
- Official source: Maintained by Johns Hopkins University, a trusted authority in COVID-19 tracking
Cons of COVID-19
- Raw data format: Requires processing to be used in applications
- Limited API functionality: Does not provide a ready-to-use API for developers
- Higher complexity: May be challenging for beginners to work with directly
Code Comparison
COVID-19 (CSV data format):
Province/State,Country/Region,Last Update,Confirmed,Deaths,Recovered
Hubei,Mainland China,2020-03-11T10:53:02,67773,3046,49134
,Italy,2020-03-11T21:33:02,12462,827,1045
covid-19-api (JSON API response):
{
"confirmed": {"value": 126000, "detail": "https://covid19.mathdro.id/api/confirmed"},
"recovered": {"value": 68000, "detail": "https://covid19.mathdro.id/api/recovered"},
"deaths": {"value": 4600, "detail": "https://covid19.mathdro.id/api/deaths"},
"lastUpdate": "2020-03-12T09:53:03.000Z"
}
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
Pros of coronavirus-tracker-api
- Supports multiple data sources (JHU, CSSeGIS, and NYT)
- Provides more detailed location data, including latitude and longitude
- Offers a CLI tool for easy local testing and development
Cons of coronavirus-tracker-api
- Less frequent updates compared to covid-19-api
- More complex setup and configuration required
- Larger codebase, potentially harder to maintain
Code Comparison
covid-19-api:
const getData = async (url) => {
const response = await fetch(url);
return response.json();
};
coronavirus-tracker-api:
def get(self, url, params=None, headers=None):
"""Wrapper for requests.get()."""
return requests.get(url, params=params, headers=headers, timeout=self.timeout)
Both repositories provide APIs for tracking COVID-19 data, but they differ in implementation and features. covid-19-api is built with JavaScript and focuses on simplicity, while coronavirus-tracker-api is written in Python and offers more comprehensive data sources and location information. The code comparison shows how each project handles HTTP requests, with covid-19-api using the Fetch API and coronavirus-tracker-api utilizing the requests library.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
COVID-19 API
No longer maintaining the official deployment. Please fork this repo and use it for your own purpose.
Serving data from John Hopkins University CSSE as a JSON API
Routes
-
/: contains opengraph image for sharing
-
/api: global summary
-
/api/og: generate a summary open graph image
-
/api/confirmed: global cases per region sorted by confirmed cases
-
/api/recovered: global cases per region sorted by recovered cases
-
/api/deaths: global cases per region sorted by death toll
-
/api/daily: global cases per day
-
/api/daily/[date]: detail of updates in a [date] (e.g. /api/daily/2-14-2020)
-
/api/countries: all countries and their ISO codes
-
/api/countries/[country]: a [country] summary (e.g. /api/countries/Indonesia or /api/countries/USA or /api/countries/CN)
-
/api/countries/[country]/confirmed: a [country] cases per region sorted by confirmed cases
-
/api/countries/[country]/recovered: a [country] cases per region sorted by recovered cases
-
/api/countries/[country]/deaths: a [country] cases per region sorted by death toll
-
/api/countries/[country]/og: generate a summary open graph image for a [country]
Usage
-
Clone
git clone --depth=1 https://github.com/mathdroid/covid-19-api
-
Install deps (
yarn
,npm install
) -
Install and register to ZEIT Now if you haven't. This project is exclusively made for the platform.
-
now dev
to run a local dev deployment,now
to publish.
Showcase
-
Create a Github Action that Send Everyday Covid19 Status Through Telegram Using Python, (Telegram Bot) by catflip
-
17 responsible live visualizations about the coronavirus, for you to use, (Web) by Datawrapper
-
Android kotlin-mvvm-covid19, (Android) by Rizki Maulana
-
CovidNow, (Android) by Oskar Misiewicz
-
https://github.com/andreyyoshua/Covid-19, (iOS) by Andrey Yoshua
-
https://github.com/pararang/vue-covid, (VueJS) by Muhammad Ikhsan
-
Vue Covid 19 monitoring App, (VueJS) by Mahmud Rafid . A demo.
-
https://github.com/pooladkhay/covid19, (React, NextJS) by Mohammad Javad Pooladkhay
-
https://github.com/alancampora/corona-virus-react, (React) by Alan Adrian Campora
-
https://github.com/alankilalank/react-covid-19, (React, CRA) by Alank Ilalank
-
https://github.com/pabloVinicius/covid-19-dashboard https://covid19.data.eti.br/, (Web) by Pablo Vinicius
-
https://github.com/freakyfelt/gatsby-source-mathdroid-covid19(https://github.com/freakyfelt/gatsby-source-mathdroid-covid19), (Gatsby, TypeScript) by Bruce Felt
-
https://github.com/miftahafina/covid19-data, (React) by Miftah Afina
-
https://github.com/mazik/corona/, (An Electron based Desktop application based on VueJS) by Md Mazedul Islam Khan
-
https://github.com/hoaaah/flutter-covid19ina, (Flutter) by @hoaaah
-
https://github.com/kasramp/COVID-19-Telegram-bot, (Telegram Bot, Java) by Kasra Madadipouya
-
https://covid-19-map.netlify.com/,(React, Deck.GL) by Jason Feng
-
https://github.com/Ghazif-Adeem/COVID-19-Statistics-Checker, (PHP) by Ghazif Adeem
-
Access mathdroid API to store Coronavirus COVID-19 worldwide data in JSON format, (Javascript script, get updated every 8 hours by Github Actions) by Maxine Chen
-
A Coronavirus COVID-19 global data statistics website, (React + Gatsby + Material UI + Recharts) by Maxine Chen
-
https://novel-coronavirus-reports.netlify.com/, (PWA with Map & reports) by Sharad Raj Singh Maurya
-
https://github.com/sutanlab/covid19-visualized, (Next.js, TypeScript) by Sutan Gading F. Nasution
-
A Dedicated Covid-19 Philippines Tracker, (React, CRA, TailwindCSS) by Mark Anthony Uy
-
Covid-19 World Map (D3.js globe displaying confirmed, recovered, and death counts by country) by Paige Vogenthaler
-
https://souryvath.github.io/ng-covid-19/, (Angular, ApexCharts) by Souryvath NIRASAY
-
Corona-tracker, (Vue frontend for the API with main focus on India) by Akash Raju M
-
https://github.com/satyawikananda/Vucovid-Covid-info, (VueJS, PWA) by Satya Wikananda
-
https://github.com/juanitourquiza/ng-covid-19 https://hackeruna.com/covid19/, (Angular) by Juan Urquiza
-
RN-Covid19, (React-Native) by Hamaar
-
Last 7 days chart with percentages,(Next, React, PWA) by Mithhu
-
https://livecovid19stats.netlify.com, (Gatsby, React) by Dhaiwat Pandya
-
https://corona-stats-eta.now.sh/, (React, Hooks) by Vitor Boccio
-
COVID-19 | Coronavirus Live Stats and Tracker, (React) by Micah Mones
-
https://sandipnirmal.github.io/covid-19-tracker, (React PWA) by Sandip R. Nirmal
-
https://github.com/NoumanHere/COVID-19-Using-Django, (Django, Python) by Nouman
-
https://github.com/mazik/corona-tracker/, (A Google Chrome extension for tracking CORONAVIRUS - COVID-19 update) by Md Mazedul Islam Khan
-
https://github.com/johanneshaberlah/corona-dashboard, (Java, Spring) by Johannes Haberlah
-
https://krishnatre-siddhartha.github.io/, (HTML+JS) by Siddhartha Sharma
-
Corona Count, (Next.js) by Ankit Suraj
-
https://github.com/NicolaLisci/COV1D9, (Angular 9, Typescript) by Nicola Lisci DEMO
-
https://mzaini30.js.org/covid19. Source: https://github.com/mzaini30/covid19/. By: @mzaini30
-
https://github.com/oniharnantyo/covid-19-telegram-bot, (Telegram Bot, Golang) by Oni Harnantyo
-
https://github.com/dabigjoe6/react-native-covid19, (React Native) by Joseph Olabisi
-
https://fight-covid19.netlify.app/, (Gatsby, React) by Jason Zheng
-
https://github.com/mastersam07/toju_wa, (Flutter) by @Mastersam07
-
https://github.com/flborrelli/covid-19-updates, (React + Semantic UI) by Fernando Lima Borrelli
-
covid19-graphql-api.herokuapp.com, (GraphQL) by Rene Osman
-
https://coronnavirusapp.firebaseapp.com/, (Angular/Ionic) by Rayden2015
-
https://github.com/melvinalmonte/covid-bot, (Chatbot using Google's Dialogflow + NextJS Wrapper) by Melvin Almonte
-
https://cdmoro.github.io/covid-19-stats/ https://github.com/cdmoro/covid-19-stats React, by cdmoro
-
https://tracking-corona.web.app/ https://github.com/JakMar17/CoronaTracker by JakMar17
-
https://covid19site.netlify.com/ (Vue.js) by Ihsan Nurul Habib
-
https://github.com/ihsaninh/covid-19-reactnative, (React Native) by Ihsan Nurul Habib
-
https://github.com/AbdullahChauhan/Coronavirus-COVID-19-Tracker, (Flutter) by Abdullah Chauhan
-
https://github.com/dynamicbalaji/covid19-tracker, (React) by Balaji Ashok Kumar(BK)
-
https://covid19.sznm.dev, (Gatsby, Nivo) by Agustinus Nathaniel
-
https://github.com/ZuTechV2/c19stats, https://zu-c19stats.netlify.app, (VueJS) by Zu Tech V2
License
MIT License 2020, mathdroid.
Transitively from the Johns Hopkins Site, the data may not be used for commercial purposes.
Contributors â¨
Thanks goes to these wonderful people (emoji key):
Odi ð» ð |
Yahya Fadhlulloh Al-Fatih ð» |
spiritbro1 ð» |
Imperial Owl ð» |
This project follows the all-contributors specification. Contributions of any kind welcome!
Top Related Projects
API for Current cases and more stuff about COVID-19 and Influenza
JSON time-series of coronavirus cases (confirmed, deaths and recovered) per country - updated daily
Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot