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

Display Make Data Count use and citation metrics #5253

Closed
djbrooke opened this issue Oct 31, 2018 · 17 comments · Fixed by #6040
Closed

Display Make Data Count use and citation metrics #5253

djbrooke opened this issue Oct 31, 2018 · 17 comments · Fixed by #6040
Assignees
Milestone

Comments

@djbrooke
Copy link
Contributor

After the backend for Make Data Count support is implemented in #4821, we'll need to display the metrics on the appropriate pages.

@djbrooke
Copy link
Contributor Author

djbrooke commented May 6, 2019

When displaying metrics, we need to take into account:

  • Some installations have handles, we should display what we can for these, but we may not be able to display all the metrics
  • Some installations will have DOIs through Datacite but won't have file-level DOIs enabled so we may not be able to display all the metrics

@TaniaSchlatter
Copy link
Member

Design doc with research, questions, mockups

@mheppler mheppler self-assigned this Jun 11, 2019
mheppler added a commit that referenced this issue Jun 12, 2019
@djbrooke djbrooke moved this from UI/UX Design 💡📝 to Ready 🙋 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jun 25, 2019
mheppler added a commit that referenced this issue Jun 25, 2019
@djbrooke djbrooke moved this from Ready 🙋 to IQSS Sprint 6/26 - 7/10 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jun 26, 2019
@djbrooke djbrooke moved this from IQSS Sprint 6/26 - 7/10 to IQSS Team Dev 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jun 26, 2019
mheppler added a commit that referenced this issue Jun 27, 2019
…to make room, added placeholder static content for dynamic MDC metrics [ref #5253]
@mheppler
Copy link
Contributor

Front-end for the file and dataset pgs have been revamped based on recent 5.0 mockups, in order to make some room for expanded metrics from Make Data Count.

New branch 5253-metrics-block-ui is ready to be wired up. Static placeholder content has been added to the Metrics block, ready to be connected to the back-end.

Assorted UI changes include:

  • Container div's for the top section of both pgs has been refactored to improve the use of the Bootstrap grid layout, and for the two pgs to look more consistent (further work can be done here to create a template both pgs use to keep the code and layout consistent)
  • Metrics block has been moved to a column on the right of the citation blocks
  • Publication status and version labels have been moved to their own line/block under the title, as opposed to inline at the end of the dataset title/file name
  • Cite Dataset/Data File buttons have been moved under the citations, as opposed to a column on the right side of the citation block
  • On the dataset pg, the panel component around the dataset summary section has been removed to get rid of the border around that section
  • On the file pg, the two citation blocks have been swapped in order, so the file citation is displayed first, then the dataset citation
  • (...file pg) the file preview/thumbnail/icon has been moved to the Metadata tab, and given a File Preview label
  • (...file pg) the duplicate file metadata under the citation blocks has been removed, and the tags (which were not duplicated) have been moved to the Metadata tab, and given a File Tags label, and retaining the render logic to hide the block if there are no tags

Screen Shot 2019-06-27 at 1 03 53 PM

Screen Shot 2019-06-27 at 1 04 53 PM

@mheppler mheppler removed their assignment Jun 27, 2019
@djbrooke djbrooke moved this from IQSS Team Dev 💻 to IQSS Sprint 6/26 - 7/10 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jun 28, 2019
@djbrooke
Copy link
Contributor Author

  • The change to move the preview under file metadata is a temporary change while we implement the file page redesign.

@pdurbin
Copy link
Member

pdurbin commented Jul 12, 2019

I started wiring up the Make Data Count back end to the front end.

First, to make it easier to work on the front end, I documented how to run an integration test to put some data in your database: 3760d31

Then I wired up downloads and views on the dataset page: bc5d512

While I was in there I noticed that the mockup above had downloads twice like this:

Screen Shot 2019-07-12 at 4 43 26 PM

I changed the second "Downloads" to "Views" and added a CSS class called "metrics-views-mdc" but I couldn't find where the classes for downloads and citations are defined.

I also notice that there's some help text that could probably be added by someone who wants to swarm on this issue. Right now the popup has placeholder text and I'm not sure why "Downloads" doesn't have a link or a question mark. Here's how it looks after my changes:

Screen Shot 2019-07-13 at 8 53 37 AM

@pdurbin
Copy link
Member

pdurbin commented Jul 18, 2019

@TaniaSchlatter I just re-wrote the tooltips as promised and deployed the code to the same test server we've been using. The server is currently configured for Make Data Count so you sound see something like the screenshot below if you go to http://ec2-3-86-35-164.compute-1.amazonaws.com/dataset.xhtml?persistentId=doi:10.5072/FK2/GB9MJQ&version=1.0

Screen Shot 2019-07-18 at 4 04 48 PM

You should see tooltips like the ones below while the server is in Make Data Count mode:

metrics.dataset.title=Dataset Metrics
metrics.dataset.tip.makedatacount=Metrics collected using Make Data Count standards.
metrics.dataset.views.tip=Dataset views are combined with aggregated file views.
metrics.dataset.downloads.makedatacount.tip=Each file download (single or multiple files) increments the download count.
metrics.dataset.citations.tip=Click for a list of citation URLs.
metrics.citations.dialog.header=Dataset Citations
metrics.citations.dialog.help=Citations for this dataset are retrieved from Crossref via DataCite a using Make Data Count standards.

metrics.file.title=File Metrics
metrics.file.tip.makedatacount=Individual file downloads are tracked but this is not part of the Make Data Count standard.
metrics.file.downloads.tip=Total downloads of this file.

To give you a preview of the tooltips you should expect to see when I reconfigure this server for "default" or "out of the box" mode (not Make Data Count), this is what you'll see.

metrics.dataset.tip.default=Aggregated metrics for this dataset.
metrics.dataset.downloads.default.tip=Total aggregated downloads of files in this dataset.
metrics.file.tip.default=Metrics for this individual file.

@mheppler if you're able to pull the latest and demo some of this on your laptop, this might be easier since I'm working remotely the rest of the week.

I also wired the citations pop up to the database so that the list is no longer hard coded.

Next I guess I'll look into the tasks I mentioned previously:

  • instead of 0, 1, 2, 3, or 4 views, downloads, or citations show <5
  • use K and M for thousand and million, respectively

@TaniaSchlatter I'm not sure if you saw the note in my last comment about how I think people will be quite happy with 4 citations so I'm not sure if the "<5" is needed for citations.

I should also mention that I haven't yet figured out the backend problem I mentioned at standup yesterday about how I wasn't able to produce the JSON file of views and downloads based on logs created by Dataverse. @sekmiller and I talked about it but he didn't work on this part of the code. I'm not sure if it's not working or if the docs weren't easy enough for me to follow to install, configure, and run Counter Processor. If anyone wants to swarm on this task, IQSS/dataverse.harvard.edu#3 is highly related.

@mheppler
Copy link
Contributor

If we're voting on the metrics number formatting, I would say that it is unnecessary. It isn't saving very much space, and I can see all the support emails now... my dataset page says, "1.1M Downloads", where are my 99,999 other downloads?

@pdurbin
Copy link
Member

pdurbin commented Jul 18, 2019

@mheppler well, it would be an easy way to cut scope by not implementing the metrics formatting suggested above. (And I don't know how to do it. I've been Googling a bit just now.) You're right that space isn't much of a concern. Here's a fake "views" metric with over a billion:

Screen Shot 2019-07-18 at 4 38 53 PM

The above is also consistent with the "big number formatting" we have at the installation level:

Screen Shot 2019-07-18 at 4 41 47 PM

I dunno. If OmniFaces or JSF made this super easy to do (maybe @scolapasta knows how?) I would probably just throw it in there but maybe we should consider deferring this. I'm curious what @djbrooke thinks.

The other thing I'm thinking about is how when I was a kid I was a little sad when a McDonalds would switch over from "999,862 served" one week to "millions and millions served" the next. 😄 I guess I like the precision (which you can still get from the Dataverse API, by the way, regardless of what we do in the UI).

Whoops, I'm mis-remembering how these McDonalds signs worked, I think. I just found this:

mcdonalds-1

@djbrooke
Copy link
Contributor Author

I believe using K and M was for internationalization purposes because it gives us extra space for those languages that have long words for "Downloads" and "Views"

@pdurbin
Copy link
Member

pdurbin commented Jul 18, 2019

@djbrooke right, right. Ok, I'll keep Googling. /me sings "Don't Wanna Be An American Idiot"

Oh, the other thing on my todo list is to switch from stuff like jsf:rendered="#{not empty settingsServiceBean.get(':MDCLogPath')}" which makes a lot of database calls to our settingsWrapper. I'll probably do that next.

If there are any JSF experts in the house that can advise on the K and M and <5, you know where to find me.

@mheppler
Copy link
Contributor

Note: need to fix the CSS for the old metrics block that is still on the dataverse pg.

Screen Shot 2019-07-19 at 9 37 01 AM

@pdurbin
Copy link
Member

pdurbin commented Jul 19, 2019

I just made pull request #6040

In Slack @djbrooke @TaniaSchlatter @mheppler and I decided to defer the work on

  • internationalization of large numbers. Mike linked us to https://meta.discourse.org/t/is-there-a-way-to-translate-numbers-e-g-1-3k-in-the-views-column/30374 and now I'm somewhat haunted by "No one of the 120 registered users in our forum is aware of the “K”." If Discourse hasn't figured this out yet I'm not sure we have a good solution. We'll just show 1,234,567,890 and let people translate "Views" or whatever into a word that fits in the UI.
  • "<5" for small numbers. We'll think about this some more.

@pdurbin pdurbin removed their assignment Jul 19, 2019
pdurbin added a commit that referenced this issue Jul 22, 2019
mheppler added a commit that referenced this issue Jul 22, 2019
pdurbin added a commit that referenced this issue Jul 22, 2019
mheppler added a commit that referenced this issue Jul 24, 2019
@pdurbin pdurbin added this to the 4.16 milestone Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants