Skip to contents

get_xtools_page_info() returns basic statistics about articles' history and quality, including their total edits, creation date, and assessment value (good, featured etc.)

get_xtools_page_prose() returns statistics about the word counts and referencing of articles

get_xtools_page_links() returns the number of ingoing and outgoing links to articles, including redirects

get_xtools_page_top_editors() returns the list of top editors for articles, with optional filters by date range and non-bot status

get_xtools_page_assessment() returns more detailed statistics about articles' assessment status and Wikiproject importance levels

Usage

get_xtools_page_info(
  title,
  language = "en",
  failure_mode = c("error", "quiet")
)

get_xtools_page_prose(
  title,
  language = "en",
  failure_mode = c("error", "quiet")
)

get_xtools_page_links(
  title,
  language = "en",
  failure_mode = c("error", "quiet")
)

get_xtools_page_top_editors(
  title,
  start = NULL,
  end = NULL,
  limit = 1000,
  nobots = FALSE,
  language = "en",
  failure_mode = c("error", "quiet")
)

get_xtools_page_assessment(
  title,
  classonly = FALSE,
  language = "en",
  failure_mode = c("error", "quiet")
)

Arguments

title

Character vector of page titles

language

Language code for the version of Wikipedia to query

failure_mode

What to do if no data is found. See get_rest_resource()

start

A character vector or date object (optional): the start date for calculating top editors

end

A character vector or date object (optional): the end date for calculating top editors

limit

An integer: the maximum number of top editors to return

nobots

TRUE or FALSE: if TRUE, bots are excluded from the top editor calculation

classonly

TRUE or FALSE: if TRUE, only return the article's assessment status, without Wikiproject information

Value

A list or tbl of results, the same length as title. NB: The results for get_xtools_page_assessment are still not parsed properly.

Examples

# Get basic statistics about Erich Auerbach on German Wikipedia
auerbach <- get_xtools_page_info("Erich Auerbach", language = "de")
auerbach
#> # A tibble: 1 × 21
#>   warning    project page  watchers pageviews pageviews_offset revisions editors
#>   <list>     <chr>   <chr> <lgl>        <int>            <int>     <int>   <int>
#> 1 <list [2]> de.wik… Eric… NA             408               30       436     142
#> # ℹ 13 more variables: ip_edits <int>, minor_edits <int>, creator <chr>,
#> #   creator_editcount <lgl>, created_at <chr>, created_rev_id <int>,
#> #   modified_at <chr>, secs_since_last_edit <int>, modified_rev_id <int>,
#> #   last_edit_id <int>, author <chr>, author_editcount <lgl>,
#> #   elapsed_time <dbl>