Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Display Make Data Count use and citation metrics #5253
When displaying metrics, we need to take into account:
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.
Assorted UI changes include:
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:
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:
@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
You should see tooltips like the ones below while the server is in Make Data Count mode:
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.
@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:
@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 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:
The above is also consistent with the "big number formatting" we have at the installation level:
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.
Whoops, I'm mis-remembering how these McDonalds signs worked, I think. I just found this:
@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
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.
I just made pull request #6040