Description Usage Arguments Details Value References See Also Examples
Detailed information about a sub-sector, which is minor classification of data, on the open-data API which is supported by National Statistical Office of Mongolia
1 | get_subsector_info(subid, try = FALSE, timeout = Inf)
|
subid |
character string, Sub-sector identification number |
try |
logical: Should the body of the function be wrapped by the function |
timeout |
positive numeric or |
The NSO server returns "HTTP error 500" frequently. Due to the server error, error handling is supported. if try is TRUE, you have to write code with error handling as shown in the example.
A data frame which has sub-sector information if the function is executed without error, but an object of class "try-error" containing the error message, if it fails. The data frame has following structure:
Row number
Sector identification number
Sub sector identification number
Sector name in Mongolian
Sector name in English
Whether or exist sub-sectors
http://opendata.1212.mn/en/doc/Api/GET-api-Sector_subid
all_tables, get_table, get_table_info, get_sector_info
1 2 3 4 | subsector_info <- get_subsector_info("976_L05", try = TRUE, timeout = 4)
if (!inherits(subsector_info, "try-error")) {
print(subsector_info)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.