An open API service indexing awesome lists of open source software.

https://github.com/ropengov/rqog

Download data from the Quality of Government Institute data
https://github.com/ropengov/rqog

data-package r r-package rstats

Last synced: about 2 months ago
JSON representation

Download data from the Quality of Government Institute data

Awesome Lists containing this project

README

          

# rqog-package: download data from the Quality of Government Institute data

[![rOG-badge](https://ropengov.github.io/rogtemplate/reference/figures/ropengov-badge.svg)](http://ropengov.org/)
[![Lifecycle:
maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![CRAN
status](https://www.r-pkg.org/badges/version/rqog)](https://CRAN.R-project.org/package=rqog)

Download the latest and archived datasets from the [Quality of
Government Institute](https://qog.pol.gu.se/data) using the function
`read_qog()`. See
[`?read_qog`](http://ropengov.github.io/rqog/reference/read_qog.html)
for help, [package
vignette](http://ropengov.github.io/rqog/articles/rqog_tutorial.html)
for more examples and
[shiny.vaphana.com/rqog_app](https://shiny.vaphana.com/rqog_app/) for
interactive metadata shiny.

## Installation

``` r
remotes::install_github("ropengov/rqog")
```

## Use

**Download data**

``` r
library(rqog)
dat <- read_qog(which_data = "standard", data_type = "time-series")
```

**Browse metadata**

``` r
library(rqog)
meta_std_ts_2023[grepl("human development", meta_std_ts_2023$name, ignore.case = TRUE),]
#> code name value label class
#> 1416 iiag_hd Human Development NA numeric
#> 1875 undp_hdi Human Development Index NA numeric
```

**Plot an indicator**

``` r
library(ggplot2)
ggplot(dat[!is.na(dat$undp_hdi),],
aes(x = year, y = undp_hdi, color = cname)) +
geom_line() +
theme(legend.position = "none")
```

Copyright (C) 2012-2023 Markus Kainu .
MIT-licence.

## Disclaimer

This package is in no way officially related to or endorsed by Quality
of Government Institute.