Git Product home page Git Product logo

coronavirus's Introduction

coronavirus

build CRAN_Status_Badge lifecycle License: MIT

The coronavirus package provides a tidy format dataset of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) epidemic. The raw data pulled from the Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) Coronavirus repository.

More details available here, and a csv format of the package dataset available here

Source: Centers for Disease Control and Prevention’s Public Health Image Library

Installation

Install the CRAN version:

install.packages("coronavirus")

Install the Github version (refreshed on a daily bases):

# install.packages("devtools")
devtools::install_github("RamiKrispin/coronavirus")

Usage

The package contains a single dataset - coronavirus:

library(coronavirus)

data("coronavirus")

This coronavirus dataset has the following fields:

head(coronavirus)
#>   Province.State Country.Region      Lat     Long       date cases      type
#> 1                         Japan 35.67620 139.6503 2020-01-22     2 confirmed
#> 2                   South Korea 37.56650 126.9780 2020-01-22     1 confirmed
#> 3                      Thailand 13.75630 100.5018 2020-01-22     2 confirmed
#> 4          Anhui Mainland China 31.82571 117.2264 2020-01-22     1 confirmed
#> 5        Beijing Mainland China 40.18238 116.4142 2020-01-22    14 confirmed
#> 6      Chongqing Mainland China 30.05718 107.8740 2020-01-22     6 confirmed
tail(coronavirus) 
#>      Province.State Country.Region      Lat      Long       date cases      type
#> 1954         Shanxi Mainland China 37.57769 112.29220 2020-02-23     7 recovered
#> 1955        Sichuan Mainland China 30.61714 102.71030 2020-02-23    11 recovered
#> 1956        Tianjin Mainland China 39.29362 117.33300 2020-02-23    16 recovered
#> 1957       Xinjiang Mainland China 41.11981  85.17822 2020-02-23     3 recovered
#> 1958         Yunnan Mainland China 24.97411 101.48680 2020-02-23     8 recovered
#> 1959       Zhejiang Mainland China 29.18251 120.09850 2020-02-23    41 recovered

Here is an example of a summary total cases by region and type (top 20):

library(dplyr)

summary_df <- coronavirus %>% group_by(Country.Region, type) %>%
  summarise(total_cases = sum(cases)) %>%
  arrange(-total_cases)

summary_df %>% head(20) 
#> # A tibble: 20 x 3
#> # Groups:   Country.Region [14]
#>    Country.Region type      total_cases
#>    <chr>          <chr>           <int>
#>  1 Mainland China confirmed       76938
#>  2 Mainland China recovered       23170
#>  3 Mainland China death            2443
#>  4 Others         confirmed         691
#>  5 South Korea    confirmed         602
#>  6 Italy          confirmed         155
#>  7 Japan          confirmed         147
#>  8 Singapore      confirmed          89
#>  9 Hong Kong      confirmed          74
#> 10 Singapore      recovered          51
#> 11 Iran           confirmed          43
#> 12 Thailand       confirmed          35
#> 13 US             confirmed          35
#> 14 Taiwan         confirmed          28
#> 15 Australia      confirmed          22
#> 16 Japan          recovered          22
#> 17 Malaysia       confirmed          22
#> 18 Thailand       recovered          21
#> 19 South Korea    recovered          18
#> 20 Germany        confirmed          16

Data Sources

The raw data pulled and arranged by the Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE) from the following resources:


coronavirus's People

Contributors

ramikrispin avatar

Watchers

James Cloos avatar

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.