augment_cycle_data: Calculates variables necessary for WATS Plots

augment_cycle_dataR Documentation

Calculates variables necessary for WATS Plots

Description

Calculates variables necessary for WATS Plots. This the first of two functions that needs to be called to produce WATS Plots. annotate_data() is the second.

Usage

augment_year_data_with_month_resolution(ds_linear, date_name)
augment_year_data_with_second_resolution(ds_linear, date_name)

Arguments

ds_linear

The data.frame to containing the detailed data.

date_name

The variable name in ds_linear containing the date or datetime value.

Value

Returns a tibble::tibble with additional variables: cycle_tally, proportion_through_cycle, proportion_id, and terminal_point_in_cycle.

Examples

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")

head(ds_linear)


OuhscBbmc/Wats documentation built on April 22, 2024, 10:32 p.m.