Giter Club home page Giter Club logo

coronavirus's Introduction

coronavirus

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.

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

Installation

Currently, the package available only on Github version:

# 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                       Belgium 50.5039   4.4699 2020-01-21     0 confirmed
#> 2                      Cambodia 12.5657 104.9910 2020-01-21     0 confirmed
#> 3                       Finland 61.9241  25.7482 2020-01-21     0 confirmed
#> 4                        France 46.2276   2.2137 2020-01-21     0 confirmed
#> 5                       Germany 51.1657  10.4515 2020-01-21     0 confirmed
#> 6                         India 20.5937  78.9629 2020-01-21     0 confirmed
tail(coronavirus)
#>      Province.State Country.Region       Lat      Long       date cases      type
#> 5032          Tibet Mainland China  30.15340  88.78790 2020-02-12     1 recovered
#> 5033    Toronto, ON         Canada  43.65320 -79.38320 2020-02-12     0 recovered
#> 5034       Victoria      Australia -37.81360 144.96310 2020-02-12     0 recovered
#> 5035       Xinjiang Mainland China  41.11981  85.17822 2020-02-12     0 recovered
#> 5036         Yunnan Mainland China  24.97411 101.48680 2020-02-12     6 recovered
#> 5037       Zhejiang Mainland China  29.18251 120.09850 2020-02-12    42 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 [15]
#>    Country.Region type      total_cases
#>    <chr>          <chr>           <dbl>
#>  1 Mainland China confirmed       44687
#>  2 Mainland China recovered        5062
#>  3 Mainland China death            1115
#>  4 Others         confirmed         175
#>  5 Hong Kong      confirmed          50
#>  6 Singapore      confirmed          47
#>  7 Thailand       confirmed          33
#>  8 Japan          confirmed          28
#>  9 South Korea    confirmed          28
#> 10 Malaysia       confirmed          18
#> 11 Taiwan         confirmed          18
#> 12 Germany        confirmed          16
#> 13 Australia      confirmed          15
#> 14 Vietnam        confirmed          15
#> 15 US             confirmed          13
#> 16 France         confirmed          11
#> 17 Macau          confirmed          10
#> 18 Thailand       recovered          10
#> 19 Japan          recovered           9
#> 20 Singapore      recovered           9

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

 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.