Published January 12, 2020 | Version v1
Dataset Open

WikiHist.html: English Wikipedia's Full Revision History in HTML Format

  • 1. EPFL

Description

Introduction

Wikipedia is written in the wikitext markup language. When serving content, the MediaWiki software that powers Wikipedia parses wikitext to HTML, thereby inserting additional content by expanding macros (templates and modules). Hence, researchers who intend to analyze Wikipedia as seen by its readers should work with HTML, rather than wikitext. Since Wikipedia’s revision history is made publicly available by the Wikimedia Foundation exclusively in wikitext format, researchers have had to produce HTML themselves, typically by using Wikipedia’s REST API for ad-hoc wikitext-to-HTML parsing. This approach, however, (1) does not scale to very large amounts of data and (2) does not correctly expand macros in historical article revisions.

We have solved these problems by developing a parallelized architecture for parsing massive amounts of wikitext using local instances of MediaWiki, enhanced with the capacity of correct historical macro expansion. By deploying our system, we produce and hereby release WikiHist.html, English Wikipedia’s full revision history in HTML format. It comprises the HTML content of 580M revisions of 5.8M articles generated from the full English Wikipedia history spanning 18 years from 1 January 2001 to 1 March 2019. Boilerplate content such as page headers, footers, and navigation sidebars are not included in the HTML.

For more details, please refer to the description below and to the dataset paper:
Blagoj Mitrevski, Tiziano Piccardi, and Robert West: WikiHist.html: English Wikipedia’s Full Revision History in HTML Format. In Proceedings of the 14th International AAAI Conference on Web and Social Media, 2020.
https://arxiv.org/abs/2001.10256

When using the dataset, please cite the above paper.

 

Dataset summary

The dataset consists of three parts:

  1. English Wikipedia’s full revision history parsed to HTML,
  2. a table of the creation times of all Wikipedia pages (page_creation_times.json.gz),
  3. a table that allows for resolving redirects for any point in time (redirect_history.json.gz).

Part 1 is our main contribution, while parts 2 and 3 contain complementary information that can aid researchers in their analyses.

 

Getting the data

Parts 2 and 3 are hosted in this Zenodo repository. Part 1 is 7TB large -- too large for Zenodo -- and is therefore hosted externally on the Internet Archive. For downloading part 1, you have multiple options:

 

Dataset details

Part 1: HTML revision history
The data is split into 558 directories, named enwiki-20190301-pages-meta-history$1.xml-p$2p$3, where $1 ranges from 1 to 27, and p$2p$3 indicates that the directory contains revisions for pages with ids between $2 and $3. (This naming scheme directly mirrors that of the wikitext revision history from which WikiHist.html was derived.) Each directory contains a collection of gzip-compressed JSON files, each containing 1,000 HTML article revisions. Each row in the gzipped JSON files represents one article revision. Rows are sorted by page id, and revisions of the same page are sorted by revision id. We include all revision information from the original wikitext dump, the only difference being that we replace the revision’s wikitext content with its parsed HTML version (and that we store the data in JSON rather than XML):

  • id: id of this revision
  • parentid: id of revision modified by this revision
  • timestamp: time when revision was made
  • cont_username: username of contributor
  • cont_id: id of contributor
  • cont_ip: IP address of contributor
  • comment: comment made by contributor
  • model: content model (usually "wikitext")
  • format: content format (usually "text/x-wiki")
  • sha1: SHA-1 hash
  • title: page title
  • ns: namespace (always 0)
  • page_id: page id
  • redirect_title: if page is redirect, title of target page
  • html: revision content in HTML format

 

Part 2: Page creation times (page_creation_times.json.gz)

This JSON file specifies the creation time of each English Wikipedia page. It can, e.g., be used to determine if a wiki link was blue or red at a specific time in the past. Format:

  • page_id: page id
  • title: page title
  • ns: namespace (0 for articles)
  • timestamp: time when page was created

 

Part 3: Redirect history (redirect_history.json.gz)

This JSON file specifies all revisions corresponding to redirects, as well as the target page to which the respective page redirected at the time of the revision. This information is useful for reconstructing Wikipedia's link network at any time in the past. Format:

  • page_id: page id of redirect source
  • title: page title of redirect source
  • ns: namespace (0 for articles)
  • revision_id: revision id of redirect source
  • timestamp: time at which redirect became active
  • redirect: page title of redirect target (in 1st item of array; 2nd item can be ignored)

 

The repository also contains two additional files, metadata.zip and mysql_database.zip. These two files are not part of WikiHist.html per se, and most users will not need to download them manually. The file metadata.zip is required by the download script (and will be fetched by the script automatically), and mysql_database.zip is required by the code used to produce WikiHist.html. The code that uses these files is hosted at GitHub, but the files are too big for GitHub and are therefore hosted here.

WikiHist.html was produced by parsing the 1 March 2019 dump of https://dumps.wikimedia.org/enwiki/20190301 from wikitext to HTML. That old dump is not available anymore on Wikimedia's servers, so we make a copy available at https://archive.org/details/enwiki-20190301-original-full-history-dump_dlab .

Notes

GitHub repository: https://github.com/epfl-dlab/WikiHist.html Dataset paper: https://arxiv.org/abs/2001.10256

Files

metadata.zip

Files (13.3 GB)

Name Size Download all
md5:fdd807e193423d4be5d6021e167aa6bc
352.5 MB Preview Download
md5:721256cbf01d4e54bb78ecc5267456be
11.6 GB Preview Download
md5:77334bc6fefce62b64362ca09a3c71e5
845.4 MB Download
md5:b028326d15632d7bebd2587e37f01be7
530.0 MB Download