get_sector_info: Detailed Information about All Main Sectors

Description Usage Arguments Details Value References See Also Examples

Description

Detailed information about all main sectors, which are major classification of data, on the open-data API which is supported by National Statistical Office of Mongolia (NSO)

Usage

1
get_sector_info(try = FALSE, timeout = Inf)

Arguments

try

logical: Should the body of the function be wrapped by the function try? See details.

timeout

positive numeric or Inf: The number of seconds to wait for a response from the NSO server. Can not be less than 1 ms or 0.001 s.

Details

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.

Value

A data frame which has 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:

rownum

Row number

list_id

Sector identification number

up_list_id

Sub sector identification number

list_nm

Sector name in Mongolian

list_eng_nm

Sector name in English

isExist

Whether or exist sub-sectors

References

http://opendata.1212.mn/en/doc/Api/GET-api-Sector

See Also

all_tables, get_table, get_table_info, get_subsector_info

Examples

1
2
3
4
sector_info <- get_sector_info(try = TRUE, timeout = 4)
if (!inherits(sector_info, "try-error")) {
  print(sector_info)
}

NSO1212 documentation built on Sept. 29, 2021, 9:07 a.m.