Uniquedownloads API inconsistent with file downloads count on dataverse
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
What steps does it take to reproduce the issue?
There is a dataset: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/DJVMTV that has 22 files and shows through dataverse 1,044 downloads, but when I ran the uniquedownloads API call, it returned 6 unique downloads.
-
When does this issue occur?
With all datasets
-
Which page(s) does it occurs on?
Download count listed on each dataset page and the return value of:
With 'Make Data Count' it showed this dataset was downloaded over 23 times, which is more consistent with the file download count. -
What happens?
counts don't make sense.
-
To whom does it occur (all users, curators, superusers)?
all users
-
What did you expect to happen?
I would expect if there have been 1000 file downloads on a dataset that has 22 files, that the total number of times the entire dataset would have been downloaded would be ~45 times. Even if we assume that some of these users downloaded this dataset more than 1 time, I think it is highly unlikely that 6 unique users each downloaded this dataset over 166 times.
Which version of Dataverse are you using?
6.6
Any related open or closed issues to this bug report?
No
Some discussion in Slack:
API call to get unique download counts:
For one of those datasets, the dataset page shows 1,044 downloads, while the API call for unique downloads returns 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the unique-downloads API result and the dataset-page count for the linked dataset on Dataverse 6.6. Trace the API's unique-download calculation and the dataset page's file-download aggregation, then compare their counting rules across datasets. Done means the API result is consistent with the documented download-count behavior and the regression is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- analytics, api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100