This function takes:

  • A table code (e.g. "np3106rr"),

  • A list of parameters (one for each dimension),

  • The table_info_long metadata (with dimension codes in the needed order),

  • (Optionally) a language code (default "en").

resolve_href(table_code, param_list, table_info_long, lang = "en")

Arguments

table_code

Character: an 8-character code for the table, e.g. "np3106rr"

param_list

List: user-supplied dimension selections, in the order of the table's dimensions

table_info_long

A data frame of metadata (long format) for the given table

lang

Character: the language code ("en" or "sk"), default "en"

Value

Character string suitable for appending after the table code in the SUSR dataset endpoint.

Details

It then:

  1. Expands special keywords, such as "last5" or "districts",

  2. Checks them against the actual available dimension values via susr_dimension_values(),

  3. Discards any invalid codes, warns the user,

  4. If no valid codes remain, attempts to use "all" if available, otherwise the first available value for that dimension, and warns the user.

Finally, it returns a single string of the form: "VAL11,VAL12/.../VALN1,VALN2" for use in the dataset endpoint call.