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

Generate usage stats #154

Closed
stephaniesimms opened this issue Mar 3, 2017 · 14 comments
Closed

Generate usage stats #154

stephaniesimms opened this issue Mar 3, 2017 · 14 comments
Assignees
Labels

Comments

@stephaniesimms
Copy link

stephaniesimms commented Mar 3, 2017

Adapt the prototype DMPTool dashboard

  • carry this over to new platform as a replacement for DMPTool API queries to get usage stats
  • evaluate DMPonline/Roadmap API queries for reuse in usage dashboard
  • provide ability to export CSVs
  • add visualizations that show: 1) time, 2) how org stats compare to global stats

Org admins want to know the following (per @sjDCC comments on Edinburgh reports):

  • new users per month
  • total users for their org
  • total DMPs per month
  • DMPs per template per month

Example of what this could look like in Roadmap - for discussion. Note that 'Date Range' field should be constrained to monthly, annual, and/or total reports. Under 'Institution' (change to Org) a user can select to display their own Org usage or "All Orgs."
screen shot 2018-01-22 at 4 47 34 pm

Screenshot of DMPTool Usage dashboard
screen shot 2017-03-03 at 12 45 44 pm

@sjDCC
Copy link
Contributor

sjDCC commented Nov 22, 2017

Details on the API can be seen at: https://github.com/DMPRoadmap/roadmap/wiki/API-Documentation

You can:

  • Query the number of registered users within an optional date range
  • Query the number of plans using a template owned by your organisation
  • Retrieve number of plans organised by template
  • Retrieve metadata on all plans from an organisation’s users

For reference the stats we pull for Edinburgh each month cover:

  • new users per month
  • total users for the org
  • total number of DMPs per month**
  • DMPs per template per month**

** these last two are in a table with funders along one side and months across the other and running total for DMPs per funder and DMPs per month at ends

It would be good to set these stats into wider context as the DMPTool dashboard above does

@jollopre jollopre self-assigned this Jan 17, 2018
@briri
Copy link
Contributor

briri commented Jan 26, 2018

@stephaniesimms and @sjDCC is allowing a custom date range instead of predefined combobox options (e.g. last 7 days, annual, etc.) ok? After discussing in the dev meeting today we have determined that it would be easier to just let the user select their own range.

@stephaniesimms
Copy link
Author

that sounds great to me. admins have asked for this and will appreciate being able to tailor the reports using a specific date range. if it's possible to default to something like "last 30 days" that would be good and then allow them to customize from there.

@sjDCC
Copy link
Contributor

sjDCC commented Jan 28, 2018

Yes, agree. Much better to be able to let them generate reports to desired date range if that's not too much of a load on us.

@jollopre
Copy link
Contributor

jollopre commented Feb 7, 2018

See screenshot below for the first mockup working. As I described yesterday:

  • It will be displayed yearly stats sorted by month (starting always at last month from today) for each of the topics (joined users, num. completed plans, etc).
  • and after is provided a filter form to get numbers according to the data range specified, compared to totals till today (not sure how useful is that bit).

dashboard

Note that organisation select is only available for super admins and by default your organisation gets selected from the list.

Any feedback will be appreciated to perform any enhancement.

@stephaniesimms
Copy link
Author

stephaniesimms commented Feb 9, 2018

yay for data visualizations! my initial thought is that we need to add some text or tooltip with basic instructions, but that's easy enough. other suggestions:

  • move the filters and numbered boxes above the bar chart
  • if the numbered boxes are displaying filtered values (I can't test to confirm) then this order would make sense
  • move the "No. users joined during the last year" label to the left near the y-axis where the number of users appears

@marisastrong
Copy link
Member

Usage Dashboard requires an API Token. Should we put in text noting this?

jollopre pushed a commit to DigitalCurationCentre/roadmap that referenced this issue Feb 9, 2018
completed_plans action started. DMPRoadmap#154

usage#index action and server view completed. Started dynamic UI through JS.

added moment js library and ajaxified joined_users stats.

charts.js integration for users joined. DMPRoadmap#154
@briri
Copy link
Contributor

briri commented Feb 9, 2018

We have an error message that displays if the admin does not have an API token. It currently reads "You don't have access to use the API. An api token is needed to generate usage statistics.".

Since we don't have a super admin function yet that will create these I think we should just add an additional line to that message like: 'Contact the %{helpdesk_email} to request an API token for your organisation.'.

@stephaniesimms
Copy link
Author

stephaniesimms commented Feb 13, 2018

after some more tinkering I definitely think it would be better to have the filters at the top of the page since that's where most of the actions are happening. the graph looks great and i think it's fine to keep as a static feature or only change with the topic variable selection, but i keep expecting something to happen with the graph when I click Go and don't notice the numbers updating below it when testing on my laptop. I can only display Users data at the moment. the date range selection is awesome!

  • please add a download button for the full CSV reports, either at the top of the page as in the wireframe or to the right of the filters
  • the full usage report should contain users and plans per month per Org. we also wanted to include plans created per template per month. alternatively or in addition to global usage we might only want to provide downloadable usage data for a user's affiliated Org - not sure if you have a preference/requirement regarding this @sjDCC ?
  • also noting my original request to move the "No. users joined during the last year" label to the left near the y-axis where the number of users appears.
  • move the filters and numbered boxes above the bar chart

jollopre pushed a commit to DigitalCurationCentre/roadmap that referenced this issue Feb 13, 2018
Integrate pre-fetching plan and phase from 25e2669

after_save callback for answer model with tests. DMPRoadmap#154

rake task to update completed plans. DMPRoadmap#154

statistics#completed_plans action done. DMPRoadmap#154

HTML view for completed plans and tweaks to JS file associated. DMPRoadmap#154
@jollopre jollopre mentioned this issue Feb 13, 2018
@stephaniesimms
Copy link
Author

stephaniesimms commented Feb 15, 2018

looking good @jollopre - a few changes:
"completed plans" isn't meaningful at present since we haven't defined a plan status. please change the language about this as follows:

  • change "Completed plans" to just "Plans" in filter dropdown
  • change boxes below to "Plans" and "Total plans"
  • change axis label on lower graph to "No plans created during last year"
  • we should set a standard value range for the y-axis, I estimate a max of ca. 50-80 would be reasonable for users and plans per month for power user Orgs but that's just a guess based on DMPTool data
  • it would also be better not to display a graph at all when an Org has no data for either category (so hide the lower graph in the screenshot below because there are zero plans)
  • the overall size of the graphs could be smaller since these are just a quick snapshot of trends over the past year. the more an Org admin can see at a glance on a single screen (without scrolling) the more useful the viz.

screen shot 2018-02-14 at 9 49 29 pm

@jollopre jollopre mentioned this issue Feb 15, 2018
@jollopre
Copy link
Contributor

jollopre commented Feb 15, 2018

thanks for the comments @stephaniesimms. The amendments are part of #1167.

Latest screenshot below:
snapshot

@sjDCC
Copy link
Contributor

sjDCC commented Feb 15, 2018

In response to your comment @stephaniesimms

"in addition to global usage we might only want to provide downloadable usage data for a user's affiliated Org - not sure if you have a preference/requirement regarding this @sjDCC ?"

Org admins should just download their own data, but I guess for superadmins they could download data for all orgs if it's not too big a query or volume of data to represent. Otherwise reports according to org-affiliation should suffice for now. We can always add more functions post MVP.

jollopre pushed a commit to DigitalCurationCentre/roadmap that referenced this issue Feb 15, 2018
@stephaniesimms
Copy link
Author

@jollopre I like the smaller side-by-side graphs and other changes look good - this is great for now.

we just need to add some explanatory info about being able to view stats from any Org using the filters at the top, but the graphs and CSV download are only available for an admin's own Org. I'll suggest some text in a new issue. closing this one.

@Ebrahim1010
Copy link

Usage stats page not working....
Message received: 'You don't have access to use the API. An api token is needed to generate usage statistics'
See screenshot.
How do we resolve this issue?
Screen Shot 2019-10-31 at 08 35 19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants