all_tables: Brief Information about All Database Tables

Description Usage Arguments Details Value References See Also Examples

Description

Brief information about all available database tables on the open-data API which is supported by National Statistical Office of Mongolia (NSO)

Usage

1
all_tables(try = FALSE, timeout = Inf, na.rm = FALSE)

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.

na.rm

logical: If TRUE, it removes empty rows in a data frame which is result of this function.

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 brief information of all available database tables 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 number

tbl_id

Table identification number

tbl_nm

Table name in Mongolian

tbl_eng_nm

Table name in English

unit_id

Unit code

cd_nm

Unit name in Mongolian

cd_eng_nm

Unit name in English

strt_prd

Start date

end_prd

Finish date

prd_se

Time frequency

lst_chn_de

Last update date

References

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

See Also

get_table, get_table_info, get_sector_info

Examples

1
2
3
4
all.tables <- all_tables(try = TRUE, timeout = 4)
if (!inherits(all.tables, "try-error")) {
  str(all.tables)
}

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