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

coronavirusbrazil

lifecycle License: MIT GitHub commit

The coronavirusbrazil package provides a tidy format dataset of the 2019 Novel Coronavirus COVID-19 (2019-nCoV) epidemic for Brazil. The datasets were obtained from RamiKrispin/coronavirus, Ministerio da Saúde, brasil.io and Secretaria de Saúde - RJ.

This repository was inspired by the RamiKrispin/coronavirus package repository.

Installation

You can install the released version of coronavirusbrazil from CRAN with:

# install.packages("devtools")
devtools::install_github("mralbu/coronavirusbrazil")

Usage

The package contains the following datasets:

library(coronavirusbrazil)
library(ggplot2)


data("coronavirus_br")
head(coronavirus_br) 
plot_coronavirus(coronavirus_br, xaxis = "date", yaxis = "cases", log_scale = F, linear_smooth = F)
data("coronavirus_br_states")
head(coronavirus_br_states) 
plot_coronavirus(coronavirus_br_states, yaxis = "percent_case_increase", color = "state", filter_variable = "state", facet = "state", filter_values = c("RJ", "SP", "DF", "CE", "RS", "MG"), log_scale = TRUE, linear_smooth = TRUE)
data("coronavirus_br_cities")
head(coronavirus_br_cities) 

There are also geospatial datasets avaiable:

dplyr::glimpse(spatial_br_states)
ggplot2::ggplot(spatial_br_states, ggplot2::aes(color=cases, size=cases)) + ggplot2::geom_sf()
dplyr::glimpse(spatial_br_cities)
ggplot2::ggplot(spatial_br_cities, ggplot2::aes(color=cases, size=cases)) + ggplot2::geom_sf()

Data Sources



mralbu/coronavirusbrazil documentation built on March 25, 2021, 11:40 a.m.