Provides an overview of all resources available from opendata.nhs.scot, with the option to limit results based on both dataset and resource names. The returned tibble can be used to look-up dataset and resource ids, and is useful for exploring the available data sets.

list_resources(
  dataset_contains = NULL,
  resource_contains = NULL,
  dataset_name = lifecycle::deprecated()
)

Arguments

dataset_contains

A character string containing an expression to be used as search criteria against the dataset name.

resource_contains

A character string containing a regular expression to be matched against available resource names.

dataset_name

Deprecated. Use dataset_contains instead.

Value

A tibble containing details of all available datasets and resources, or those containing the string specified in the dataset_contains and resource_contains arguments.

Examples


list_resources()
#> # A tibble: 1,144 × 7
#>    resource_name         resource_id dataset_name dataset_title dataset_id url  
#>    <chr>                 <chr>       <chr>        <chr>         <chr>      <chr>
#>  1 Data by Dispenser Lo… 5f043536-a… prescriptio… Prescription… 84393984-… http…
#>  2 Data by Prescriber L… bd7cebe2-a… prescriptio… Prescription… 84393984-… http…
#>  3 Data by Board – Janu… aae4fa1c-9… prescriptio… Prescription… 84393984-… http…
#>  4 Data by Dispenser Lo… ab0771bf-d… prescriptio… Prescription… 84393984-… http…
#>  5 Data by Prescriber L… 4f93bdea-a… prescriptio… Prescription… 84393984-… http…
#>  6 Data by Dispenser Lo… 699a7c07-f… prescriptio… Prescription… 84393984-… http…
#>  7 Data by Prescriber L… 1bbd2cc6-0… prescriptio… Prescription… 84393984-… http…
#>  8 Data by Dispenser Lo… d254b631-c… prescriptio… Prescription… 84393984-… http…
#>  9 Data by Prescriber L… 58b00c0f-3… prescriptio… Prescription… 84393984-… http…
#> 10 Data by Dispenser Lo… f9a53733-b… prescriptio… Prescription… 84393984-… http…
#> # ℹ 1,134 more rows
#> # ℹ 1 more variable: last_modified <dttm>
list_resources(dataset_contains = "standard-populations")
#> # A tibble: 4 × 7
#>   resource_name          resource_id dataset_name dataset_title dataset_id url  
#>   <chr>                  <chr>       <chr>        <chr>         <chr>      <chr>
#> 1 European Standard Pop… edee9731-d… standard-po… Standard Pop… 4dd86111-… http…
#> 2 European Standard Pop… 29ce4cda-a… standard-po… Standard Pop… 4dd86111-… http…
#> 3 World Standard Popula… e27533df-a… standard-po… Standard Pop… 4dd86111-… http…
#> 4 World Standard Popula… 2f493d21-f… standard-po… Standard Pop… 4dd86111-… http…
#> # ℹ 1 more variable: last_modified <dttm>
list_resources(
  dataset_contains = "standard-populations", resource_contains = "European"
)
#> # A tibble: 2 × 7
#>   resource_name          resource_id dataset_name dataset_title dataset_id url  
#>   <chr>                  <chr>       <chr>        <chr>         <chr>      <chr>
#> 1 European Standard Pop… edee9731-d… standard-po… Standard Pop… 4dd86111-… http…
#> 2 European Standard Pop… 29ce4cda-a… standard-po… Standard Pop… 4dd86111-… http…
#> # ℹ 1 more variable: last_modified <dttm>