README.md

R tools to get updated information about COVID19 situation in Brazil

covidBR - R API

Access and manage updated COVID19 data from Brazil with R.

Features:

covidBR updates the COVID-19 records from covid.saude, an official website maintained by the Ministry of Health in Brazil.

There is an interactive website in development at my personal website danieltiezzi

Install covidBr

The released version is available on Github

library(devtools)
install_github("dtiezzi/COVIDBR")

Load the dataset

There is a dedicated function to load a clean and ready to use data.

covid <- load.covidBr()

If you need to load the IBGE codes and state / county population, there is a ibge.RData file you can access:

data(ibge)

Visualize the data from a specific location based on IBGE code

There are two functions to display the number of new cases and deaths.

myid <- ibge.id(ibge, 'SP') # get the id from São Paulo State
mychart0 <- view.covid.newcases(covid, myid)
mychart1 <- view.covid.deaths(covid, myid)

You can save your charts as an image

Save your charts in PNG or PDG+F formats.

png('Covid_new_cases_SP.png', width = 12, height = 8, unit = 'in', res = 300)
mychart0
dev.off()

You generate interactive maps

Create interactive maps with Plotly on backgound.

covid <- load.covidBr()
mymap <- view.cases.map(covid, perhab = TRUE)

This is a developing tool to help people to access reliable data from Brazil. We are working with publicly available sequencing data to keep tracking the Sars-Cov-2 mutation profile.

If you would like to help, please email me: dtiezzi@usp.br



dtiezzi/COVIDBR documentation built on Feb. 17, 2021, 9:46 a.m.