https://github.com/temuulene/mongolstats
Tidy access to Mongolian NSO Open Data and admin boundaries
https://github.com/temuulene/mongolstats
api mongolia nso opendata r r-package rstats
Last synced: 9 months ago
JSON representation
Tidy access to Mongolian NSO Open Data and admin boundaries
- Host: GitHub
- URL: https://github.com/temuulene/mongolstats
- Owner: temuulene
- License: other
- Created: 2025-09-30T04:32:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T06:18:42.000Z (9 months ago)
- Last Synced: 2025-09-30T06:23:54.095Z (9 months ago)
- Topics: api, mongolia, nso, opendata, r, r-package, rstats
- Language: R
- Homepage: https://temuulene.github.io/mongolstats
- Size: 3.07 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Citation: CITATION.cff
Awesome Lists containing this project
README
---
output: github_document
---
# mongolstats
Tidy access to the National Statistics Office of Mongolia (NSO) statistics via the PXWeb API (data.1212.mn) and Mongolia administrative boundaries, inspired by tidycensus.
## Installation
`
# install.packages("devtools")
devtools::install_github("temuulene/mongolstats")
`
## Quick start
`
library(mongolstats)
library(dplyr)
# Use PXWeb API (data.1212.mn)
nso_options(mongolstats.lang = "en")
# List available tables
itms <- nso_itms()
itms %>% select(tbl_id, tbl_eng_nm, strt_prd, end_prd) %>% slice_head(n = 5)
# Inspect variables (codebook) for a table
vars <- nso_itms_detail("DT_NSO_0300_001V2")
vars %>% count(field)
# Fetch data
dat <- nso_data(
tbl_id = "DT_NSO_0300_001V2",
selections = list(Sex = "Total", Age = "Total", Year = "2024")
)
dat %>% slice_head(n = 6)
`