Package 'I14Y'

Title: Search and Get Data from the I14Y Interoperability Platform of Switzerland
Description: Search and download Swiss data and metadata from the I14Y interoperability platform of Switzerland using its public APIs <https://www.i14y.admin.ch/api/index.html>.
Authors: Felix Luginbuhl [aut, cre, cph] (ORCID: <https://orcid.org/0009-0008-6625-2899>), Felix Lorenz [ctb]
Maintainer: Felix Luginbuhl <[email protected]>
License: GPL (>= 3)
Version: 0.2.0
Built: 2026-07-11 10:58:14 UTC
Source: https://github.com/lgnbhl/I14Y

Help Index


Get a catalog by ID

Description

Calls the I14Y public API endpoint ⁠/catalogs/{catalogId}⁠.

Usage

i14y_get_catalog(id = NULL)

Arguments

id

string. The catalog identifier.

Value

A list of catalog metadata. 'NULL' when offline.


Export the DCAT representation of a catalog

Description

Calls the I14Y public API endpoint ⁠/catalogs/{catalogId}/dcat/exports/{dataFormat}⁠.

Usage

i14y_get_catalog_dcat(id = NULL, format = "RDF")

Arguments

id

string. The catalog identifier.

format

string. One of "RDF" (default), "TTL".

Value

A character string with the raw RDF/TTL document. 'NULL' when offline.


Get a single record of a catalog

Description

Calls the I14Y public API endpoint ⁠/catalogs/{catalogId}/records/{recordId}⁠.

Usage

i14y_get_catalog_record(id = NULL, recordId = NULL)

Arguments

id

string. The catalog identifier.

recordId

string. The record identifier.

Value

A list with the record metadata. 'NULL' when offline.


List records of a catalog

Description

Calls the I14Y public API endpoint ⁠/catalogs/{catalogId}/records⁠.

Usage

i14y_get_catalog_records(id = NULL)

Arguments

id

string. The catalog identifier.

Value

A tibble of catalog records. 'NULL' when offline.


Export a codelist

Description

Calls the I14Y public API endpoint ⁠/concepts/{conceptId}/codelist-entries/exports/{dataFormat}⁠.

Usage

i14y_get_codelist(id = NULL, format = "csv", withAnnotations = FALSE)

Arguments

id

string. The Id of the response data.

format

string. The format of the export ("csv" or "json").

withAnnotations

logical. If 'TRUE', annotations are included in the export. Default 'FALSE'.

Value

A tibble for 'format = "csv"'. For 'format = "json"', a list when 'withAnnotations = TRUE' (preserves the nested structure) or a tibble otherwise. 'NULL' when offline.

Examples

i14y_get_codelist(
  id = "08d94604-e058-62a2-aa25-53f84b974201" # for DV_NOGA_DIVISION
)

Get a concept by ID

Description

Calls the I14Y public API endpoint ⁠/concepts/{conceptId}⁠ and returns the concept metadata. Multilingual fields ('name', 'description', ...) are returned with one entry per language (de, en, fr, it, rm).

Usage

i14y_get_concept(id = NULL, includeCodeListEntries = FALSE)

Arguments

id

string. The UUID of the concept.

includeCodeListEntries

logical. If 'TRUE', the response includes the codelist entries for code-list concepts. Default 'FALSE'.

Value

A list with the concept metadata. 'NULL' when offline.

Examples

i14y_get_concept(
  id = "08d94604-e058-62a2-aa25-53f84b974201" # DV_NOGA_DIVISION
)

Get the JSON export of a concept

Description

Calls the I14Y public API endpoint ⁠/concepts/{conceptId}/exports/json⁠.

Usage

i14y_get_concept_export(id = NULL)

Arguments

id

string. The UUID of the concept.

Value

A list with the JSON export of the concept. 'NULL' when offline.


Get a data service by ID

Description

Calls the I14Y public API endpoint ⁠/dataservices/{dataServiceId}⁠.

Usage

i14y_get_dataservice(id = NULL)

Arguments

id

string. The UUID of the data service.

Value

A list with the data service metadata. 'NULL' when offline.


Get dataset metadata by ID

Description

Calls the I14Y public API endpoint ⁠/datasets/{datasetId}⁠ and returns the dataset metadata: publication level, registration status, distributions, contact points, themes, etc.

Usage

i14y_get_dataset(id = NULL)

Arguments

id

string. The UUID of the dataset.

Value

A list with the dataset metadata. 'NULL' when offline.

Examples

i14y_get_dataset(
  id = "b902add5-9538-47ed-b663-f9fbfac92381" # SpiGes_Administratives
)

Export the data structure of a dataset

Description

Calls the I14Y public API endpoint ⁠/datasets/{datasetId}/structures/exports/{dataFormat}⁠. The endpoint returns a SHACL/RDF graph in one of the supported linked-data formats. Note that many datasets do not have a published structure and will return an empty result.

Usage

i14y_get_dataset_structure(id = NULL, format = "JsonLd")

Arguments

id

string. The UUID of the dataset.

format

string. The export format. One of "JsonLd" (default), "Ttl" or "Rdf".

Value

For 'format = "JsonLd"', the parsed JSON-LD graph as a list. For other formats, the raw response body as a character string. 'NULL' when offline.

Examples

i14y_get_dataset_structure(
  id = "b902add5-9538-47ed-b663-f9fbfac92381" # SpiGes_Administratives
)

Get a mapping table by ID

Description

Calls the I14Y public API endpoint ⁠/mappingtables/{mappingTableId}⁠.

Usage

i14y_get_mappingtable(id = NULL)

Arguments

id

string. The UUID of the mapping table.

Value

A list with the mapping table metadata. 'NULL' when offline.


Export the relations of a mapping table

Description

Calls the I14Y public API endpoint ⁠/mappingtables/{mappingTableId}/relations/exports/{dataFormat}⁠.

Usage

i14y_get_mappingtable_relations(id = NULL, format = "Json")

Arguments

id

string. The UUID of the mapping table.

format

string. One of "Json" (default), "Csv".

Value

For 'format = "Json"', a tibble of relations (one row per source/target/relationType triple). For 'format = "Csv"', the raw CSV response body as a character string. 'NULL' when offline.


Get a public service by ID

Description

Calls the I14Y public API endpoint ⁠/publicservices/{publicServiceId}⁠.

Usage

i14y_get_publicservice(id = NULL)

Arguments

id

string. The UUID of the public service.

Value

A list with the public service metadata. 'NULL' when offline.


List catalogs

Description

Calls the I14Y public API endpoint ⁠/catalogs⁠.

Usage

i14y_list_catalogs(page = NULL, pageSize = NULL)

Arguments

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of catalog summaries. 'NULL' when offline.


List concepts

Description

Calls the I14Y public API endpoint ⁠/concepts⁠.

Usage

i14y_list_concepts(
  conceptIdentifier = NULL,
  publisherIdentifier = NULL,
  version = NULL,
  publicationLevel = NULL,
  registrationStatus = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

conceptIdentifier

string. Filter by concept identifier.

publisherIdentifier

string. Filter by publisher identifier.

version

string. Filter by version.

publicationLevel

string. One of "Internal", "Public".

registrationStatus

string. A registration status value.

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of concept summaries. 'NULL' when offline.


List data services

Description

Calls the I14Y public API endpoint ⁠/dataservices⁠.

Usage

i14y_list_dataservices(
  accessRights = NULL,
  dataServiceIdentifier = NULL,
  publisherIdentifier = NULL,
  publicationLevel = NULL,
  registrationStatus = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

accessRights

string. Filter by access rights.

dataServiceIdentifier

string. Filter by data service identifier.

publisherIdentifier

string. Filter by publisher identifier.

publicationLevel

string. One of "Internal", "Public".

registrationStatus

string. A registration status value.

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of data service summaries. 'NULL' when offline.


List datasets

Description

Calls the I14Y public API endpoint ⁠/datasets⁠.

Usage

i14y_list_datasets(
  accessRights = NULL,
  datasetIdentifier = NULL,
  publisherIdentifier = NULL,
  publicationLevel = NULL,
  registrationStatus = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

accessRights

string. Filter by access rights.

datasetIdentifier

string. Filter by dataset identifier.

publisherIdentifier

string. Filter by publisher identifier.

publicationLevel

string. One of "Internal", "Public".

registrationStatus

string. A registration status value.

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of dataset summaries. 'NULL' when offline.


List mapping tables

Description

Calls the I14Y public API endpoint ⁠/mappingtables⁠.

Usage

i14y_list_mappingtables(
  mappingTableIdentifier = NULL,
  publisherIdentifier = NULL,
  version = NULL,
  codeSystemUri = NULL,
  publicationLevel = NULL,
  registrationStatus = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

mappingTableIdentifier

string. Filter by mapping table identifier.

publisherIdentifier

string. Filter by publisher identifier.

version

string. Filter by version.

codeSystemUri

string. Filter by code system URI.

publicationLevel

string. One of "Internal", "Public".

registrationStatus

string. A registration status value.

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of mapping table summaries. 'NULL' when offline.


List public services

Description

Calls the I14Y public API endpoint ⁠/publicservices⁠.

Usage

i14y_list_publicservices(
  publicServiceIdentifier = NULL,
  publisherIdentifier = NULL,
  publicationLevel = NULL,
  registrationStatus = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

publicServiceIdentifier

string. Filter by public service identifier.

publisherIdentifier

string. Filter by publisher identifier.

publicationLevel

string. One of "Internal", "Public".

registrationStatus

string. A registration status value.

page

integer. The result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of public service summaries. 'NULL' when offline.


Search the catalog for datasets, data services and public services.

Description

Thin wrapper around [i14y_search()] that restricts the result to the catalog resource types ("Dataset", "DataService", "PublicService").

Usage

i14y_search_catalog(
  query = NULL,
  language = "de",
  accessRights = NULL,
  formats = NULL,
  publishers = NULL,
  statuses = NULL,
  themes = NULL,
  types = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

query

string. The search query.

language

string. The language to use for the search.

accessRights

character vector. Filter by access rights.

formats

character vector. Filter by distribution formats.

publishers

character vector. Filter by publisher identifiers.

statuses

character vector. Filter by registration status. Forwarded to the 'registrationStatuses' parameter of [i14y_search()].

themes

character vector. Filter by theme codes.

types

character vector. Restrict to a subset of catalog types. One or more of "Dataset", "DataService", "PublicService". Defaults to all three.

page

integer. The number of the result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of catalog search results. 'NULL' when offline.

Examples

i14y_search_catalog(query = "noga")

Search entries within a codelist concept

Description

Calls the I14Y public API endpoint ⁠/concepts/{conceptId}/codelist-entries/search⁠. This replaces the former 'i14y_search_nomenclature()': in the new I14Y data model, what used to be a single multi-level nomenclature is now a set of separate codelist concepts (e.g. 'NOGA_SECTION', 'NOGA_DIVISION', 'NOGA_GROUP', 'NOGA_CLASS').

Usage

i14y_search_codelist(
  id = NULL,
  query = NULL,
  language = "de",
  filters = NULL,
  page = NULL,
  pageSize = NULL
)

Arguments

id

string. The UUID of the codelist concept.

query

string. The search query. If 'NULL', all entries are returned (subject to 'filters', 'page' and 'pageSize').

language

string. The language of the response data ("de", "fr", "en", "it", "rm"). Default "de".

filters

character vector. Optional filter expressions, passed through to the API as the 'filters' array parameter.

page

integer. The number of the result page to return.

pageSize

integer. The size of each result page.

Value

A tibble of codelist entry summaries. 'NULL' when offline.

Examples

i14y_search_codelist(
  id = "08d94604-e058-62a2-aa25-53f84b974201", # NOGA_DIVISION
  query = "agriculture",
  language = "fr"
)

Search for a Concept Summary

Description

Thin wrapper around [i14y_search()] that restricts the result to the "Concept" resource type.

Usage

i14y_search_concept(
  query = NULL,
  language = "de",
  page = 1,
  pageSize = 1000,
  publishers = NULL,
  themes = NULL,
  conceptValueTypes = NULL,
  registrationStatuses = NULL
)

Arguments

query

string. Search query.

language

string. The language of the response data.

page

integer. The number of the result page to return.

pageSize

integer. The size of each result page.

publishers

character vector. Filter by publisher identifiers.

themes

character vector. Filter by theme codes.

conceptValueTypes

character vector. One or more concept value types to filter by ("CodeList", "Date", "Numeric", "String").

registrationStatuses

character vector. One or more registration statuses to filter by.

Value

A tibble of concept search results. 'NULL' when offline.

Examples

i14y_search_concept(query = "noga", language = "en")