top_articles: Retrieve Data on Top Articles

Description Usage Arguments See Also Examples

View source: R/query.R

Description

top_articles grabs data on the top articles for a project in a given time period, and for a particular platform.

Usage

1
2
3
top_articles(project = "en.wikipedia", platform = "all",
  start = as.Date("2015-10-01"), granularity = "daily", reformat = TRUE,
  ...)

Arguments

project

the name of the project, structured as [language_code].[project] (see the default).

platform

The platform the pageviews came from; one or more of "all", "desktop", "mobile-web" and "mobile-app". Set to "all" by default.

start

The date the articles were "top" in. 2015 by default.

granularity

the granularity of data to return; "daily" or "monthly", depending on whether top articles should reflect trends in day or month of the start date.

reformat

Whether to reformat the results as a data.frame or not. TRUE by default.

...

further arguments to pass to httr's GET.

See Also

article_pageviews for per-article pageviews and project_pageviews for per-project pageviews.

Examples

1
2
3
4
5
# Basic example
enwiki_top_articles <- top_articles()

# Use a narrower platform
enwiki_mobile_top <- top_articles(platform = "mobile-web")

Ironholds/pageviews documentation built on Jan. 13, 2018, 4:27 a.m.