CommunityData:Dataset And Tools Release 2018

From CommunityData

In summer 2018 Nate is leading efforts to improve the code our research group uses to generate datasets from raw mediawiki dumps. The end goal is to release both the code and datasets generated on wikia and wikipedia wikis and to publish a data descriptor. This page documents these efforts.


There are 4 types of datasets we will support:

  1. Wiki level edits: for each wiki, a table where each row corresponds to an edit.
  2. Wiki level edit weeks: edit data aggregated by each week.
  3. user level mediawiki datasets: for each user, a table where each row corresponds to an edit.
  4. User level edit weeks: user level edits aggregated by week.

The program wikiq is used to generate wiki and (in the near future) user level edit datasets. Wikiq is a python script meant to be used through a command line interface. It depends on functionality from Mediawiki Utilities.

The build_edit_weeks.R Rscript is used to generate edit weeks datasets from wikiq outputs. Currently this script is scattered across projects.


  1. Improve the reliability, usability, and maintainability of our software utilities for generating datasets.
  2. Cover important and useful analytic variables in wikiq and build_edit_weeks.
  3. Document the data sets with codebooks and example code.
  4. Document the use and development of wikiq and build_edit_weeks to support future maintainers.
  5. Publicize the work through a dataset descriptor and presentations.


  1. Talk to potential users of the code and datasets including the research teams at CDSC, UCM and Wikimedia to gather requirements.
  2. Design user-level datasets (beginning with Jeremy and Kaylea's work).
  3. Add variables to wikiq according to requirements.
  4. Create unit test suits for wikiq and build edit weeks.
  5. Refactor wikiq to produce user-level datasets.
  6. Refactor wikiq to migrate from python-mediawiki-utilities to the new mediawiki-utilities projects.
  7. Refactor build edit weeks into the RCommunity data repository and support usability via CLI.
  8. Document release version of wikiq
  9. Document release version of build_edit_weeks.
  10. Generate datasets from wikia dumps, wikipedia language editions.
  11. Write data descriptor to accompany the release of the code and data to publicize the release and explain the contribution.
  12. Give presentations and tutorials to consumers of the work (UCM, WMF, CDSC).


Gantt schedule.svg

Ideas for New Wikiq Variables[edit]

  1. Regex language for building new variables.
  2. Variable indicating what sections were changed in the edit (Built around regex language)?
  3. Variable indicate which if any Wikiprojects (for the wikipedia case) are associated with the page (Hard, probably requires 2 passes).


  1. Handle Default edits that initialize wikis.