Page MenuHomePhabricator

[Dashboard][Search] Sparklines for KPIs
Closed, ResolvedPublic4 Story Points

Description

We currently have the KPI summary module:

and the monthly metrics table module:

The idea is to add sparklines so in addition to the numbers, we have a quick glimpse at long-term trend(s) with the option of seeing the full detailed time series on those KPIs respective modules. There is an R package that adds sparklines htmlwidget that we can try adding into the table (here's an example of how I've added HTML+JS to make links in the monthly metrics table) and underneath the value boxes.

For the KPI Summary Page, we are going to put sparklines under the four infobox. When user selecting "All available data", we will show the sparklines for all available data; for all other options, we will show the sparklines for the last 90 days.

For the Monthly Metrics Page, we will show sparklines of monthly medians.

P.S. Here's an example of adding sparklines to a DT table in a Shiny app.

Event Timeline

mpopov created this task.Nov 7 2016, 9:46 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 7 2016, 9:46 PM
debt triaged this task as Low priority.Nov 8 2016, 9:17 PM
debt added a subscriber: debt.

Great idea! :)

debt moved this task from Needs triage to Up Next on the Discovery-Analysis board.Nov 8 2016, 9:17 PM
mpopov added a comment.EditedNov 16 2016, 9:29 PM

Technically unrelated to this task but I just want to note here that I added sparklines to Discovery's KPI table on Wikimedia Product page on MediaWiki:

The R code can be found at: https://meta.wikimedia.org/wiki/Discovery/Analytics#Monthly_Metrics

debt awarded a token.Nov 17 2016, 2:37 PM
chelsyx claimed this task.Dec 8 2016, 9:31 PM
chelsyx moved this task from Backlog to In progress on the Discovery-Analysis (Current work) board.

Notes from meeting:

  • When "KPI data range" == "All available data", the value boxes are currently "N/A" (by design) but would be better if it showed the sparklines of the whole time series
  • For other ranges, the boxes should have 90 days of data as sparklines at the bottom of the respective KPIs
  • On the monthly metrics table tab, the sparkline should be the monthly medians.
chelsyx updated the task description. (Show Details)Dec 15 2016, 9:25 PM

Change 327877 had a related patch set uploaded (by Chelsyx):
Add sparklines for KPIs: - KPI Summary Page - Monthly Metrics Page

https://gerrit.wikimedia.org/r/327877

Change 327877 merged by Bearloga:
Add sparklines for KPIs: - KPI Summary Page - Monthly Metrics Page

https://gerrit.wikimedia.org/r/327877

Change 328593 had a related patch set uploaded (by Chelsyx):
Highlight sparklines according to date range selection on KPI summary page

https://gerrit.wikimedia.org/r/328593

Change 328593 merged by Bearloga:
Highlight sparklines according to date range selection on KPI summary page

https://gerrit.wikimedia.org/r/328593

Change 330452 had a related patch set uploaded (by Bearloga):
Deploy sparklines on Metrics dashboard

https://gerrit.wikimedia.org/r/330452

Change 330452 merged by Bearloga:
Deploy sparklines on Metrics dashboard

https://gerrit.wikimedia.org/r/330452

mpopov added a comment.Jan 4 2017, 7:56 PM

Deployed! :D Good job, @chelsyx!~

Deskana added a subscriber: Deskana.Jan 4 2017, 9:13 PM

This is really neat. Nice work!

debt closed this task as Resolved.Jan 4 2017, 9:14 PM