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 14
#> 2 2017-04-25 15
#> 3 2017-05-23 16
#> 4 2017-07-04 17
#> 5 2017-08-10 18
#> 6 2017-08-11 19
print(tail(signups))
#> # A tibble: 6 × 2
#> date total
#> <date> <int>
#> 1 2025-07-03 1417
#> 2 2025-07-03 1418
#> 3 2025-07-04 1419
#> 4 2025-07-08 1420
#> 5 2025-07-09 1421
#> 6 2025-07-09 1422
## 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 19 32 2017-12-05
#> 2 2018 27 59 2018-11-30
#> 3 2019 99 158 2019-12-18
#> 4 2020 111 269 2020-12-22
#> 5 2021 130 399 2021-12-18
#> 6 2022 175 574 2022-12-21
#> 7 2023 207 781 2023-12-27
#> 8 2024 378 1159 2024-12-28
#> 9 2025 263 1422 2025-07-09
## 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: 98 × 5
#> # Groups: year, month [98]
#> year month change total per
#> <chr> <chr> <int> <int> <date>
#> 1 2017 02 1 14 2017-02-21
#> 2 2017 04 1 15 2017-04-25
#> 3 2017 05 1 16 2017-05-23
#> 4 2017 07 1 17 2017-07-04
#> 5 2017 08 2 19 2017-08-11
#> 6 2017 09 2 21 2017-09-22
#> 7 2017 10 4 25 2017-10-27
#> 8 2017 11 6 31 2017-11-21
#> 9 2017 12 1 32 2017-12-05
#> 10 2018 01 1 33 2018-01-16
#> 11 2018 02 6 39 2018-02-26
#> 12 2018 03 2 41 2018-03-29
#> 13 2018 05 2 43 2018-05-14
#> 14 2018 06 1 44 2018-06-12
#> 15 2018 07 3 47 2018-07-20
#> 16 2018 08 5 52 2018-08-30
#> 17 2018 09 3 55 2018-09-07
#> 18 2018 10 2 57 2018-10-12
#> 19 2018 11 2 59 2018-11-30
#> 20 2019 01 1 60 2019-01-17
#> 21 2019 02 11 71 2019-02-21
#> 22 2019 03 16 87 2019-03-22
#> 23 2019 04 12 99 2019-04-30
#> 24 2019 05 7 106 2019-05-20
#> 25 2019 06 6 112 2019-06-30
#> 26 2019 07 7 119 2019-07-29
#> 27 2019 08 6 125 2019-08-31
#> 28 2019 09 17 142 2019-09-28
#> 29 2019 10 6 148 2019-10-31
#> 30 2019 11 4 152 2019-11-26
#> 31 2019 12 6 158 2019-12-18
#> 32 2020 01 6 164 2020-01-29
#> 33 2020 02 7 171 2020-02-29
#> 34 2020 03 8 179 2020-03-25
#> 35 2020 04 7 186 2020-04-30
#> 36 2020 05 11 197 2020-05-29
#> 37 2020 06 3 200 2020-06-19
#> 38 2020 07 11 211 2020-07-29
#> 39 2020 08 17 228 2020-08-31
#> 40 2020 09 14 242 2020-09-22
#> 41 2020 10 11 253 2020-10-30
#> 42 2020 11 11 264 2020-11-19
#> 43 2020 12 5 269 2020-12-22
#> 44 2021 01 12 281 2021-01-28
#> 45 2021 02 10 291 2021-02-26
#> 46 2021 03 10 301 2021-03-25
#> 47 2021 04 9 310 2021-04-27
#> 48 2021 05 7 317 2021-05-21
#> 49 2021 06 7 324 2021-06-30
#> 50 2021 07 5 329 2021-07-27
#> 51 2021 08 13 342 2021-08-30
#> 52 2021 09 21 363 2021-09-30
#> 53 2021 10 16 379 2021-10-27
#> 54 2021 11 11 390 2021-11-20
#> 55 2021 12 9 399 2021-12-18
#> 56 2022 01 14 413 2022-01-30
#> 57 2022 02 11 424 2022-02-26
#> 58 2022 03 20 444 2022-03-31
#> 59 2022 04 10 454 2022-04-22
#> 60 2022 05 10 464 2022-05-27
#> 61 2022 06 12 476 2022-06-29
#> 62 2022 07 12 488 2022-07-27
#> 63 2022 08 17 505 2022-08-31
#> 64 2022 09 33 538 2022-09-24
#> 65 2022 10 17 555 2022-10-26
#> 66 2022 11 14 569 2022-11-29
#> 67 2022 12 5 574 2022-12-21
#> 68 2023 01 15 589 2023-01-31
#> 69 2023 02 10 599 2023-02-28
#> 70 2023 03 10 609 2023-03-24
#> 71 2023 04 14 623 2023-04-28
#> 72 2023 05 11 634 2023-05-10
#> 73 2023 06 15 649 2023-06-30
#> 74 2023 07 20 669 2023-07-29
#> 75 2023 08 23 692 2023-08-26
#> 76 2023 09 42 734 2023-09-30
#> 77 2023 10 17 751 2023-10-24
#> 78 2023 11 21 772 2023-11-29
#> 79 2023 12 9 781 2023-12-27
#> 80 2024 01 26 807 2024-01-31
#> 81 2024 02 23 830 2024-02-29
#> 82 2024 03 14 844 2024-03-27
#> 83 2024 04 22 866 2024-04-23
#> 84 2024 05 16 882 2024-05-31
#> 85 2024 06 26 908 2024-06-28
#> 86 2024 07 39 947 2024-07-31
#> 87 2024 08 32 979 2024-08-31
#> 88 2024 09 69 1048 2024-09-28
#> 89 2024 10 42 1090 2024-10-31
#> 90 2024 11 30 1120 2024-11-28
#> 91 2024 12 39 1159 2024-12-28
#> 92 2025 01 47 1206 2025-01-31
#> 93 2025 02 48 1254 2025-02-28
#> 94 2025 03 42 1296 2025-03-25
#> 95 2025 04 54 1350 2025-04-30
#> 96 2025 05 27 1377 2025-05-28
#> 97 2025 06 34 1411 2025-06-30
#> 98 2025 07 11 1422 2025-07-09
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)
}