Normalize Time Scales
normalize_time_scales.Rd
Choose a single best `time_scale` for each year in a dataset, grouped by nesting disease. This best `time_scale` is defined as the longest of the shortest time scales in each location and sub-disease.
Arguments
- data
A tidy data set with columns `time_scale`, `period_start_date` and `period_end_date`.
- initial_group
Character vector naming columns for defining the initial grouping used to compute the shortest time scales.
- final_group
Character vector naming columns for defining the final grouping used to compute the longest of the shortest time scales.
- get_implied_zeros
Add zeros that are implied by a '0' reported at a coarser timescale.
If a location is not reporting for the determined 'best timescale', but is reporting at a finer timescale, aggregate this finer timescale to the 'best timescale'.