R/retrieveCorrespondenceTable..R
retrieveCorrespondenceTable.Rd
Retrieve a correspondence tables from CELLAR and FAO.
retrieveCorrespondenceTable(
prefix,
endpoint,
ID_table,
language = "en",
CSVout = FALSE
)
The SPARQL instruction for a declaration of a namespace prefix. It can be found using the classEndpoint() function.
The SPARQL Endpoint, the valid values are "CELLAR"
or "FAO"
.
The ID of the correspondence table which can be found using the correspondenceList() function.
Language of the table. By default is set to "en". This is an optional argument.
The valid values are FALSE
or TRUE
. In both cases the correspondence table as an R object.
If output should be saved as a csv file, the argument should be set as TRUE
. By default, no csv file is produced.
retrieveCorrespondenceTable()
returns a classification tables from CELLAR and FAO. The table includes the following variables:
Source Classification name (e.g. cn2019): the code of each object in the source classification
Source Classification label: the corresponding label of each object
Target Classification name (e.g. cn2021): the code of each object in the target classification
Target Classification label: the corresponding label of each object
Comment: details on each object, if available
URL: the URL from which the SPARQL query was retrieved
{
endpoint = "CELLAR"
prefix = "nace2"
ID_table = "NACE2_PRODCOM2021"
language = "fr"
dt = retrieveCorrespondenceTable(prefix, endpoint, ID_table, language)
head(dt)
}
#> NACE2 Label_NACE2 PRODCOM2021
#> 1 710 07.10 Extraction de minerais de fer 710
#> 2 710 07.10 Extraction de minerais de fer 71010
#> 3 710 07.10 Extraction de minerais de fer 7101010
#> 4 710 07.10 Extraction de minerais de fer 7101020
#> 5 729 07.29 Extraction d'autres minerais de métaux non ferreux 729
#> 6 729 07.29 Extraction d'autres minerais de métaux non ferreux 72911
#> Label_PRODCOM2021
#> 1 07.10 Extraction de minerais de fer
#> 2 07.10.10 Minerais de fer
#> 3 07.10.10.10 Minerais de fer et leurs concentrés, non agglomérés (à l''exclusion des pyrites de fer grillées
#> 4 07.10.10.20 Minerais de fer et leurs concentrés, agglomérés (à l''exclusion des pyrites de fer grillées)
#> 5 07.29 Extraction d'autres minerais de métaux non ferreux
#> 6 07.29.11 Minerais de cuivre
#> Comment URL
#> 1 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0710
#> 2 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0710
#> 3 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0710
#> 4 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0710
#> 5 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0729
#> 6 NA http://data.europa.eu/ux2/nace2/NACE2_PRODCOM2021_0729