covid19italy

Italy covid19 data

https://github.com/ramikrispin/covid19italy

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords from Contributors

interactive serializer packaging network-simulation hacking autograding observability embedded optim standardization
Last synced: 11 months ago · JSON representation

Repository

Italy covid19 data

Basic Info
Statistics
  • Stars: 46
  • Watchers: 4
  • Forks: 22
  • Open Issues: 2
  • Releases: 3
Created over 6 years ago · Last pushed over 3 years ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
library(covid19italy)

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
) 
```
# covid19italy 

 
[![build](https://github.com/RamiKrispin/covid19italy/workflows/build/badge.svg?branch=master)](https://github.com/RamiKrispin/covid19italy/actions?query=workflow%3Abuild)
[![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/covid19italy)](https://cran.r-project.org/package=covid19italy)
[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![GitHub commit](https://img.shields.io/github/last-commit/RamiKrispin/covid19italy)](https://github.com/covid19r/covid19Italy/commit/master) 
![Data refresh](https://github.com/RamiKrispin/covid19Italy/workflows/Data%20Refresh/badge.png) 

 

The covid19italy R package provides a tidy format dataset of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) pandemic outbreak in Italy. The package includes the following three datasets:

- `italy_total` - daily summary of the outbreak on the national level
- `italy_region` - daily summary of the outbreak on the region level
- `italy_province` - daily summary of the outbreak on the province level 

More information about the package datasets available [here](https://covid19r.github.io/covid19italy/articles/intro.html), and supporting dashboard available [here](https://ramikrispin.github.io/italy_dash/).

Data source: [Italy Department of Civil Protection](https://www.protezionecivile.it/)


[](https://covid19r.github.io/covid19italy/articles/geospatial_visualization.html)



## Installation

You can install the released version of covid19italy from [CRAN](https://cran.r-project.org/package=covid19italy) with:

``` r
install.packages("covid19italy")
```

Or, install the most recent version from [GitHub](https://github.com/Covid19R/covid19italy) with:

``` r
# install.packages("devtools")
devtools::install_github("RamiKrispin/covid19Italy")
```

## Data refresh

While the **covid19italy** [CRAN version](https://cran.r-project.org/package=covid19italy) is updated every month or two, the [Github (Dev) version](https://github.com/RamiKrispin/covid19italy) is updated on a daily bases. The `update_data` function enables to overcome this gap and keep the installed version with the most recent data available on the Github version:

``` r
library(covid19italy)

update_data()
```

**Note:** must restart the R session to have the updates available


## Usage


```{r}
data(italy_total)

head(italy_total)
```


### Plotting the active cases distribution


``` r
library(plotly)

plot_ly(data = italy_total,
        x = ~ date,
        y = ~home_confinement, 
        name = 'Home Confinement', 
        fillcolor = '#FDBBBC',
        type = 'scatter',
        mode = 'none', 
        stackgroup = 'one') %>%
  add_trace( y = ~ hospitalized_with_symptoms, 
             name = "Hospitalized with Symptoms",
             fillcolor = '#E41317') %>%
  add_trace(y = ~intensive_care, 
                name = 'Intensive Care', 
                fillcolor = '#9E0003') %>%
  layout(title = "Italy - Distribution of Active Covid19 Cases",
         legend = list(x = 0.8, y = 0.9),
         yaxis = list(title = "Number of Cases"),
         xaxis = list(title = "Source: Italy Department of Civil Protection"))
  


```

```{r include=FALSE}
library(plotly)

p <- plot_ly(data = italy_total,
        x = ~ date,
        y = ~home_confinement, 
        name = 'Home Confinement', 
        fillcolor = '#FDBBBC',
        type = 'scatter',
        mode = 'none', 
        stackgroup = 'one') %>%
  add_trace( y = ~ hospitalized_with_symptoms, 
             name = "Hospitalized with Symptoms",
             fillcolor = '#E41317') %>%
  add_trace(y = ~intensive_care, 
                name = 'Intensive Care', 
                fillcolor = '#9E0003') %>%
  layout(title = "Italy - Distribution of Active Covid19 Cases",
         legend = list(x = 0.8, y = 0.9),
         yaxis = list(title = "Number of Cases"),
         xaxis = list(title = "Source: Italy Department of Civil Protection"))


orca(p, "man/figures/positive_dist.svg")
```




### Plotting the daily cases distribution 
```r
plot_ly(data = italy_total,
        x = ~ date,
        y = ~ cumulative_positive_cases, 
        name = 'Active', 
        fillcolor = '#1f77b4',
        type = 'scatter',
        mode = 'none', 
        stackgroup = 'one') %>%
  add_trace( y = ~ death, 
             name = "Death",
             fillcolor = '#E41317') %>%
  add_trace(y = ~recovered, 
            name = 'Recovered', 
            fillcolor = 'forestgreen') %>%
  layout(title = "Italy - Distribution of Covid19 Cases",
         legend = list(x = 0.1, y = 0.9),
         yaxis = list(title = "Number of Cases"),
         xaxis = list(title = "Source: Italy Department of Civil Protection"))


```


```{r include=FALSE}
p <- plot_ly(data = italy_total,
        x = ~ date,
        y = ~ cumulative_positive_cases, 
        name = 'Active', 
        fillcolor = '#1f77b4',
        type = 'scatter',
        mode = 'none', 
        stackgroup = 'one') %>%
  add_trace( y = ~ death, 
             name = "Death",
             fillcolor = '#E41317') %>%
  add_trace(y = ~recovered, 
            name = 'Recovered', 
            fillcolor = 'forestgreen') %>%
  layout(title = "Italy - Distribution of Covid19 Cases",
         legend = list(x = 0.1, y = 0.9),
         yaxis = list(title = "Number of Cases"),
         xaxis = list(title = "Source: Italy Department of Civil Protection"))

orca(p, "man/figures/case_dist.svg")
```




### Cases distribution by region

``` r
italy_region %>% 
  filter(date == max(date)) %>% 
  select(region_name, cumulative_positive_cases, recovered, death, cumulative_cases) %>%
  arrange(-cumulative_cases) %>%
  mutate(region = factor(region_name, levels = region_name)) %>%
  plot_ly(y = ~ region, 
          x = ~ cumulative_positive_cases, 
          orientation = 'h',
          text =  ~ cumulative_positive_cases,
          textposition = 'auto',
          type = "bar", 
          name = "Active",
          marker = list(color = "#1f77b4")) %>%
  add_trace(x = ~ recovered,
            text =  ~ recovered,
            textposition = 'auto',
            name = "Recovered",
            marker = list(color = "forestgreen")) %>%
  add_trace(x = ~ death, 
            text =  ~ death,
            textposition = 'auto',
            name = "Death",
            marker = list(color = "red")) %>%
  layout(title = "Cases Distribution by Region",
         barmode = 'stack',
         yaxis = list(title = "Region"),
         xaxis = list(title = "Number of Cases"),
         hovermode = "compare",
         legend = list(x = 0.65, y = 0.9),
         margin =  list(
           l = 20,
           r = 10,
           b = 10,
           t = 30,
           pad = 2
         )) 

```


``` {r include=FALSE}
library(dplyr)

p <- italy_region %>% 
  filter(date == max(date)) %>% 
  select(region_name, cumulative_positive_cases, recovered, death, cumulative_cases) %>%
  arrange(-cumulative_cases) %>%
  mutate(region = factor(region_name, levels = region_name)) %>%
  plot_ly(y = ~ region, 
          x = ~ cumulative_positive_cases, 
          orientation = 'h',
          text =  ~ cumulative_positive_cases,
          textposition = 'auto',
          type = "bar", 
          name = "Active",
          marker = list(color = "#1f77b4")) %>%
  add_trace(x = ~ recovered,
            text =  ~ recovered,
            textposition = 'auto',
            name = "Recovered",
            marker = list(color = "forestgreen")) %>%
  add_trace(x = ~ death, 
            text =  ~ death,
            textposition = 'auto',
            name = "Death",
            marker = list(color = "red")) %>%
  layout(title = "Cases Distribution by Region",
         barmode = 'stack',
         yaxis = list(title = "Region"),
         xaxis = list(title = "Number of Cases"),
         hovermode = "compare",
         legend = list(x = 0.65, y = 0.9),
         margin =  list(
           l = 20,
           r = 10,
           b = 10,
           t = 30,
           pad = 2
         )) 

orca(p, "man/figures/region_bar_plot.svg")
```


### Cases distribution by province for Lombardia region

```r
italy_province %>% 
  filter(date == max(date), region_name == "Lombardia") %>%
  plot_ly(labels = ~province_name, values = ~total_cases, 
                  textinfo="label+percent",
                  type = 'pie') %>%
  layout(title = "Lombardia - Cases Distribution by Province") %>% 
  hide_legend()
```

``` {r include=FALSE}
library(dplyr)
p <- italy_province %>% 
  filter(date == max(date), region_name == "Lombardia") %>%
  plot_ly(labels = ~province_name, values = ~total_cases, 
                  textinfo="label+percent",
                  type = 'pie') %>%
  layout(title = "Lombardia - Cases Distribution by Province") %>% 
  hide_legend()

orca(p, "man/figures/province_pie.svg")
```



## Supporting Dashboard

A supporting dashboard for the **covid19italy** datasets available [here](https://ramikrispin.github.io/italy_dash/).


Owner

  • Name: Rami Krispin
  • Login: RamiKrispin
  • Kind: user
  • Location: Cupertino, California, US

Data science and engineering manager | Author, open-source contributor 👨🏻‍💻 | Time-series analysis and forecasting ❤️ | Opinions are my own 😎

GitHub Events

Total
Last Year

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 2,445
  • Total Committers: 2
  • Avg Commits per committer: 1,222.5
  • Development Distribution Score (DDS): 0.003
Past Year
  • Commits: 210
  • Committers: 1
  • Avg Commits per committer: 210.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
RamiKrispin r****p@u****u 2,438
dependabot[bot] 4****] 7
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 7
  • Total pull requests: 9
  • Average time to close issues: 5 days
  • Average time to close pull requests: 7 days
  • Total issue authors: 6
  • Total pull request authors: 2
  • Average comments per issue: 0.57
  • Average comments per pull request: 0.33
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 8
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Steno71 (2)
  • ryarca (1)
  • psyguy (1)
  • pasmer (1)
  • gexijin (1)
  • Neverstop7 (1)
Pull Request Authors
  • dependabot[bot] (8)
  • RamiKrispin (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (8)

Packages

  • Total packages: 1
  • Total downloads:
    • cran 230 last-month
  • Total docker downloads: 21,613
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: covid19italy

The 2019 Novel Coronavirus COVID-19 (2019-nCoV) Italy Dataset

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 230 Last month
  • Docker Downloads: 21,613
Rankings
Forks count: 3.4%
Stargazers count: 7.2%
Average: 25.3%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Downloads: 50.6%
Maintainers (1)
Last synced: 12 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.0.2 depends
  • devtools * imports
  • knitr >= 1.28 suggests
  • readr >= 1.3.1 suggests
  • remotes >= 2.1.1 suggests
  • rmarkdown >= 2.1 suggests
  • testthat >= 2.1.0 suggests
docs/articles/dashboard_files/leaflet-providers-1.1.17/package.json npm
  • chai ^4.1.2 development
  • eslint ^3.16.1 development
  • eslint-plugin-html ^2.0.1 development
  • mocha ^3.2.0 development
  • mocha-phantomjs-core ^2.1.1 development
  • mversion ^1.10.1 development
  • phantomjs-prebuilt ^2.1.16 development
  • uglify-js ^2.4.15 development
docs/articles/geospatial_visualization_files/leaflet-providers-1.1.17/package.json npm
  • chai ^4.1.2 development
  • eslint ^3.16.1 development
  • eslint-plugin-html ^2.0.1 development
  • mocha ^3.2.0 development
  • mocha-phantomjs-core ^2.1.1 development
  • mversion ^1.10.1 development
  • phantomjs-prebuilt ^2.1.16 development
  • uglify-js ^2.4.15 development
.github/workflows/data_refresh_docker.yml actions
  • actions/checkout v2 composite
.github/workflows/main.yml actions
  • actions/checkout v2 composite
docker/dev/Dockerfile docker
  • docker.io/rkrispin/baser_dev v4.1.0 build
docker/packages/Dockerfile docker
  • docker.io/rkrispin/baser_dev v4.1.0 build
docker/prod/Dockerfile docker
  • docker.io/rkrispin/baser_prod v4.1.0 build
docker/rstudio/Dockerfile docker
  • rkrispin/covid19italy dev build