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]
Maintainer: Felix Luginbuhl <[email protected]>
License: GPL (>= 3)
Version: 0.1.1
Built: 2025-03-06 09:23:37 UTC
Source: https://github.com/lgnbhl/i14y

Help Index


Export a codelist

Description

The function uses the I14Y Console API: <https://apiconsole.i14y.admin.ch/public/v1/index.html>.

Usage

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

Arguments

id

string. The Id of the response data.

format

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

Value

a tibble

Examples

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

Get Concept view entity by ID

Description

Get Concept view entity by ID

Usage

i14y_get_concept(id = NULL, language = "de")

Arguments

id

string. The Id of the response data.

language

string. The language of the response data.

Value

a list

Examples

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

Get all versions of an ID

Description

Get all versions of an ID

Usage

i14y_get_concept_all_versions(id = NULL, language = "de")

Arguments

id

string. The Id of the response data.

language

string. The language of the response data.

Value

a list

Examples

i14y_get_concept_all_versions(
 id = "08d94604-e058-62a2-aa25-53f84b974201", # DV_NOGA_DIVISION
 language = "de"
)

Get the information of a nomenclature by identifier

Description

Get the information of a nomenclature by identifier

Usage

i14y_get_content_information(identifier = NULL)

Arguments

identifier

string. The identifier of the nomenclature.

Value

a list

Examples

i14y_get_content_information(
  identifier = "HCL_CH_ISCO_19_PROF"
)

Get a data element

Description

Get a data element

Usage

i14y_get_data_element(id = NULL, language = "de")

Arguments

id

string. The id of the sms used variable.

language

string. The language of the response data.

Value

a tibble i14y_get_data_element( id = "af3b5919-0012-42ac-bbdd-24b591279899", language = "en" )


Get the dcat data service.

Description

Get the dcat data service.

Usage

i14y_get_data_service(id = NULL, language = "de")

Arguments

id

string. The id of the dcat data service.

language

string. The language of the response data.

Value

a list

Examples

i14y_get_data_service(
 id = "0aaed69d-15ff-415a-8a38-4f9f0c3b429e",
 language = "en"
)

Get the current registration status of the specified dataservice.

Description

Get the current registration status of the specified dataservice.

Usage

i14y_get_data_service_registration(id = NULL)

Arguments

id

string. The id of the dcat data service.

Value

a list

Examples

i14y_get_data_service_registration(
 id = "0aaed69d-15ff-415a-8a38-4f9f0c3b429e"
)

Get the dataStructures

Description

Get the dataStructures

Usage

i14y_get_data_structure(identifier = NULL, language = "de")

Arguments

identifier

string. The identifier of the dcat dataset.

language

string. The language of the response data.

Value

a list

Examples

df <- i14y_get_data_structure(
  identifier = "SpiGes_Erhebung_Administratives"
)

Get dataset description by identifier

Description

Get dataset description by identifier

Usage

i14y_get_dataset_description(identifier = NULL, language = "de")

Arguments

identifier

string. The identifier of the dcat dataset.

language

string. The language of the response data.

Value

a list

Examples

i14y_get_dataset_description(identifier = "HCL_NOGA",  language = "en")

Get dataset distributions by identifier

Description

Get dataset distributions by identifier

Usage

i14y_get_dataset_distributions(identifier = NULL, language = "de")

Arguments

identifier

string. The identifier of the dcat dataset.

language

string. The language of the response data.

Value

a list

Examples

i14y_get_dataset_distributions(identifier = "HCL_NOGA",  language = "en")

Export a level of a nomenclature

Description

Export a level of a nomenclature

Usage

i14y_get_nomenclature_level(
  identifier = NULL,
  language = "de",
  level = 1,
  format = "csv",
  annotations = FALSE,
  filters = NULL
)

Arguments

identifier

string. The identifier of dcat dataset.

language

string. The language of the response data.

level

integer. The level to export. Default 1.

format

string. The format of the export (CSV or XLSX).

annotations

boolean. Include annotations. Default FALSE.

filters

object. The filters

Value

a tibble


Export multiple levels of a nomenclature

Description

Export multiple levels of a nomenclature

Usage

i14y_get_nomenclature_level_multiple(
  identifier = NULL,
  language = "de",
  levelFrom = NULL,
  levelTo = NULL,
  format = "csv",
  annotations = NULL,
  filters = NULL
)

Arguments

identifier

string. The identifier of dcat dataset.

language

string. The language of the response data. Default "de".

levelFrom

integer. The first level to include.

levelTo

integer. The last level to include.

format

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

annotations

boolean. Include annotations

filters

object. The filters

Value

a tibble

Examples

i14y_get_nomenclature_level_multiple(
  identifier = "HCL_CH_ISCO_19_PROF",
  format = "csv", # read internally
  levelFrom = 1,
  levelTo = 2,
  language = "fr"
 )

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

Description

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

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

vector of strings. Only results with one of the specified access rights (PUBLIC, NON_PUBLIC, RESTRICTED) are returned

formats

vector of strings. Only results with at least one distribution providing one of the specified formats are returned

publishers

vector of strings. Only results with one of the specified publishers are returned

statuses

vector of strings. Only results with one of the specified registration statuses are returned

themes

vector of strings. Only results corresponding to one of the specified themes are returned

types

vector of strings. Only results with one of the specified types (Dataset, DataService, PublicService) are returned

page

integer. The number of the result page to return

pageSize

integer. The size of each result page

Value

a tibble

Examples

i14y_search_catalog(query = "noga")

Search for a Concept Summary

Description

Search for a Concept Summary

Usage

i14y_search_concept(
  search = NULL,
  language = "de",
  page = 1,
  pageSize = 1000,
  publishers = NULL,
  themeCodes = NULL
)

Arguments

search

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

vector of strings. Filter with Publishers identifiers.

themeCodes

vector of strings. Filter with theme codes.

Value

a tibble

Examples

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

Search within a nomenclature

Description

Search within a nomenclature

Usage

i14y_search_nomenclature(
  identifier = NULL,
  query = NULL,
  language = "de",
  page = NULL,
  pageSize = NULL,
  filters = NULL
)

Arguments

identifier

string. The identifier of dcat dataset.

query

string. The 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

filters

object. The filters

Value

a list