| mn_codes | R Documentation |
Returns the table behind every map in the package: one row per unit, from the country down to bags and khoroos, with its codes, names and place in the hierarchy. Use it to look up codes, to build your own crosswalks, or to see which units have a boundary.
mn_codes(level = NULL, within = NULL, aliases = FALSE, lang = NULL)
level |
Levels to return (see |
within |
Keep only units inside this parent (a name or code). |
aliases |
If |
lang |
Language of the |
Units are identified by pcode, a code that is unique across levels:
"MN" for the country, "MNR1" to "MNR5" for the economic regions
(Western, Khangai, Central, Eastern, Ulaanbaatar);
"MN" + the two-digit NSO aimag code for aimags ("MN84" Khovd,
"MN11" Ulaanbaatar);
two more digits for soums and Ulaanbaatar districts ("MN8401"), and
two more for bags and khoroos ("MN110751").
These match the P-codes of the humanitarian Common Operational Dataset
and are the NSO statistical codes without their leading region digit
(nso_code, as used in NSO PXWeb tables).
The type column separates units that share a level: "capital"
(Ulaanbaatar) among aimags; "district" and "village" among soums;
"khoroo" among bags. Villages (tosgon) and rural bags have codes and
statistics but no boundary (has_geometry is FALSE).
A tibble. With aliases = FALSE: the columns of every admin map
(see mn_admin()) plus has_geometry. With aliases = TRUE: pcode,
level, name_en, alias and source.
Other names and codes:
mn_match(),
mn_translit()
mn_codes("aimag")
mn_codes("soum", within = "Khovd")
mn_codes("aimag", aliases = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.