Status
lines of R code: 428, lines of test code: 160
Version
2.1.0 ( 2019-01-10 20:49:54 )
Description
License
GPL (>= 2)
Peter Meissner [aut, cre], [ctb]
Credits
- Parts of the package’s code have been shamelessly copied and
modified from R base package written by R core team. This concerns
the
wp_date()
generic and its methods and is detailed in the help files.
Citation
citation("wikipediatrend")
Meissner P (2018). wikipediatrend: Public Subject Attention via Wikipedia Page View Statistics. R package version 2.1.0.
BibTex for citing
toBibtex(citation("wikipediatrend"))
Installation
Stable version from CRAN:
install.packages("wikipediatrend")
Latest development version from Github:
devtools::install_github("petermeissner/wikipediatrend")
Usage
starting up …
library(wikipediatrend)
##
## [wikipedaitrend]
##
## Note:
##
## - Data before 2016-01-01
## * is provided by petermeissner.de and
## * was prepared in a project comissioned by the Hertie School of Governance (Simon Munzert)
## * and supported by the Daimler and Benz Foundation.
##
## - Data from 2016-01-01 onwards
## * is provided by the Wikipedia Foundation
## * via its pageviews package and API.
##
getting some data …
trend_data <-
wp_trend(
page = c("Der_Spiegel", "Die_Zeit"),
lang = c("de", "en"),
from = "2007-01-01",
to = Sys.Date()
)
having a look …
trend_data
## language article date views
## 2 en die_zeit 2007-12-10 74
## 1 de der_spiegel 2007-12-10 798
## 4 en die_zeit 2007-12-11 35
## 3 de der_spiegel 2007-12-11 710
## 5 de der_spiegel 2007-12-12 770
## 8094 en die_zeit 2019-01-07 233
## 8096 en die_zeit 2019-01-08 215
## 8095 de der_spiegel 2019-01-08 1427
## 8098 en die_zeit 2019-01-09 212
## 8097 de der_spiegel 2019-01-09 1160
##
## ... 8088 rows of data not shown
having another look …
plot(
trend_data[trend_data$views < 2500, ]
)