Analytics/Wikimetrics/Stories

-- DONE --
These stories have been implemented and are live on https://metrics.wmflabs.org/

-- HIGHEST PRIORITY -
Stories below are up next to implement. Scheduled stories will be added to the latest sprint at http://sb.wmflabs.org/t/analytics-developers/.

User creates cohort with CentralAuth insertions

 * Story
 * As a Wikimetrics user, I want to create a new cohort that is expanded to include wiki users on every wiki they have been active on, so that I can then create reports that include activity across wikis.
 * Event occurs after user clicks "Upload a new cohort" on the "My cohorts" page, they then have an option (checkbox) to expand the cohort
 * Activity on other wikis is given by CentralAuth
 * Bug ID 66843
 * Commitment to develop in sprint: http://sb.wmflabs.org/t/analytics-developers/2014-10-16/
 * If a wiki user in a cohort logs into a previously unvisited wiki after the cohort was created, the cohort will not be updated dynamically to include this wiki user on this newly visited wiki.


 * UX
 * Option is presented only when user is about to upload a new cohort
 * checkbox text is: "Expand cohort to all user’s accounts across projects (via CentralAuth)"

-- NEXT TO SPEC OUT --
Stories below are the next high priority to be discussed and defined.

Tag your own cohort with existing tags

 * Story: As a WikiMetrics user, I want to manage my cohorts by selecting one or more tags from a list of standard tags.
 * Event occurs when user begins typing the name of a tag into the "add tag" input box on the page for one of their own cohorts. A list appears with existing tags, typing filters list to existing tag list, and selecting a suggested tag auto-completes it in the input box (like google).

Notes UX change
 * '' Tag List: Analytics/Wikimetrics/Standard_tags
 * See also Analytics/Wikimetrics/Adding_New_Features/Tag_Cohorts
 * review-remove existing cannonical tags which may not conform to tag list above
 * add a link to wikipage with default tags (e.g. /analytics/wikimetrics/default_tags)
 * It is redundant for a user to tag a cohort with it's project (e.g. frwiki) because the default project was already specified at the cohort creation time. So rather than adding each project as a standard tag, we can update the UI to expose the default project specified at upload time.
 * Also, typing in a project in the search should filter the cohorts with that default project. For cohorts that have users from multiple projects (including CentralAuth cohorts), all the projects should be listed.

User reports pages edited by cohort

 * Story: As a Program leader or grant recipient Wikimetrics user, I want to be able to report on the number of pages on a wiki that the members of my cohort edited during a specified timeframe so that I can report on the global metric "number of articles created or improved in Wikimedia projects".

Pages edited option is made available when the user selects metrics to report for their cohort. The report can contain individual and aggregated results, filtered by namespace, just like the pages created metric.


 * Notes
 * Needed for January 2015 Grants reporting standards for Global metrics. Specifically to answer the number of articles improved and for analysis of topical content generation efforts re diversity and gaps.
 * if necessary, a template query in Quarry could be used instead.

Wikimetrics admin reporting

 * Story: Grantmaking staffer gets weekly CSV dump of data on all existing cohorts and reports up to that point

Notes
 * for each cohort, dump should contain metadata like creation date, cohort creator, tags on the cohort
 * for each report, dump should contain metadata like run date, report cohort, metrics run
 * need to know schema for report, cohort records in Wikimetrics database
 * data needed for next Grantmaking QR (end of December 2014)

Deleting a username from a cohort

 * Story: As a Wikimetrics user, I want to be able to delete one or more usernames/user_ids from my cohort because they are invalid or because the user has opted out of tracking, without re-uploading my cohort file.
 * User browses a list of usernames in a cohort, and deletes one or more usernames from that cohort by checking a checkbox next to each name and clicking "delete".

Notes
 * Status: Some development work has been done on this; UI has been proposed, need input from Grantmaking. Then can be submitted as a patch for review to Analytics dev.
 * Possible issues: with centralauth, you may see multiples. That could be cumbersome. Suggest collapsing to a single username, to make it easier/quicker to delete.
 * ''See also ,

View your tagged cohorts

 * Story: As a Wikimetrics user, I want to browse all of my cohorts with a particular tag.
 * List of tagged cohorts is displayed when user clicks on a tag on the page for one of their own cohorts, AND when user clicks on a tag in a list of all tags.

Notes
 * need a UI for page that displays lists of all cohorts with a given tag, list of all tags
 * for all tags page, we should visually separate system-defined vs. user-defined tags

-- IDEATION --
Stories below are not fully scoped or defined.

List usernames in reports that include individual results

 * Story: When a user download date from a report that contains individual results in JSON, the file contains both user names and user ids


 * Notes
 * currently, these data files only contain user ids, even if the cohort was created with user names

Report cohort edits across wikis using CentralAuth Extension

 * Stories
 * Cohort creator configures a report to return results for cohort users' activity across all projects where those users made edits.
 * This is different from Story "User creates cohort with CentralAuth insertions" because it happens during the report generation. The cohort is expanded at that time.

Notes
 * should be able to report both aggregated metrics per project (sum all users) and metrics for individual users per project
 * querying against central auth at reporting time allows a 'refresh' of the cohort by adding new projects that cohort members may have become active on in the intervening weeks or months since the cohort was created
 * see also Analytics/Wikimetrics/Adding_New_Features/CentralAuth_Cohorts

Wikimetrics superuser can view and change other users' datasets

 * Story: Grantmaking officer has special userright allowing them to perform any action on a Wikimetrics users' cohorts that the user themselves can perform: tag, untag, delete cohort, delete user from cohort, run reports.

Notes
 * may not need to have a admin interface initially: admin can use spreadsheet report as reference for finding cohorts. See

View cohort report output in Vital Signs dashboard

 * Story: WikiMetrics user can run a report and then easily create a Vital Signs dashboard that shows Global Metrics by that cohort across time and across projects.

Notes
 * is the dashboard available via a persistent URL?
 * is the dashboard publicly available?
 * can the dashboard page be a) refreshed when report is re-run, and/or b) set to refresh automatically on a scheduled basis ("b" requires scheduled reporting... a separate story)
 * how does a user delete a dashboard they created?

View metric definitions on metrics page

 * Story: As a Wikimetrics user, I want to be able to read about individual standard metrics when setting up my report so I can choose the right ones and interpret my results correctly.

Notes
 * link to the wiki pages for each metric, rather than hard-coding the definition into the WikiMetrics interface.
 * the best place for links to the wiki pages is probably the individual metrics pages.

View cohort members

 * Story: As a Wikimetrics user, I want to view my cohort at some arbitrary point after upload so I can check the user names/ids that are included in that cohort.

Notes

View reports run on a cohort

 * Story: As a Wikimetrics user, I want to view a list of the reports that I have run on a particular cohort so that I don't run the same report multiple times by mistake.

Notes
 * in the "My reports" screen, the cohort is listed along with the metric used in the report and the date the report was run. Reports-per-cohort could be displayed in a similar fashion.

-- STORY NEEDED --

 * 1) Wikimetrics ignore headers in cohort upload files
 * 2) share/unshare cohorts with other Wikimetrics users (see draft epic Analytics/Epics/Wikimetrics_cohort_sharing)
 * 3) edit description of cohort