DOI: 10.5281/zenodo.3605387
title: WikiHist.html: English Wikipedia's Full Revision History in HTML Format

description: <strong>Introduction</strong> 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:<br> Blagoj Mitrevski, Tiziano Piccardi, and Robert West: WikiHist.html: English Wikipedia’s Full Revision History in HTML Format. In <em>Proceedings of the 14th International AAAI Conference on Web and Social Media</em>, 2020.<br> https://arxiv.org/abs/2001.10256 When using the dataset, please cite the above paper. <strong>Dataset summary</strong> The dataset consists of three parts: English Wikipedia’s full revision history parsed to HTML, a table of the creation times of all Wikipedia pages (<em>page_creation_times.json.gz</em>), a table that allows for resolving redirects for any point in time (<em>redirect_history.json.gz</em>). Part 1 is our main contribution, while parts 2 and 3 contain complementary information that can aid researchers in their analyses. <strong>Getting the data</strong> 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: use a Torrent-based solution as described at https://github.com/epfl-dlab/WikiHist.html - Option 1 (recommended approach for the full download) use our download scripts by following the instructions at https://github.com/epfl-dlab/WikiHist.html - Option 2 (the download scripts allow you to bulk-download all data as well as to download revisions for specific articles only). download it manually from the Internet Archive at https://archive.org/details/WikiHist_html <strong>Dataset details</strong> <strong>Part 1: HTML revision history</strong><br> The data is split into 558 directories, named <em>enwiki-20190301-pages-meta-history$1.xml-p$2p$3</em>, where <em>$1</em> ranges from 1 to 27, and <em>p$2p$3 </em>indicates that the directory contains revisions for pages with ids between <em>$2</em> and <em>$3</em>. (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 <strong>Part 2: Page creation times (<em>page_creation_times.json.gz</em>)</strong> 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 <strong>Part 3: Redirect history (<em>redirect_history.json.gz</em>)</strong> 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, <em>metadata.zip</em> and <em>mysql_database.zip</em>. These two files are not part of WikiHist.html per se, and most users will not need to download them manually. The file <em>metadata.zip</em> is required by the download script (and will be fetched by the script automatically), and <em>mysql_database.zip</em> 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 .
description: GitHub repository: https://github.com/epfl-dlab/WikiHist.html Dataset paper: https://arxiv.org/abs/2001.10256