Skip to content

Commit

Permalink
Merge pull request #30 from Teal-Insights/18-build-and-tie-in-a-geogr…
Browse files Browse the repository at this point in the history
…aphy-micropackage

Tie in r-econid package
  • Loading branch information
christophscheuch authored Nov 10, 2024
2 parents 4ab319f + 288a2cf commit 5e9b1f3
Show file tree
Hide file tree
Showing 13 changed files with 861 additions and 557 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
inst/doc
/doc/
/Meta/
.Rproj.user
.Rhistory
.RData
.Ruserdata
inst/doc
/doc/
/Meta/
.env
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ Imports:
rlang (>= 1.0.0)
Suggests:
curl,
jsonlite,
tibble,
devtools (>= 2.4.5),
jsonlite (>= 1.0.0),
lintr (>= 3.1.2),
quarto,
readxl (>= 1.0.0),
Expand Down
27 changes: 27 additions & 0 deletions R/sysdata.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#' Internal Counterparts Data
#'
#' This dataset is accessible through \link{ids_list_counterparts}.
#'
#' @keywords internal
"counterparts"

#' Internal Geographies Data
#'
#' This dataset is accessible through \link{ids_list_geographies}.
#'
#' @keywords internal
"geographies"

#' Internal Series Data
#'
#' This dataset is accessible through \link{ids_list_series}.
#'
#' @keywords internal
"series"

#' Internal Series-Topics Data
#'
#' This dataset is accessible through \link{ids_list_series_topics}.
#'
#' @keywords internal
"series_topics"
Binary file modified R/sysdata.rda
Binary file not shown.
126 changes: 63 additions & 63 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -1,63 +1,63 @@
---
output: github_document
---

<!-- 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%"
)
```

# wbids

<!-- badges: start -->
[![R-CMD-check](https://github.com/Teal-Insights/r-wbids/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Teal-Insights/r-wbids/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

`wbids` is an R package that provides a modern, flexible interface for accessing the World Bank’s [International Debt Statistics (IDS)](https://datacatalog.worldbank.org/search/dataset/0038015). `wbids` allows users to download, process, and analyze IDS series for multiple geographies, counterparts and specific time periods. The package is designed to work seamlessly with World Development Indicators (WDI) provided through the `wbwdi` package.

The `wbids` package relies on a redefinition of the original World Bank data: 'geographies' contain both countries and regions, while 'counterparts' include both counterpart areas and institutions. `wbids` provides a consistent mapping of identifiers and names across these different types. See the package vignette for more details on the data model: TODO: INSERT LINK TO VIGNETTE LATER

This package is a product of Teal Insights and not sponsored by or affiliated with the World Bank in any way, except for the use of the World Bank IDS API.

## Installation

You can install the development version of `wbids` like this:

```r
pak::pak("teal-insights/r-wbids")
```

## Usage

The main function `ids_get()` provides an interface to download multiple IDS series for multiple geographies and counterparts and specific date ranges.

```r
library(wbids)

ids_get(
geographies = c("ZMB", "ZAF"),
series = c("DT.DOD.DPPG.CD", "BM.GSR.TOTL.CD"),
counterparts = c("216", "231"),
start_date = 2015,
end_date = 2020
)
```

The package comes with prepared metadata about available series, geographies, counterparts, and topics:

```r
ids_list_series()
ids_list_georaphies()
ids_list_counterparts()
ids_list_series_topics()
```

This data can be used to enrich the IDS data or facilitate data discovery. For further applications, please consult [Teal Insights’ Guide to Working with the World Bank International Debt Statistics](https://teal-insights.github.io/teal_insights_guide_to_wbids/).

The interface and namings are fully consistent with World Development Indicators (WDI) data provided through the 'wbwdi' package. You can find details on [github.com/tidy-intelligence/r-wbwdi](https://github.com/tidy-intelligence/r-wbwdi).
---
output: github_document
---

<!-- 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%"
)
```

# wbids

<!-- badges: start -->
[![R-CMD-check](https://github.com/Teal-Insights/r-wbids/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/Teal-Insights/r-wbids/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

`wbids` is an R package that provides a modern, flexible interface for accessing the World Bank’s [International Debt Statistics (IDS)](https://datacatalog.worldbank.org/search/dataset/0038015). `wbids` allows users to download, process, and analyze IDS series for multiple geographies, counterparts and specific time periods. The package is designed to work seamlessly with World Development Indicators (WDI) provided through the `wbwdi` package.

The `wbids` package relies on a redefinition of the original World Bank data: 'geographies' contain both countries and regions, while 'counterparts' include both counterpart areas and institutions. `wbids` provides a consistent mapping of identifiers and names across these different types. See the package vignette for more details on the data model: TODO: INSERT LINK TO VIGNETTE LATER

This package is a product of Teal Insights and not sponsored by or affiliated with the World Bank in any way, except for the use of the World Bank IDS API.

## Installation

You can install the development version of `wbids` like this:

```r
pak::pak("teal-insights/r-wbids")
```

## Usage

The main function `ids_get()` provides an interface to download multiple IDS series for multiple geographies and counterparts and specific date ranges.

```r
library(wbids)

ids_get(
geographies = c("ZMB", "ZAF"),
series = c("DT.DOD.DPPG.CD", "BM.GSR.TOTL.CD"),
counterparts = c("216", "231"),
start_date = 2015,
end_date = 2020
)
```

The package comes with prepared metadata about available series, geographies, counterparts, and topics:

```r
ids_list_series()
ids_list_georaphies()
ids_list_counterparts()
ids_list_series_topics()
```

This data can be used to enrich the IDS data or facilitate data discovery. For further applications, please consult [Teal Insights’ Guide to Working with the World Bank International Debt Statistics](https://teal-insights.github.io/teal_insights_guide_to_wbids/).

The interface and namings are fully consistent with World Development Indicators (WDI) data provided through the 'wbwdi' package. You can find details on [github.com/tidy-intelligence/r-wbwdi](https://github.com/tidy-intelligence/r-wbwdi).
Loading

0 comments on commit 5e9b1f3

Please sign in to comment.