knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
fopi contains with dataset, and a RESTful API for the Freedom of Press Index.
From R
fopi::run_api()
With docker
docker pull jcoenep/fopi
docker run --rm -p 3000:8000 jcoenep/fopi
Visit http://127.0.0.1:3000/__swagger__/ for swagger docs.
You can access the data with.
data(fopi, package = "fopi")
Or via the deployed API but using the package.
fopi::fopi_get_country("Switzerland")
You can install the development version of fopi from Github with:
# install.packages("remotes") remotes::install_github("news-r/fopi")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.