cranlogs icon indicating copy to clipboard operation
cranlogs copied to clipboard

aggregate counts by package over a period

Open adfi opened this issue 4 years ago • 2 comments

We can get aggregate counts for all packages over a period and counts by date for specific packages. That is great but can we also get aggregate counts by package over a period? I know it's a simple aggregation we can do as well but it would save downloading a million records.

Something like:

cran_downloads(package = 'cranlogs', from='2020-01-01', to='2020-03-14', aggregate=TRUE)

This probably would require a change in the API for it to be an actual saving. Let me know what you think.

adfi avatar Jul 16 '20 11:07 adfi

I think there is an API for this, actually: https://github.com/r-hub/cranlogs.app#total-downloads-over-a-period-downloadstotalperiodpackage1package2

Would you like to send a PR?

gaborcsardi avatar Jul 16 '20 13:07 gaborcsardi

Sure, I can have a look.

adfi avatar Jul 16 '20 17:07 adfi