Description Usage Arguments Details Value Functions References See Also Examples
It downloads a database table, which contains statistical data, from the open-data API which is supported by National Statistical Office of Mongolia (NSO).
1 2 3 4 5 6 7 8 9 10 11 |
tbl_id |
character string, Table identification number |
PERIOD |
character vector, Time |
CODE, CODE1, CODE2 |
character vector, Classification code (age, gender etc) |
try |
logical: Should the main body of the function be wrapped by the function |
timeout |
positive numeric or |
start, end |
Starting and stopping moments of period which has following formats: "YYYY", "YYYYMM", "YYYYMMDD", "YYYYQQ". Notations YYYY, MM, DD and QQ, respectively, indicate year, month, day and quarter of a date. These are written as a number has a leading zero, if necessary. |
period |
One of single characters "Y" (default), "M", "D" and "Q" which represent periods yearly, monthly, daily and quarterly respectively. There is one more value "F" which is supported by the API. However it can not be used for such function due to there is not a fixed rule for this type of periods. |
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 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
Time
Classification code
Classification name in Mongolian
Classification name in English
Classification code
Classification name in Mongolian
Classification name in English
Classification code
Classification name in Mongolian
Classification name in English
Datum
a character vector which contains an API compatible period.
make_period
: It is used to prepare values for the argument PERIOD
of the function get_table.
http://opendata.1212.mn/en/doc/Api/POST-api-Data
all_tables, get_table_info, get_sector_info
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.