get_vaccination_data: Time series of German COVID-19 vaccination data

Description Usage Arguments Value See Also Examples

View source: R/vaccines.R

Description

get_vaccination_data() is used to create a tibble of vaccination data for regions and a certain age group. The time period can be defined by the user.

Usage

1
2
3
4
5
6
7
8
get_vaccination_data(
  ages = "all",
  regions = "Germany",
  from = "2020-12-26",
  to = Sys.Date(),
  vac_num = "all",
  cumulate = F
)

Arguments

ages

A string of the desired age group. Data is available for the groups "12-17","18-59" and "60+". The default value is "all", so that the data is not specified for a special age group.

regions

A vector that either consists of strings (the names of German districts or the names of German states) or district ID's. Warning: states and districts must not be mixed, so e.g. get_vaccination_data(regions=c("Sachsen","Heidelberg")) is not allowed. The default region is the whole country "Germany".

from

A date that specifies the beginning of the time series.

to

A date that specifies the end of the time series. The default value is today.

vac_num

Either 1 or 2 or "all". Indicates whether the first or second vaccine should be considered.

cumulate

A boolean that indicates whether the time series values should be absolute or cumulative.

Value

A tibble that contains the public vaccine data prepared in a user-specified way.

See Also

Other vaccination: plot_vaccination_data()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get_vaccination_data(ages="60+",regions=c("Heidelberg","Sachsen"),from="2021-06-07",vac_num=1,cumulate=T)

get_vaccination_data(ages="all",regions=c("Schleswig-Holstein","Niedersachsen"),to="2021-07-08")

## Not run: get_vaccination_data(regions=c("Germany","Heidelberg"))
#don't mix districts, states or "Germany

## Not run: get_vaccination_data(ages=12-17)
#age group must always be a string

## Not run: get_vaccination_data(from="2021-06-07",to="2021-05-06")
#'from' needs to be earlier than 'to'

slausmeister/revolution documentation built on Dec. 23, 2021, 3:24 a.m.