The number of Wynton users over time
users_over_time(file = NULL, since = "2017-01-01")A tibble::tibble with columns date and total,
total the cumulative sum based on date occurances.
library(dplyr)
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
pathname <- system.file("exdata", "ldap_wynton_dates.txt", package = "wyntonquery")
signups <- users_over_time(pathname)
print(head(signups))
#> # A tibble: 6 × 2
#> date total
#> <date> <int>
#> 1 2017-02-21 12
#> 2 2017-04-25 13
#> 3 2017-05-23 14
#> 4 2017-07-04 15
#> 5 2017-08-10 16
#> 6 2017-08-11 17
print(tail(signups))
#> # A tibble: 6 × 2
#> date total
#> <date> <int>
#> 1 2025-12-05 1321
#> 2 2025-12-05 1322
#> 3 2025-12-11 1323
#> 4 2025-12-11 1324
#> 5 2025-12-11 1325
#> 6 2025-12-13 1326
## Summarize by year and month
signups <- mutate(signups, year = format(date, "%Y"))
## Signups per calendar year
signups <- mutate(signups, month = format(date, "%m"))
signups <- group_by(signups, year)
signups_per_year <- count(signups, name = "change")
signups_end_of_year <- filter(signups, date == max(date), total == max(total))
signups_per_year <- left_join(signups_per_year, signups_end_of_year)
#> Joining with `by = join_by(year)`
signups_per_year <- select(signups_per_year, year, change, total, per = date)
print(signups_per_year, n = Inf)
#> # A tibble: 9 × 4
#> # Groups: year [9]
#> year change total per
#> <chr> <int> <int> <date>
#> 1 2017 15 26 2017-12-12
#> 2 2018 20 46 2018-11-30
#> 3 2019 77 123 2019-12-11
#> 4 2020 87 210 2020-12-22
#> 5 2021 108 318 2021-12-18
#> 6 2022 135 453 2022-12-21
#> 7 2023 171 624 2023-12-22
#> 8 2024 252 876 2024-12-28
#> 9 2025 450 1326 2025-12-13
## Signups per calendar month
signups <- group_by(signups, year, month)
signups_per_month <- count(signups, name = "change")
signups_end_of_month <- filter(signups, date == max(date), total == max(total))
signups_per_month <- left_join(signups_per_month, signups_end_of_month)
#> Joining with `by = join_by(year, month)`
signups_per_month <- select(signups_per_month, year, month, change, total, per = date)
print(signups_per_month, n = Inf)
#> # A tibble: 102 × 5
#> # Groups: year, month [102]
#> year month change total per
#> <chr> <chr> <int> <int> <date>
#> 1 2017 02 1 12 2017-02-21
#> 2 2017 04 1 13 2017-04-25
#> 3 2017 05 1 14 2017-05-23
#> 4 2017 07 1 15 2017-07-04
#> 5 2017 08 2 17 2017-08-11
#> 6 2017 09 1 18 2017-09-20
#> 7 2017 10 1 19 2017-10-23
#> 8 2017 11 5 24 2017-11-21
#> 9 2017 12 2 26 2017-12-12
#> 10 2018 01 2 28 2018-01-26
#> 11 2018 02 4 32 2018-02-26
#> 12 2018 03 2 34 2018-03-29
#> 13 2018 05 2 36 2018-05-14
#> 14 2018 07 1 37 2018-07-18
#> 15 2018 08 3 40 2018-08-24
#> 16 2018 09 3 43 2018-09-07
#> 17 2018 10 1 44 2018-10-12
#> 18 2018 11 2 46 2018-11-30
#> 19 2019 01 1 47 2019-01-17
#> 20 2019 02 11 58 2019-02-21
#> 21 2019 03 14 72 2019-03-22
#> 22 2019 04 9 81 2019-04-30
#> 23 2019 05 7 88 2019-05-28
#> 24 2019 06 5 93 2019-06-30
#> 25 2019 07 5 98 2019-07-29
#> 26 2019 08 3 101 2019-08-26
#> 27 2019 09 11 112 2019-09-27
#> 28 2019 10 4 116 2019-10-31
#> 29 2019 11 5 121 2019-11-26
#> 30 2019 12 2 123 2019-12-11
#> 31 2020 01 6 129 2020-01-29
#> 32 2020 02 6 135 2020-02-29
#> 33 2020 03 8 143 2020-03-25
#> 34 2020 04 6 149 2020-04-20
#> 35 2020 05 10 159 2020-05-29
#> 36 2020 06 2 161 2020-06-19
#> 37 2020 07 10 171 2020-07-29
#> 38 2020 08 13 184 2020-08-31
#> 39 2020 09 9 193 2020-09-21
#> 40 2020 10 6 199 2020-10-30
#> 41 2020 11 8 207 2020-11-19
#> 42 2020 12 3 210 2020-12-22
#> 43 2021 01 10 220 2021-01-28
#> 44 2021 02 7 227 2021-02-26
#> 45 2021 03 8 235 2021-03-25
#> 46 2021 04 5 240 2021-04-27
#> 47 2021 05 7 247 2021-05-17
#> 48 2021 06 9 256 2021-06-30
#> 49 2021 07 6 262 2021-07-27
#> 50 2021 08 11 273 2021-08-30
#> 51 2021 09 14 287 2021-09-30
#> 52 2021 10 12 299 2021-10-27
#> 53 2021 11 8 307 2021-11-25
#> 54 2021 12 11 318 2021-12-18
#> 55 2022 01 11 329 2022-01-30
#> 56 2022 02 10 339 2022-02-26
#> 57 2022 03 15 354 2022-03-31
#> 58 2022 04 8 362 2022-04-27
#> 59 2022 05 9 371 2022-05-27
#> 60 2022 06 9 380 2022-06-25
#> 61 2022 07 8 388 2022-07-27
#> 62 2022 08 9 397 2022-08-31
#> 63 2022 09 24 421 2022-09-24
#> 64 2022 10 15 436 2022-10-26
#> 65 2022 11 13 449 2022-11-29
#> 66 2022 12 4 453 2022-12-21
#> 67 2023 01 14 467 2023-01-31
#> 68 2023 02 9 476 2023-02-24
#> 69 2023 03 11 487 2023-03-24
#> 70 2023 04 13 500 2023-04-26
#> 71 2023 05 8 508 2023-05-10
#> 72 2023 06 13 521 2023-06-30
#> 73 2023 07 14 535 2023-07-29
#> 74 2023 08 17 552 2023-08-29
#> 75 2023 09 34 586 2023-09-30
#> 76 2023 10 12 598 2023-10-24
#> 77 2023 11 18 616 2023-11-29
#> 78 2023 12 8 624 2023-12-22
#> 79 2024 01 22 646 2024-01-31
#> 80 2024 02 23 669 2024-02-29
#> 81 2024 03 11 680 2024-03-27
#> 82 2024 04 23 703 2024-04-24
#> 83 2024 05 13 716 2024-05-31
#> 84 2024 06 16 732 2024-06-28
#> 85 2024 07 23 755 2024-07-31
#> 86 2024 08 16 771 2024-08-31
#> 87 2024 09 41 812 2024-09-28
#> 88 2024 10 24 836 2024-10-31
#> 89 2024 11 14 850 2024-11-28
#> 90 2024 12 26 876 2024-12-28
#> 91 2025 01 40 916 2025-01-31
#> 92 2025 02 41 957 2025-02-28
#> 93 2025 03 35 992 2025-03-25
#> 94 2025 04 46 1038 2025-04-30
#> 95 2025 05 20 1058 2025-05-28
#> 96 2025 06 26 1084 2025-06-30
#> 97 2025 07 56 1140 2025-07-30
#> 98 2025 08 43 1183 2025-08-29
#> 99 2025 09 50 1233 2025-09-30
#> 100 2025 10 51 1284 2025-10-30
#> 101 2025 11 31 1315 2025-11-27
#> 102 2025 12 11 1326 2025-12-13
if (require("ggplot2", quietly = TRUE)) {
gg <- ggplot(signups, aes(date, total)) + geom_line(linewidth = 2.0)
gg <- gg + xlab("") + ylab("Number of users")
gg <- gg + theme(text = element_text(size = 20))
print(gg)
}