knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Fact check publishers or queries, create claims and more with the Google FactCheck Toolbox.
# install.packages("remotes") remotes::install_github("news-r/factcheck")
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
.
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.