knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Travis build status

factcheck

Fact check publishers or queries, create claims and more with the Google FactCheck Toolbox.

Installation

# install.packages("remotes")
remotes::install_github("news-r/factcheck")

Setup

Get a free key from the Google Console.

factcheck_key("xxXXxxXx")

Note that you can specify the FACTCHECK_API_KEY key as an environment variable in your .Renviron for convenience.

The above key will work for the fact_check function, other function to create, update, or delete your claims will require OAuth 2.0 authentication using fact_token.

ROADMAP

Example

library(factcheck)

# Claims on Trump in English that are maximum 10 days old
fact_check("Trump", lang = "en-US", days_old = 10)

# Claims made on the New York Times
fact_check(publisher = "nytimes.com")


news-r/factcheck documentation built on June 26, 2019, 1:19 p.m.