Skip to contents

Fetches the possible filtering values for a given source, year, and NUTS level.

Usage

mi_source_filters(source_name, year, level, filters = list(), limit = 40)

Arguments

source_name

A character string specifying the source name (f_resource).

year

A character or integer specifying the year.

level

A character string specifying the NUTS level ("0", "1", "2", or "3").

filters

A named list where the names are the filter fields and the values are the selected values for those fields. Default is an empty list.

limit

An integer specifying the maximum number of results to return. Default is 2000.

Value

A tibble with the fields, labels, and their possible values for filtering.

Examples

# \donttest{
mi_source_filters(
  source_name = "DEMO_R_FIND2",
  year = 2020,
  level = "2",
  filters = list(unit = "YR")
)
#> # A tibble: 4 × 4
#>   field    field_label           label                             value     
#>   <chr>    <chr>                 <chr>                             <chr>     
#> 1 unit     Unit of measure       Year                              YR        
#> 2 indic_de Demographic indicator Mean age of women at childbirth   AGEMOTH   
#> 3 indic_de Demographic indicator Median age of women at childbirth MEDAGEMOTH
#> 4 freq     Time frequency        Annual                            A         
# }