Skip to contents

This function is very handy when needing to either validate or simply "fill in gaps" with autocompletion from the API.

Usage

autocomplete(section, input, ...)

Arguments

section

Defines what section of the api should be called. available_sections() exposes all options for this parameter.

input

The input to autocomplete. Could be a name, a place and similar.

...

<dynamic-dots> input query parameters.

Value

Returns the autocomplete information for the provided section given the input.

Examples

autocomplete("regioner", "midt")
#> [[1]]
#> [[1]]$tekst
#> [1] "1082 Region Midtjylland"
#> 
#> [[1]]$region
#> [[1]]$region$ændret
#> [1] "2024-10-11T21:03:05.131Z"
#> 
#> [[1]]$region$geo_version
#> [1] 43
#> 
#> [[1]]$region$geo_ændret
#> [1] "2024-10-11T21:03:05.131Z"
#> 
#> [[1]]$region$bbox
#> [[1]]$region$bbox[[1]]
#> [1] 8.078876
#> 
#> [[1]]$region$bbox[[2]]
#> [1] 55.64438
#> 
#> [[1]]$region$bbox[[3]]
#> [1] 11.66419
#> 
#> [[1]]$region$bbox[[4]]
#> [1] 56.84326
#> 
#> 
#> [[1]]$region$visueltcenter
#> [[1]]$region$visueltcenter[[1]]
#> [1] 9.605032
#> 
#> [[1]]$region$visueltcenter[[2]]
#> [1] 56.23399
#> 
#> 
#> [[1]]$region$dagi_id
#> [1] "389101"
#> 
#> [[1]]$region$kode
#> [1] "1082"
#> 
#> [[1]]$region$navn
#> [1] "Region Midtjylland"
#> 
#> [[1]]$region$nuts2
#> [1] "DK04"
#> 
#> [[1]]$region$href
#> [1] "https://api.dataforsyningen.dk/regioner/1082"
#> 
#> 
#>