Giter Site home page Giter Site logo

tutomasz / covid19-dataset Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 2.0 378.83 MB

Dataset for global corona virus statistics in JSON format + additional statistics, Source of data (Johns Hopkins CSSE)

JavaScript 100.00%
coronavirus coronavirus-tracking covid19-data corona-json coronavirus-api coronavirus-analysis covid-data covid-api covid-19-api datasets

covid19-dataset's Introduction

COVID-19 Dataset

Build

Update DataArchive Data

Description

This project converts csv format data from the 2019 Novel Coronavirus COVID-19 (2019-nCoV) Data Repository by Johns Hopkins CSSE to JSON data shown below with additional fields and statistics coming soon.

The data auto-updates at specified intervals to ensure its always up to date with the original source.

Data Format - JSON

Global Daily Data

{
  "2020-01-28": {
    "date": "2020-01-28",
    "total_infected": 5578,
    "total_recovered": 107,
    "total_deaths": 131,
    "new_cases": 2651,
    "new_deaths": 49,
    "deaths_per_hour": 2,
    "percent_infected": 0,
    "percent_recovered": 0,
    "percent_deaths": 0,
    "doubling_rate": 1.947,
    "mortality_rate": 2.349
  },
  ...
  },
  "2020-04-04": {
    "date": "2020-04-04",
    "total_infected": 1197405,
    "total_recovered": 246152,
    "total_deaths": 64606,
    "new_cases": 80159,
    "new_deaths": 5819,
    "deaths_per_hour": 242,
    "percent_infected": 0.015,
    "percent_recovered": 0.003,
    "percent_deaths": 0.001,
    "doubling_rate": 10.379,
    "mortality_rate": 5.396
  }
}

Statistics

  • date - day of interest
  • total_infected - number of infections globally
  • total_recoveries - number of recoveries globally
  • total_deaths - number of deaths globally
  • new_cases - number of cases since previous day
  • new_deaths - number of deaths since previous day
  • deaths_per_hour - number of deaths per hour
  • percent_infected - percent of people infected based on global population
  • percent_recovered - percent of people recovered based on global population
  • percent_deaths - percent of deaths based on global population
  • doubling_rate - doubling rate in days (5 day rolling period)
  • mortality_rate - current mortality rate of the country of interest

USA Daily Data

{
  "2020-03-29": {
    "california": {
      "date": "2020-03-29",
      "total_infected": 5852,
      "total_deaths": 124,
      "state_population": 39510000,
      "new_cases": 757,
      "new_deaths": 14,
      "deaths_per_hour": 1,
      "percent_infected": 0.015,
      "percent_deaths": 0,
      "doubling_rate": 5.182,
      "mortality_rate": 2.119
    },
    ...
    "new_york": {
      "date": "2020-03-29",
      "total_infected": 59648,
      "total_deaths": 1063,
      "state_population": 8399000,
      "new_cases": 7238,
      "new_deaths": 180,
      "deaths_per_hour": 8,
      "percent_infected": 0.71,
      "percent_deaths": 0.013,
      "doubling_rate": 5.254,
      "mortality_rate": 1.782
    },
  },
  ...
  "2020-04-16": {
    "california": {
      "date": "2020-04-16",
      "total_infected": 27677,
      "total_deaths": 956,
      "state_population": 39510000,
      "new_cases": 991,
      "new_deaths": 96,
      "deaths_per_hour": 4,
      "percent_infected": 0.07,
      "percent_deaths": 0.002,
      "doubling_rate": 17.859,
      "mortality_rate": 3.454
    },
    ...
    "new_york": {
      "date": "2020-04-16",
      "total_infected": 223691,
      "total_deaths": 14832,
      "state_population": 8399000,
      "new_cases": 9237,
      "new_deaths": 3215,
      "deaths_per_hour": 134,
      "percent_infected": 2.663,
      "percent_deaths": 0.177,
      "doubling_rate": 20.587,
      "mortality_rate": 6.631
    },
  }
}

Statistics

  • date - day of interest
  • total_infected - number of infections in a given state
  • total_deaths - number of deaths in a given state
  • state_population - state total population
  • new_cases - number of cases since previous day in a given state
  • new_deaths - number of deaths since previous day in a given state
  • deaths_per_hour - number of deaths per hour
  • percent_infected - percent of people infected based on State population
  • percent_deaths - percent of deaths based on State population
  • doubling_rate - virus doubling rate in days (5 day rolling period)
  • mortality_rate - current mortality rate of the state of interest

Url's

replace below for desired dataset in the next section

Usage Example

This is example using Javascript to fetch global data.

fetch("http://tiny.cc/Covid-19-global")
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  });

This is example using Javascript to fetch "New York" data from USA data.

fetch("http://tiny.cc/Covid-19-usa")
  .then((response) => response.json())
  .then((data) => {
    Object.entries(data).forEach(([date, states]) => {
      console.log(states["new_york"]);
    });
  });

This is example using Python to fetch data

import json
import urllib3

http = urllib3.PoolManager()
response = http.request('GET', "http://tiny.cc/Covid-19-global")
data = json.loads(response.data)

print(data)

Add your project below if you find this dataset helpfull( Add Here)


covid19-dataset's People

Contributors

actions-user avatar kant avatar tutomasz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

kant ahurless

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.