Access and manage updated COVID19 data from Brazil with R.
Features:
- Access data according to specific location (states and cities).
- Plot the incidence and recorded deaths.
- Generate interactive maps with Plotly.
- Use the data to do your personal analyses:
- State / county IBGE code (id);
- Estimated poulation in each state / county (population);
- Cumulative number of cases (sumcases) and deaths (sumdeaths);
- Number of new cases (newcases) and deaths (newdeaths);
- 7-days average number of cases (newav) and deaths (deathav).
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
The released version is available on Github
library(devtools)
install_github("dtiezzi/COVIDBR")
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)
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)
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()
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