Open
Description
Function
summarize_deployments(
package,
group_by = c("deploymentID", "locationID", "locationName") # Select 1 or many (not 0)
group_time_by = c(
"year",
"year-jan", # Same as "year"
"year-feb", # Start year at yyyy-02-01
...
"year-dec" # Start year at yyyy-12-01
"month",
"month-15", # Start month at yyyy-mm-15
"week",
"day"
) # Select 0 or 1 (replaces current group_by arg)
)
Alternatively, group_by
and group_time_by
are combined, but then value checking becomes harder (and it's maybe more confusing to user). Or group_time_by
is renamed to chunk_by
, time_by
and subgroup_by
.
Alternative to year-jan
, etc. would be to have a separate parameter group_time_start_day
:
- For year: 1 = 1st of January, 15 = 15th of January
- For month: 1 = 1st of month, 15 = 15th of month
- For week: ignored
- For day: ignored
Output
Output is a df with following cols:
- groups:
- group_by names (e.g.
locationID
) - group_time_by name (e.g.
month
)
- group_by names (e.g.
- measures:
deployment_duration
:effort_duration
returned byget_custom_effort()
Note: dropseffort
andunit
columns, which can be calculated from the duration.
In contrast with the deprecated functions, NA
groups should be listed too (cf. dplyr::group_by()
), so:
locationName | month | deployment_duration |
---|---|---|
Bij de grote boom | 2025-03-01 | 3100 |
Bij de grote boom | 2025-04-01 | 2500 |
NA | 2025-03-01 | 7000 |
NA | 2025-04-01 | 5600 |
Deprecates
unit
argumentstart
argument: covered by filterend
argument: covered by filter- get_effort()
- get_custom_effort()
Metadata
Metadata
Assignees
Labels
No labels