Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cranlogs::cran_downloads() double counting 2023-09-19 through 2023-10-01 #68

Closed
lindbrook opened this issue Oct 4, 2023 · 1 comment

Comments

@lindbrook
Copy link
Contributor

It seems that for the period between 2023-09-19 through 2023-10-01 cranlogs::cran_downloads() reports twice the number of package downloads than do the Posit/RStudio logs. Is it possible to recompute/fix these data?

dates <- seq.Date(as.Date("2023-09-15"), as.Date("2023-10-03"), by = "days")

Total Download Counts based on Posit/RStudio Logs:
logs <- lapply(dates, packageRank::fetchCranLog)
posit <- vapply(logs, nrow, integer(1L))

Total Download Counts based on cranlogs::cran_downloads():
rhub <- cranlogs::cran_downloads(from = min(dates), to = max(dates))

Audit:
audit <- data.frame(date = rhub$date, log.ct = posit, cranlogs.ct = rhub$count)
audit$ratio <- audit$cranlogs.ct / audit$log.ct

> audit
date log.ct cranlogs.ct ratio
1 2023-09-15 6479353 6479353 1
2 2023-09-16 3516904 3516904 1
3 2023-09-17 3534662 3534662 1
4 2023-09-18 7309822 7309822 1
5 2023-09-19 7608886 15217772 2
6 2023-09-20 7488178 14976356 2
7 2023-09-21 6862071 13724142 2
8 2023-09-22 6410593 12821186 2
9 2023-09-23 4011634 8023268 2
10 2023-09-24 3548594 7097188 2
11 2023-09-25 6845864 13691728 2
12 2023-09-26 7204419 14408838 2
13 2023-09-27 7188019 14376038 2
14 2023-09-28 6526022 13052044 2
15 2023-09-29 5653322 11306644 2
16 2023-09-30 3165387 6330774 2
17 2023-10-01 3277506 6555012 2
18 2023-10-02 6268556 6268556 1
19 2023-10-03 6732379 6732379 1

@lindbrook lindbrook changed the title cranlogs::cran_downloads() double counting "2023-09-19" through "2023-10-01" cranlogs::cran_downloads() double counting 2023-09-19 through 2023-10-01 Oct 9, 2023
@gaborcsardi
Copy link
Contributor

Thanks for spotting this, it should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants