plotRisk_cases: Plot Infected x Risk of Infection

Description Usage Arguments Details Value References

View source: R/plotRisk_cases.R

Description

Build various plots combining the number of infected by COVID-19 in a city of a state in Brazil and the risk of infection estimated by Peixoto et. al. (2020).

Usage

1
2
3
4
5
6
7
8
plotRisk_cases(
  states = "all",
  day = "today",
  day.init = NULL,
  day.final = NULL,
  cities = "populated",
  pos_name = "pop"
)

Arguments

states

A vector with the states to build plots for. It should contain the two letters representing the name of the states. To plot all available states enter "all", which is default.

day

The date which to plot data from. The default is today. Must be represented as YYYY-MM-DD.

day.init

To build a sequence of plots to an interval of days. Should represent the initial day of the range. This surpasses the day argument.

day.final

The final day of the range.

cities

Which cities to plot information for. It should either be "populated" for cities with the greatest populations or a named list with the city names. The names must be the two letters representing the states. The city names must be written as they are in the risk dataset.

pos_name

A string to put at the end of the saved plots. If you want to run with distinct cities for a same day, use this string to not overwrite the plots.

Details

This function download data from <https://brasil.io/dataset/covid19/caso? about the number of confirmed infected individuals, and confirmed deaths, by COVID-19 in each city of Brazil and build plots comparing these quantities with the risk of infection of each city estimated by Peixoto et. al. (2020). It may consider data for a given day or a range of days during the pandemic.

Value

A list with all the generated plots, which were also saved on pdf files in high resolution

References

Peixoto, et. al. Modeling future spread of infections via mobile geolocation data and population dynamics. An application to COVID-19 in Brazil. 2020. Available at <https://www.ime.usp.br/~pedrosp/covid-19/>.


dmarcondes/mdyn documentation built on April 3, 2021, 4:50 a.m.