DOI: 10.5281/zenodo.1005175
title: Wikipedia Category Granularity (WikiGrain) data

description: The "Wikipedia Category Granularity (WikiGrain)" data consists of three files that contain information about articles of the English-language version of Wikipedia (https://en.wikipedia.org).

The data has been generated from the database dump dated 20 October 2016 provided by the Wikimedia foundation licensed under the GNU Free Documentation License (GFDL) and the Creative Commons Attribution-Share-Alike 3.0 License. 

WikiGrain provides information on all 5,006,601 Wikipedia articles (that is, pages in Namespace 0 that are not redirects) that are assigned to at least one category.

The WikiGrain Data is analyzed in the paper

Jürgen Lerner and Alessandro Lomi: <strong>Knowledge categorization affects popularity and quality of Wikipedia articles</strong>. <em>PLoS ONE</em>, 13(1):e0190674, 2018.

===============================================================<br>
Individual files (tables in comma-separated-values-format):

---------------------------------------------------------------<br>
* article_info.csv contains the following variables:

- "id"<br>
(integer) Unique identifier for articles; identical with the page_id in the Wikipedia database.

- "granularity"<br>
(decimal) The granularity of an article A is defined to be the average (mean) granularity of the categories of A, where the granularity of a category C is the shortest path distance in the parent-child subcategory network from the root category (Category:Articles) to C. Higher granularity values indicate articles whose topics are less general, narrower, more specific. 

- "is.FA"<br>
(boolean) True ('1') if the article is a featured article; false ('0') else.

- "is.FA.or.GA"<br>
(boolean) True ('1') if the article is a featured article or a good article; false ('0') else.

- "is.top.importance"<br>
(boolean) True ('1') if the article is listed as a top importance article by at least one WikiProject; false ('0') else.

- "number.of.revisions"<br>
(integer) Number of times a new version of the article has been uploaded.

<br>
---------------------------------------------------------------<br>
* article_to_tlc.csv<br>
is a list of links from articles to the closest top-level categories (TLC) they are contained in. We say that an article A is a member of a TLC C if A is in a category that is a descendant of C and the distance from C to A (measured by the number of parent-child category links) is minimal over all TLC. An article can thus be member of several TLC.<br>
The file contains the following variables:

- "id"<br>
(integer) Unique identifier for articles; identical with the page_id in the Wikipedia database.

- "id.of.tlc"<br>
(integer) Unique identifier for TLC in which the article is contained; identical with the page_id in the Wikipedia database. 

- "title.of.tlc"<br>
(string) Title of the TLC in which the article is contained.

---------------------------------------------------------------<br>
* article_info_normalized.csv<br>
contains more variables associated with articles than article_info.csv. All variables, except "id" and "is.FA" are normalized to standard deviation equal to one. Variables whose name has prefix "log1p." have been transformed by the mapping x --&gt; log(1+x) to make distributions that are skewed to the right 'more normal'. <br>
The file contains the following variables:

- "id"<br>
Article id.

- "is.FA"<br>
Boolean indicator for whether the article is featured.

- "log1p.length"<br>
Length measured by the number of bytes.

- "age"<br>
Age measured by the time since the first edit.

- "log1p.number.of.edits"<br>
Number of times a new version of the article has been uploaded.

- "log1p.number.of.reverts"<br>
Number of times a revision has been reverted to a previous one.

- "log1p.number.of.contributors"<br>
Number of unique contributors to the article.

- "number.of.characters.per.word"<br>
Average number of characters per word (one component of 'reading complexity').

- "number.of.words.per.sentence"<br>
Average number of words per sentence (second component of 'reading complexity').

- "number.of.level.1.sections"<br>
Number of first level sections in the article.

- "number.of.level.2.sections"<br>
Number of second level sections in the article.

- "number.of.categories"<br>
Number of categories the article is in.

- "log1p.average.size.of.categories"<br>
Average size of the categories the article is in.

- "log1p.number.of.intra.wiki.links"<br>
Number of links to pages in the English-language version of Wikipedia.

- "log1p.number.of.external.references"<br>
Number of external references given in the article.

- "log1p.number.of.images"<br>
Number of images in the article.

- "log1p.number.of.templates"<br>
Number of templates that the article uses.

- "log1p.number.of.inter.language.links"<br>
Number of links to articles in different language edition of Wikipedia.

- "granularity"<br>
As in article_info.csv (but normalized to standard deviation one).<br>