#' Get RTN revenue data by year
#' @param year vector indicating the year or reference. NULL for all years
#' @return tibble with all.
#' @examples
#' get_revenue_data(year = 2021)
#' @export
get_revenue_data <- function(year= NULL){
df_trabalho<- get_full_data()
df_trabalho <-
df_trabalho %>%
dplyr::filter(tipo == "R")
if (!is.null(year)){
df_trabalho<-
df_trabalho %>%
dplyr::filter(lubridate::year(Data) %in% year)
}
df_trabalho
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.