Daily values are centered on midday on a day-by-day basis. Note that this does not shift the time series properly as hours are wrapped around on a given day. This function should not be used stand-alone, and is primarily used to screen data for noise / poor quality.
stk_center(df, floor = 1.5, replace = FALSE)a day-by-day centered skytrackr compatible data frame
cc876 |> stk_center()
#> # A tibble: 8,640 × 8
#> # Groups: logger, date [30]
#> logger date_time date hour measurement value offset
#> <chr> <dttm> <date> <dbl> <chr> <dbl> <dbl>
#> 1 CC876 2021-08-02 00:04:10 2021-08-02 0.0694 lux 0.08 24.0
#> 2 CC876 2021-08-02 00:09:10 2021-08-02 0.153 lux 0.08 24.0
#> 3 CC876 2021-08-02 00:14:10 2021-08-02 0.236 lux 0.08 24.0
#> 4 CC876 2021-08-02 00:19:10 2021-08-02 0.319 lux 0.08 24.0
#> 5 CC876 2021-08-02 00:24:10 2021-08-02 0.403 lux 0.08 24.0
#> 6 CC876 2021-08-02 00:29:10 2021-08-02 0.486 lux 0.08 24.0
#> 7 CC876 2021-08-02 00:34:10 2021-08-02 0.569 lux 0.08 24.0
#> 8 CC876 2021-08-02 00:39:10 2021-08-02 0.653 lux 0.08 24.0
#> 9 CC876 2021-08-02 00:44:10 2021-08-02 0.736 lux 0.08 24.0
#> 10 CC876 2021-08-02 00:49:10 2021-08-02 0.819 lux 0.08 24.0
#> # ℹ 8,630 more rows
#> # ℹ 1 more variable: hour_centered <dbl>