https://github.com/m-muecke/isocountry
R package containing ISO codes for countries and currencies
https://github.com/m-muecke/isocountry
country-codes currency-codes data iso-3166-1 iso-4217 r r-package
Last synced: 2 months ago
JSON representation
R package containing ISO codes for countries and currencies
- Host: GitHub
- URL: https://github.com/m-muecke/isocountry
- Owner: m-muecke
- License: other
- Created: 2022-09-25T14:47:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T21:32:18.000Z (3 months ago)
- Last Synced: 2025-03-15T01:42:59.652Z (2 months ago)
- Topics: country-codes, currency-codes, data, iso-3166-1, iso-4217, r, r-package
- Language: R
- Homepage: https://m-muecke.github.io/isocountry/
- Size: 7.84 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```# isocountry
[](https://github.com/m-muecke/isocountry/actions/workflows/R-CMD-check.yaml)
[](https://CRAN.R-project.org/package=isocountry)This package contains the following datasets:
- `isocountry`: dataset resulting from merging the [ISO-3166](https://en.wikipedia.org/wiki/ISO_3166-1) and the [UN Region Codes](https://unstats.un.org/unsd/methodology/m49/overview).
- `isocurrency`: [ISO 4217](https://www.iban.com/currency-codes) currency codes combined with [ISO 3166](https://www.iban.com/country-codes) country codes for easy joining.Package is insipred by the [ISO-3166-Countries-with-Regional-Codes](https://github.com/lukes/ISO-3166-Countries-with-Regional-Codes) project.
## Installation
You can install the released version of **isocountry** from [CRAN](https://CRAN.R-project.org) with:
```{r, eval = FALSE}
install.packages("isocountry")
```And the development version from [GitHub](https://github.com/) with:
```{r, eval = FALSE}
# install.packages("pak")
pak::pak("m-muecke/isocountry")
```## Usage
```{r, message = FALSE}
library(dplyr)
library(isocountry)isocountry |>
left_join(isocurrency, by = join_by(alpha_2 == country_code))
```