top_articles {pageviews} | R Documentation |
Retrieve Data on Top Articles
Description
top_articles
grabs data on the top articles for a project
in a given time period, and for a particular platform.
Usage
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 |
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 |
reformat |
Whether to reformat the results as a |
... |
further arguments to pass to httr's GET. |
See Also
article_pageviews
for per-article pageviews and project_pageviews
for
per-project pageviews.
Examples
# Basic example
enwiki_top_articles <- top_articles()
# Use a narrower platform
enwiki_mobile_top <- top_articles(platform = "mobile-web")
[Package pageviews version 0.6.0 Index]