r-uisapi

Access the UNESCO Institute for Statistics API

https://github.com/tidy-intelligence/r-uisapi

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (17.9%) to scientific vocabulary

Keywords

economic-data r
Last synced: 10 months ago · JSON representation

Repository

Access the UNESCO Institute for Statistics API

Basic Info
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Topics
economic-data r
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# uisapi


[![CRAN status](https://www.r-pkg.org/badges/version/uisapi)](https://cran.r-project.org/package=uisapi)
[![CRAN downloads](https://cranlogs.r-pkg.org/badges/uisapi)](https://cran.r-project.org/package=uisapi)
![R CMD Check](https://github.com/tidy-intelligence/r-uisapi/actions/workflows/R-CMD-check.yaml/badge.svg)
![Lint](https://github.com/tidy-intelligence/r-uisapi/actions/workflows/lint.yaml/badge.svg)
[![Codecov test coverage](https://codecov.io/gh/tidy-intelligence/r-uisapi/graph/badge.svg)](https://app.codecov.io/gh/tidy-intelligence/r-uisapi)


Retrieve data from the [UNESCO Institute for Statistics (UIS) API](https://api.uis.unesco.org/api/public/documentation/). UIS provides public access to more than 4,000 indicators focusing on education, science and technology, culture, and communication.

The package is part of the [econdataverse](https://www.econdataverse.org/) family of packages aimed at helping economists and financial professionals work with sovereign-level economic data.

 > 💡 The UIS API has no known rate limiting, but there is a 100,000 record limit for each request. For larger data downloads, the UIS recommends its [Bulk Data Download Service (BDDS)](https://databrowser.uis.unesco.org/resources/bulk.

## Installation

You can install `uisapi` from [CRAN](https://cran.r-project.org/package=uisapi) via:

```{r eval=FALSE}
install.packages("uisapi")
```

You can install the development version of `uisapi` from GitHub with:

```{r eval=FALSE}
# install.packages("pak")
pak::pak("tidy-intelligence/r-uisapi")
```

## Usage

Load the package:

```{r}
library(uisapi)
```

To fetch indicators for specific entities, you can call:

```{r}
uis_get(
  entities = c("BRA", "USA"),
  indicators = c("CR.1", "CR.2"),
  start_year = 2010,
  end_year = 2020
)
```

You can get information about the available entities via:

```{r}
uis_get_entities()
```

The list of available indicators can be retrieved via:

```{r}
uis_get_indicators()
```

The API supports versioning and you can retrieve all versions using:

```{r}
uis_get_versions()
```

If you are only interested in the current default version, you can use the parameter `default_only`:

```{r}
uis_get_versions(default_only = TRUE)
```

The API will only return 100,000 records for each query, if more data is requested, the API call with fail with a 400 http status code. If you need more data, then UIS recommends using the [Bulk Data Download Service (BDDS)](https://databrowser.uis.unesco.org/resources/bulk). You can get a list of available files via:

```{r}
uis_bulk_files()
```

Each bulk files consists of multiple CSV files and the `uisapi` package currently does not provide automatic importers for these files. Rather, you can use base utils to download a specific file, unzip it, and read its files. For instance: 

```{r eval = FALSE}
download.file(
  "https://uis.unesco.org/sites/default/files/documents/bdds/092024/SDG.zip",
  destfile = "SDG.zip"
)
unzip("SDG.zip")
read.csv("SDG_COUNTRY.csv")
```

Owner

  • Name: Tidy Intelligence
  • Login: tidy-intelligence
  • Kind: organization
  • Email: contact@tidy-intelligence.com
  • Location: Germany

Let your data spark joy (coming soon!)

GitHub Events

Total
  • Create event: 4
  • Release event: 1
  • Issues event: 2
  • Watch event: 4
  • Issue comment event: 1
  • Push event: 27
  • Pull request event: 2
  • Fork event: 1
Last Year
  • Create event: 4
  • Release event: 1
  • Issues event: 2
  • Watch event: 4
  • Issue comment event: 1
  • Push event: 27
  • Pull request event: 2
  • Fork event: 1

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 20
  • Total Committers: 1
  • Avg Commits per committer: 20.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 20
  • Committers: 1
  • Avg Commits per committer: 20.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Christoph Scheuch 1****h 20

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: 3 days
  • Average time to close pull requests: 2 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 3 days
  • Average time to close pull requests: 2 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 1.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • christophscheuch (1)
Pull Request Authors
  • christophscheuch (2)
Top Labels
Issue Labels
release (1)
Pull Request Labels
release (2)

Packages

  • Total packages: 1
  • Total downloads:
    • cran 156 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: uisapi

Access the UNESCO Institute for Statistics API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 156 Last month
Rankings
Dependent packages count: 27.1%
Dependent repos count: 33.3%
Average: 49.1%
Downloads: 87.0%
Last synced: 11 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v4 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 4.1 depends
  • cli >= 3.0.0 imports
  • httr2 >= 1.0.0 imports
  • jsonlite >= 1.0.0 imports
  • rlang * imports
  • tibble * imports
  • curl * suggests
  • testthat >= 3.0.0 suggests