Public Subject Attention via Wikipedia Page View Statistics

Public attention is an interesting field of study. The internet not only allows to access information in no time on virtually any subject but via page access statistics gathered by website authors the subject of attention as well can be studied.


Public Subject Attention via Wikipedia Page View Statistics

Status

This package does not work at the moment due due a missing data source

lines of R code: 594, lines of test code: 203

Version

1.1.14 ( 2017-09-23 13:46:24 )

Description

License

GPL (>= 2)
Peter Meissner [aut, cre], R Core Team [ctb]

Citation

citation("wikipediatrend")

BibTex for citing

toBibtex(citation("wikipediatrend"))

Installation

Stable version from CRAN:

install.packages("wikipediatrend")

Latest development version from Github:

devtools::install_github("petermeissner/wikipediatrend")

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.

News

NEWS wikipediatrend

version 1.1.14 // 2017-09-23 ...

  • CRAN compliance

version 1.1.13 // 2017-09-23 ...

  • the stats.grok.se data source went away leading to numerous errors in the tests - those were turned off

version 1.1.12 // 2016-12-30 ...

  • BUGFIX

version 1.1.10 // 2016-03-18 ...

  • BUGFIX
  • tests, README generation as well as vignette generation would fail due to stats.grok.se serving no data after 2016-01-16
  • examples were restricted to data prior to that date to make tests and vignette/README generation run smoothly again
  • FEATURE
  • wp_trend() results came unordered, results are now ordered according to date, lang, title (making it easy to use something like plot( wp_trend("test", from="2015-01-01", to="2015-01-30")[,c("date", "count")], type="b")
  • cut loose unnecessary RCurl dependency

version 1.1.9 // 2016-02-29 ...

  • BUGFIX
  • wp_linked_pages() would sometimes return links that do not link to wikipedia pages but to other projects - that has been fixed.

version 1.1.8 // 2015-10-11 ...

  • FEATURE
  • if provided with bad server response data - could not be parsed - wp_trend() would without giving further information: now it reports whatever data was send back from the server along with the warning

version 1.1.7 // 2015-09-22 ...

  • BUGFIX
  • the package's functions would fail combined with rvest versions >= 0.3.0 - that has been fixed

version 1.1.6 // 2015-07-21 ...

  • BUGFIX
  • wp_trend() would fail with un-informative error if page or lang input would contain NA - now it fails with more informative error: 'Error: all(!is.na(page)) is not TRUE'

  • vignette would fail due to NA as page/lang input of wp_trend() - code has been changed to prevent such

  • CRAN COMPLIANCE
  • imports from none 'base' R now are made explicit

version 1.1.5 // 2015-07-01 ...

  • BUGFIX
    • adding checks for empty data returned by server (might cause breaking of wp_trend()) and adding tests for such cases

version 1.1.4 // 2015-06-10 ...

  • BUGFIX
  • modifying vignette to comply with CRAN policies: replaced non ascii character in R code by its \u-escape sequence ( \u00e4 )

  • modifying vignette to comply with CRAN policies: making code evaluation for code that uses non-mainstream repository hosted packages optional on machines that do not have those installed

version 1.1.3 // 2015-06-04 ...

  • BUGFIX
    • modifying vignette to comply with CRAN policies (dropping lines installing packages if not present)

version 1.1.2 // 2015-05-23 ...

  • modifying caching to comply with CRAN policies

  • changing default folder of cache file from temp (basename(tempdir())) to Rtemp ( tempdir() )

version 1.1.1 // 2015-05-23 ...

  • adding ghrr as additional repo to comply with CRAN policies

  • changing default folder of cache file from home (~) to temp (basename(tempdir()))

version 1.1.0 // 2015-05-21 ...

  • feature: caching has been overhauled

  • feature: wp_trend() now tries to guess if page was supplied as title with possible special characters or as (url-encoded) URL part and take care of further processing

  • bug-fix: special character support of the packages was lousy and preventing the usage of articles of non-standard languages ( - especially on Windows)

    • introduction of the wp_df class to allow for a print.wp_df that a) shortens long strings on print b) does not use format() (format() causes UTF-8 characters to be replaced by "<U+xxxx>" strings (propably only))
    • using a package specific write_utf8_csv() and read_utf8_csv() to be able to store and cache data for articles with special character names (even under Windows, write.csv() does not allow enforcing a specific encoding)
  • bug-fix / backward compatibility: with version 1.0.0 old parameters for wp_trend() were causing errors

  • bug-fix: wp_cache_reset() would stop with an error if called twice in a row - fixed

version 1.0.0 // 2015-04-01 ...

  • api-change: option userAgent deleted: the default is to send information on versions of R, wikipediatrend, curl as well as RCurl

  • api-change: option requestFrom deleted: the default is to not send the header

  • feature: wp_trend() now by default caches data retrievals in a temporary file

  • feature: wp_trend(file="save.csv") now allows to specify a file where retrievals are stored (this will always add to the already existing data)

  • feature: wp_trend() now allows to specify more than one page and/or language at a time. data than will be retrieved for every combination of page-language and date

  • feature: caching system is persistant wp_cache_file() will report file used for caching; wp_cache_reset() will reset cache; wp_cache_load() will return its content as data.frame()

  • feature: while wp_trend() now (invisibly) returns only data from the current request at hand the new function wp_cache() will retrieve data from cache files (by default / if no file name is specified it retrieves data from .wp_trend_cache)

  • api-change: the data returned by wp_trend(), cached in cache-file, retrieved by wp_cache() does consist of more variables: date, count, project, title, rank, month

  • feature: testthat tests now check base functionality of the package

  • bug-fix: non-existing page views for a month have led to an error, fixed.

  • bug-fix: wp_trend() now checks date inputs better for logical inconsistencies

version 0.2.0 // 2014-11-01 ...

  • first puplication on CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("wikipediatrend")

1.1.14 by Peter Meissner, 5 months ago


Report a bug at https://github.com/petermeissner/wikipediatrend/issues


Browse source code at https://github.com/cran/wikipediatrend


Authors: Peter Meissner [aut, cre], R Core Team [ctb]


Documentation:   PDF Manual  


Task views: Web Technologies and Services


GPL (>= 2) license


Imports jsonlite, stringr, rvest, httr, utils, xml2, hellno, RColorBrewer

Suggests testthat, knitr, ggplot2, devtools, dplyr, magrittr, cranlogs


See at CRAN