statsgrokse: Function for getting access statistics for wikipedia pages...

Description Usage Arguments Examples

View source: R/statsgrokse.R

Description

Function for getting access statistics for wikipedia pages from stats.grok.se

Usage

1
statsgrokse(page, from, to, lang = "en", verbose = TRUE, warn = TRUE)

Arguments

page

The name of the Wikipedia page as to be found in the URL to the wikipedia article. If e.g. the URL is: https://en.wikipedia.org/wiki/Peter_Fox_(musician), than the page name equals to Peter_Fox_(musician).

from

The starting date of the timespan for which access statistics should be retrieved - note that there is no data prior to 2007-12-01. Supply some sort of timestamp e.g. of class POSIXlt, POSIXct, Date, or character. If the option is of type character it should be in the form of yyyy-mm-dd.

to

The last date for which access statistics should be retrieved. Supply some sort of timestamp e.g. of class POSIXlt, POSIXct, Date, or character. If the option is of type character it should be in the form of yyyy-mm-dd.

lang

The language shorthand identifying which Wikipedia access statistics are to be used: e.g. "en" for the English version found at https://en.wikipedia.org, "de" for the German version found at https://de.wikipedia.org or perhaps "als" for the Alemannic dialect found under https://als.wikipedia.org/.

verbose

should function report freely on what it is doing or not

warn

should the function warn if it does, e.g. overwrite parameter inputs to make things work or just do it and not erport

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(statsgrokse)
pageviews <-
  statsgrokse(
    page = "Edward_Snowden",
    from = "2013-06-01",
    to   = "2013-07-31",
    lang = c("en","de")
  )

## End(Not run)

petermeissner/statsgrokse documentation built on May 24, 2017, 4:33 a.m.