Retrieve Pageview Data for an Article
retrieves the pageview data for a particular article on a project, within a provided time-range.
article_pageviews(project = "en.wikipedia", article = "R (programming language)", platform = "all", user_type = "all", start = "2015100100", end = NULL, reformat = TRUE, ...)
- the name of the project, structured as
[language_code].[project](see the default).
- the article(s) you want to retrieve data for. Ideally features underscores in the title instead of spaces, but happily converts if you forget to do this.
- The platform the pageviews came from; One or more of "all", "desktop", "mobile-web" and "mobile-app". Set to "all" by default.
- the type of users. One or more of "all", "user", "spider" or "bot". "all" by default.
- the start
YYYYMMDDHHof the range you want to cover. This can be easily grabbed from R date/time objects using
- the end
YYYYMMDDHHof the range you want to cover. NULL by default, meaning that it returns 1 day of data.
- Whether to reformat the results as a
data.frameor not. TRUE by default.
- further arguments to pass to httr's GET.
# Basic example r_pageviews <- article_pageviews() # Modify the article obama_pageviews <- article_pageviews(article = "Barack_Obama")
Looks like there are no examples yet.