library(tidyverse)
library(lubridate)
#https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/
opm_holiday <- read_csv("data-raw/opm-holidays.csv")
month.list <- month.name %>%
paste(collapse = "|") %>%
paste0("(", ., ")")
opm_holiday <- opm_holiday %>%
rename_all(tolower) %>%
mutate(month = date %>%
str_extract(month.list) %>%
match(month.name),
day = str_extract(date, "[:digit:]{2}"),
date_holiday_obs = make_date(year, month, day),
holiday = str_replace(holiday, "\x92", "'")) %>%
select(date_holiday_obs, holiday)
usethis::use_data(opm_holiday)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.