enrich_special_days: Enrich traffic data with french vacation and public holidays

View source: R/data_enrich.R

enrich_special_daysR Documentation

Enrich traffic data with french vacation and public holidays

Description

Enrich traffic data with french vacation and public holidays

Usage

enrich_special_days(data, vacations = NULL, public_holidays = NULL)

Arguments

data

Data frame containing a day and a date(day + hour + timezone) column

vacations

Data frame containing the vacation dates

public_holidays

Data frame containing the public holidays dates

Value

Same dataframe with two additionnal columns :

  • holiday, boolean: TRUE if the day corresponds to public holiday, FALSE otherwise

  • vacation, indicating the french vacation, "No vacation" otherwise.

Examples

df <- data.frame('day' = as.Date(c("2022-02-18","2022-01-01")),
  'date' = c('2022-02-18 12:00:00 CET','2022-01-01 12:00:00 CET'))
enrich_special_days(df)


telraamStats documentation built on May 29, 2024, 10:08 a.m.