wikipediaTraffic: Function to get Pageview Data of a given Wikipedia Article

View source: R/wikipediaTraffic.R

wikipediaTrafficR Documentation

Function to get Pageview Data of a given Wikipedia Article

Description

This function allows to get the pageviews for a given Wikiepdia article.

Usage

wikipediaTraffic(page, start, end, project = "en.wikipedia.org",
  platform = "all-access", agent = "user", granularity = "daily")

Arguments

page

The Page you want to get the traffic for for example cat.

start

The start date. Format = YYYY-MM-DD

end

The end date. Format = YYYY-MM-DD

project

The Wikipedia Project you want to retrieve the data from. Default is en.wikipedia.org. A list of possible projects can be found here <https://meta.wikimedia.org/w/api.php?action=sitematrix&formatversion=2>

platform

One of: all-access (default), desktop, mobile-app, mobile-web

agent

One of 'user' (human reader, standard), 'spider' (search engine crawler), 'bot' (WMF bots) or 'all-agents'(user, spider and bot)

granularity

The time unit for the response data. As of today, the only supported granularity for this endpoint is daily and monthly. wikipediaTraffic()

Examples

wikipediaTraffic("R (programming language)",'2018-01-01','2018-01-10')

dschmeh/seoR documentation built on Jan. 7, 2023, 12:19 a.m.