Skip to content

Usage chart reports views and downloads as occurring one month before the month indicated by work metadata #225

@codycooperross

Description

@codycooperross

Describe the bug

Usage charts in Commons are reporting view and download counts for the month before they've occurred. For example, this chart here reports 8 downloads for December 2019 when the metadata indicates that the downloads occurred in January 2020.

Chart
Screen Shot 2022-06-13 at 3 11 22 PM

Metadata
{ "yearMonth": "2019-12", "total": 1, "__typename": "YearMonthTotal" }, { "yearMonth": "2020-01", "total": 8, "__typename": "YearMonthTotal" }

Expected Behaviour

Download and view counts should be reflected in usage charts for the months they occur.

Current Behaviour

Download and view counts are reflected in usage charts for the month before they occur.

Steps to Reproduce

See https://commons.datacite.org/doi.org/10.5061/dryad.8085 and https://commons.datacite.org/doi.org/10.34848/FK2_leshmania_ds

Proposal

Hypothesis

Investigate date conversions in UsageChart component as well as how VegaLite interprets date data. https://github.com/datacite/akita/blob/cba787766810b8ccb81364b64aa2d1097c6d0045/src/components/UsageChart/UsageChart.tsx

Front logo Front conversations

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions