Skip to contents

GitHub gives the 14 days up to the last day it has counted for each repository, which for some is a day earlier than for the rest: the first day of the first collection then has the traffic of those few only, and the last day of a collection can lack theirs. A day at either end with the traffic of at most half as many repositories as the day next to it is left out, rather than drawn as a quiet day.

Usage

traffic_range(rows)

Arguments

rows

The rows of the traffic, a data frame with repo and date.

Value

The first and the last day, dates.

Examples

rows <- data.frame(repo = c("rwf", "snp", "rwf", "snp", "snp"),
                   date = c("2026-12-01", "2026-12-01", "2026-12-02", "2026-12-02",
                            "2026-12-03"))
# 3 December has the traffic of one repository of two, and is left out
rghcard:::traffic_range(rows)
#> [1] "2026-12-01" "2026-12-02"