-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME.Rmd
66 lines (46 loc) · 1.23 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
65
66
---
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 -->
[![Build status](https://ci.appveyor.com/api/projects/status/eoilou2fr917aew4?svg=true)](https://ci.appveyor.com/project/JohnCoene/fopi)
[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
<!-- badges: end -->
# fopi
fopi contains with dataset, and a RESTful API for the Freedom of Press Index.
## API
From R
```r
fopi::run_api()
```
With docker
```bash
docker pull jcoenep/fopi
docker run --rm -p 3000:8000 jcoenep/fopi
```
Visit `http://127.0.0.1:3000/__swagger__/` for swagger docs.
## Data
You can access the data with.
``` r
data(fopi, package = "fopi")
```
Or via the [deployed API](http://app.news-r.org:2222/__swagger__/) but using the package.
```{r}
fopi::fopi_get_country("Switzerland")
```
## Get it
You can install the development version of fopi from Github with:
``` r
# install.packages("remotes")
remotes::install_github("news-r/fopi")
```