system.time({
library(Wats)
ds_linear <-
Wats::county_month_birth_rate_2005_version |>
dplyr::filter(county_name == "oklahoma") |>
augment_year_data_with_month_resolution(date_name = "date")
h_spread <- \(scores) { quantile(x = scores, probs = c(.25, .75)) }
portfolio <- annotate_data(
ds_linear = ds_linear,
dv_name = "birth_rate",
center_function = median,
spread_function = h_spread
)
portfolio$ds_stage_cycle
portfolio$ds_linear
portfolio$ds_periodic
})
Run the code above in your browser using DataLab