-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
64 lines (46 loc) · 1.45 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
output:
github_document:
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
<!-- badges: start -->
[![Travis build status](https://travis-ci.org/news-r/factcheck.svg?branch=master)](https://travis-ci.org/news-r/factcheck)
<!-- badges: end -->
# factcheck
Fact check publishers or queries, create claims and more with the [Google FactCheck Toolbox](https://toolbox.google.com/factcheck).
## Installation
``` r
# install.packages("remotes")
remotes::install_github("news-r/factcheck")
```
## Setup
Get a free key from the [Google Console](https://console.cloud.google.com).
```r
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
- [x] Fact Check
- [x] Authentication
- [ ] Create claims
- [ ] Get created claims
- [ ] Delete created claims
- [ ] Edit claims
## Example
```{r 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")
```