The covidBR
R package, written by Ariana Moura
Cabral and Adriano de Oliveira
Andrade, was built to extract
data from the Brazilian COVID-19 Portal
and exported as CSV
files.
You can install the development version of covidBR
from
GitHub with:
# install.packages("devtools")
devtools::install_github("arianacabral/covidBR")
To load covidBR
package, use:
library(covidBR)
The original data comes from the Brazilian COVID-19 Portal (Portal do COVID-19), and can be found at https://covid.saude.gov.br. Daily, the Ministry of Health (Ministério da Saúde) updates and publicly disseminates the database, and, consequently, the download URL is updated.
download_url <- covidBR::cbr_download_url()
download_url
#> [1] "https://mobileapps.saude.gov.br/esus-vepi/files/unAFkcaNDeXajurGB7LChj8SgQYS2ptm/1b386b80cf23162edda1a942b9832380_HIST_PAINEL_COVIDBR_07nov2022.rar"
Download the file from an existing download URL of COVID-19 Portal.
covidBR::cbr_download(url_file = download_url)
The file of COVID-19 Portal can be
compressed inside a .zip
.
covidBR::cbr_unzip(zip_file = file.choose())
covidBR::cbr_data()
You can acess covidBR
database with:
covidBR::covidBR
DESCRIPTION
The covidBR
database contains 17 variables.
Variable | Description |
---|---|
regiao | Regions of Brazil |
estado | Federative units (UF) of Brazil |
municipio | Municipalities of Brazil |
coduf | UF code |
codmun | Brazilian municipality code |
cod_regiao_saude | Health region code |
nome_regiao_saude | Health region name |
data | Notification date |
semana_epi | Epidemiological week |
populacao_tcu2019 | Population estimates sent to the TCU (2019) |
casos_acumulado | Total number of confirmed cases of COVID-19 that were registered by the Municipal and State Health Departments in the period considered |
casos_novos | Number of new confirmed cases of COVID-19 that were registered by the Municipal and State Health Departments in relation to the previous day |
obitos_acumulado | Total number of deaths from COVID-19 that were registered by the Municipal and State Health Departments in the period considered |
obitos_novos | Number of new deaths confirmed from COVID-19 that were registered by the Municipal and State Health Departments in relation to the previous day |
recuperadosnovos | Number of new COVID-19 recoveries that were registered by the Municipal and State Health Departments in relation to the previous day |
em_acompanhamento_novos | Number of new COVID-19 hospitalizations that were registered by the Municipal and State Health Departments in relation to the previous day |
interior_metropolitana | Label for inland or metropolitan region |