#' Zeige prozentuelle Zunahmen pro Bundesland seit 21.03.2020
#'
#' Zeige prozentuelle Veränderungen seit der Datenaufnahme von coronaDAT
#' für jedes Bundesland.
#' @examples
#' plot_verlauf_relative()
#' @export
plot_verlauf_relative <- function() {
ts <- data_corona_ts()$ts_bundesland
ts %>%
dplyr::group_by(bundesland) %>%
dplyr::arrange(date) %>%
dplyr::mutate(freq = freq/freq[1] - 1) %>%
ggplot(aes(date, freq, color = bundesland)) +
geom_line() +
theme_minimal() +
scale_y_continuous(breaks = 1:15/10, labels = paste0(1:15*10, "%")) +
ylab(paste("Zunahme seit", min(ts$date)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.