Giter Site home page Giter Site logo

covid-19-api's Introduction

[![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.

last_cron_date og_cron_status daily_cron_status

Serving data from John Hopkins University CSSE as a JSON API

Deploy with ZEIT Now

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

  1. Clone

    git clone --depth=1 https://github.com/mathdroid/covid-19-api
  2. Install deps (yarn, npm install)

  3. Install and register to ZEIT Now if you haven't. This project is exclusively made for the platform.

  4. now dev to run a local dev deployment, now to publish.

Showcase

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!

covid-19-api's People

Contributors

abdullahchauhan avatar akashrajum7 avatar anthlubic avatar balbaal avatar bilafish avatar dependabot-preview[bot] avatar dhaiwat10 avatar dynamicbalaji avatar flborrelli avatar freakyfelt avatar hamaar avatar hoaaah avatar ihsaninh avatar iyci avatar johanneshaberlah avatar juanitourquiza avatar k1m0ch1 avatar kant avatar markanthonyuy avatar mastersam07 avatar mathdroid avatar micahmones avatar mmikhan avatar mzaini30 avatar ndom91 avatar satyawikananda avatar sozonome avatar spiritbroski avatar yogasakti avatar zeotuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

covid-19-api's Issues

World Daily info seem missing recovered data

World Daily info seem missing recovered
https://covid19.mathdro.id/api/daily

{"totalConfirmed":337091,"mainlandChina":81435,"otherLocations":255656,"deltaConfirmed":0,"totalRecovered":0,"confirmed":{"total":337091,"china":81435,"outsideChina":255656},"deltaConfirmedDetail":{"total":0,"china":0,"outsideChina":0},"deaths":{"total":14651,"china":3274,"outsideChina":11377},"recovered":{"total":0,"china":0,"outsideChina":0},"active":0,"deltaRecovered":0,"incidentRate":0,"peopleTested":0,"reportDate":"2020-03-22"}]

Sorting cases by country

I'm trying to extract a list of confirmed cases by country using the endpoint .../api/confirmed. All countries except China and the United States seem to have their own entry. Can this endpoint be modified to include China and US totals so that I can access these totals without having to make a separate request or doing a reduce on the regional data?

Cumulative regional data doesn't match reported totals for country

I wrote a python script to fetch data by regions for a single country and added the totals. The hope was to visualize daily totals for a country. Unfortunately, I get completely different results than the reported daily totals for the country leading me to believe that the data is inaccurate. Any insight on this would be helpful.

Exception when attempting to access API within a Java package.

In my instance, I am unable to disable SSL checks in the application I am building. Because of this, I keep getting an error because Java doesn't like the SSL certificate for some reason. The full error can be found below:

sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Daily info for countries

Does the CSSE publish, and if it does, would it be possible, to get the daily info for smaller countries as well? For example, Estonia?

duplicate country ISO code

Hello there, thanks for this interesting API, there seems to be duplicate ISO codes for these countries.
{
"China": "CN",
"Mainland China": "CN",
"Czech Republic": "CZ",
"Czechia": "CZ"
}

Image api has CORB issue

I tried using the app and api. I wanted to add the dynamic image which is returned from this url.
https://covid19.mathdro.id/api/og

But this image is blocked by browser with CORB error.
can you add respective CORS policy in the api. thanks!

Null data (0)

As of right now I was making something using this api it was all working fine, but now it is returning null data (0) everything is zero.

Hopefully this gets fixed asap as this is the best api for coronavirus cases I have seen!

incorrect data

A request made to

GET /api/countries/canada HTTP/1.1
Host: covid19.mathdro.id
User-Agent: python-requests/2.23.0
Accept-Encoding: gzip, deflate
Accept: /
Connection: close

showing this that is inaccurate

{
"confirmed": {
"value": 0,
"detail": "https://covid19.mathdro.id/api/countries/canada/confirmed"
},
"recovered": {
"value": 0,
"detail": "https://covid19.mathdro.id/api/countries/canada/recovered"
},
"deaths": {
"value": 0,
"detail": "https://covid19.mathdro.id/api/countries/canada/deaths"
},
"lastUpdate": "2020-03-18T19:39:34.436Z"
}

Add deaths to api/daily

Hey, thanks for your service. Why is the "death" variable not part of the endpoint covid.mathdro.id/api/daily?

I only see total confirmed and total recovered. Would it be possible to integrate deaths as well? Thank you!

Returning 0 as response

When sending the request I get a response everything in 0. It was working fine 2 hours ago, but not working now. Looks like the API is having some issues.

Data is not refreshed since yesterday

Thank you for creating this API!! I am building react app to show stats. realized that numbers are not updated since yesterday night (US time). e.g. total number is 156400 for last almost last 10+ hrs. Thanks!

Usage

Hi,

Can we use the api in our free apps.

Thanks

Add country code to response

Can you provide the country code in response (like CHN, SPN, USA, etc)? Since i need to match your country data with our country list.

Here are example of non-standard country name:

  • Mainland China
  • US
  • etc

Thanks!

timelines query

could you add a "timelines" query? in order to see the history of the last days pls

Usage

Hi,

Please guide me can we use inside our app. We are developing a free app for the users

Last updated on daily report

Thank you for this API.

I am wondering if you can have a small lastupdated in the endpoint for the daily report.

Fixes to country names

Hey,

There are multiple instances of records where country names are different:

{
    "Mainland China": "China",
    "Republic of Korea": "South Korea",
    "Korea, South": "South Korea",
    "Hong Kong SAR": "Hong Kong",
    "Iran (Islamic Republic of)": "Iran",
    "Republic of Ireland": "Ireland",
    "Republic of Moldova": "Moldova",
    "Macao SAR": "Macau",
    "Taiwan*": "Taiwan",
    " Azerbaijan": "Azerbaijan",
    "Russian Federation": "Russia",
    "Congo (Brazzaville)": "Republic of the Congo",
    "Congo (Kinshasa)": "Democratic Republic of the Congo",
    "occupied Palestinian territory": "Palestine"
}

just FYI

South Korea seems to be duplicated

Hello there,

Thanks for sharing this API, very useful.
It shows as South Korea and then one more time as South, Korea. Both have the same data on confirmed, recovered, deaths.

You rock, appreciate it!
Alex G.

Last 24 hours?

Is it possible to get just the new confirmed cases in the last 24 hours in each country?

It will help in tracking which country is successfully flattening the spread of the virus and controlling it.

Global summary daily

Hi, Would it be possible to add a global summary to the daily single date endpoint as well? Thanks.

Country

Is there a way from the API that lets us get Data about one Country?
I want to deploy the API but let it just show Data about my Country atm!

Open Source Helps!

Thanks for your work to help the people in need! Your site has been added! I currently maintain the Open-Source-COVID-19 page, which collects all open source projects related to COVID-19, including maps, data, news, api, analysis, medical and supply information, etc. Please share to anyone who might need the information in the list, or will possibly contribute to some of those projects. You are also welcome to recommend more projects.

http://open-source-covid-19.weileizeng.com/

Cheers!

Python/Flask App Using COVID-19-API

virustracker

Python Flask application that displays virus information in a customizable format

Description

Web application written in Python using Flask which provides a single root page to display current World and customizable country COVID-19 information. This application reads from a configuration file which can be used to customize the following:

https://github.com/DykemaBill

virustracker_screenshot

/api/daily/3-23-2020 empty

It appears yesterday's /daily/ endpoint is completely empty for whatever reason. Previous /daily/ endpoints are currently working fine, but there seems to be no data for 3-23-2020.

Work needed

I'm a backend Node.js developer and I would like to contribute. Is there any work I can do that wouldn't overlap with what is already being done?

Changes to the API broke lastUpdate for /api/confirmed

It is working as expected at this commit. 95e6e5d

[
{
"provinceState": "Hubei",
"countryRegion": "China",
"lastUpdate": null,
"lat": 30.9756,
"long": 112.2707,
"confirmed": 67800,
"deaths": 3153,
"recovered": 59882,
"active": 4765,
"fips": null,
"incidentRate": null,
"peopleTested": null,
"iso2": "CN",
"iso3": "CHN"
},

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.