Skip to contents

Get data from section

Usage

get_data(section, as_list = FALSE)

Arguments

section

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

as_list

Wether or not to return the data as a list or in a dataframe. Data.frame is the default output.

Value

Returns either a dataframe with all the data for the specified section or a list with the same information.

Examples

x <- get_data("regioner")
head(x)
#>   dagi_id kode               navn nuts2                   ændret
#> 1  389098 1081 Region Nordjylland  DK05 2024-02-05T22:01:25.064Z
#> 2  389101 1082 Region Midtjylland  DK04 2024-02-05T22:01:25.064Z
#> 3  389102 1083  Region Syddanmark  DK03 2024-02-05T22:01:25.064Z
#> 4  389099 1084 Region Hovedstaden  DK01 2024-02-05T22:01:25.064Z
#> 5  389100 1085    Region Sjælland  DK02 2024-01-16T22:03:35.709Z
#>                 geo_ændret geo_version bbox_xmin bbox_ymin bbox_xmax bbox_ymax
#> 1 2024-02-05T22:01:25.064Z          31  8.189517  56.53455  11.22599  57.76025
#> 2 2024-02-05T22:01:25.064Z          41  8.078876  55.64438  11.66419  56.84326
#> 3 2024-02-05T22:01:25.064Z          31  8.063203  54.71828  10.99555  55.95325
#> 4 2024-02-05T22:01:25.064Z          30 11.602116  54.98355  15.31831  56.20520
#> 5 2024-01-16T22:03:35.709Z          26 10.814805  54.54441  12.64552  56.01731
#>   visueltcenter_x visueltcenter_y
#> 1       10.112829        57.30716
#> 2        9.605032        56.23399
#> 3        9.028461        55.56317
#> 4       12.279374        55.97239
#> 5       11.621319        55.43979