The "Countries and territories" dataset contains an extensive set of information that has been validated and checked to make it easier to use in a wide range of applications and context. The dataset is managed like a graph database, using dedicated storage and a specific query language to facilitate direct access via a web service. To make it easier to consult the data, it is also published in table form on the EU Vocabularies website.
The following wiki pages resume a set of links to directly retrieves the data in different formats (HTML, JSON and CSV) to help users having an easy access to their last updated version.
The CSV files can be uploaded into Excel, while the links retrieving JSON can be directly included in external systems to use the data.
Note: the data are directly retrieved from the triplestore of the Publications Office (Cellar). The technical documentation attached to this page gives some information to develop any kind of custom query.
The following queries retrieve the official published data directly from the main triple store of the Publication.
- The following queries retrieve the official published data directly from the main triple store of the Publication.
- 1.0 - Current countries, their related english (preferred) labels and their ISO codes:
- 2.0 All countries and territories available in the dataset (including historical data)
- 3.0 Current EU Member states
-
4.0 Retrieving new information and data
- 4.1 Procedure to retrieve the data from Cellar:
- 4.2 UN Members (English preferred labels):
- 4.3 UN Members (all EU languages):
- 4.4 UN observers:
- 4.5 Disputed territories:
- 4.6 Territories and marine areas:
- 4.7 Current countries, their related ISO and Interinstitutional Style Guide codes:
- 4.8 Current countries, territories and marines areas and their related ISO codes:
- 4.9 Current EU member states, their official code, their preferred labels in english and their ISO codes:
- 4.10 Current OECD member states, their official code, their preferred labels in english and their ISO codes:
- 4.11 All countries, territories and marine areas, their official code, their preferred labels in english, their ISO codes and their status:
1.0 - Current countries, their related english (preferred) labels and their ISO codes:
1.1 Results in HTML:
The results are on 7 columns :
- country_uri: the identifier of the country
- country_en: the preferred labels in English
- named_authority_code: official codes representing the country (it can be different from the ISO codes)
- interinstitutional_style_guide_code: an alpha-2 code used in EU institutions which is the same as ISO_31661_alpha2 except for Greece and UK
- ISO_31661_alpha2: the two-letter country codes based on ISO 3166-1
- ISO_31661_alpha3: the three-letter country codes based on ISO 3166-1
- ISO_31661_num: three-digit country codes based on ISO 3166-1
The SPARQL query is available under 4.7.
Current countries and territories (HTML)
1.2 Results in JSON:
As above, the results contains 7 fields. The values are returned as followed:
{ "head": { "link": [], "vars": ["country_uri", "named_authority_code", "country_en", "ISO_31661_alpha3", "interinstitutional_style_guide_code", "ISO_31661_alpha2", "ISO_31661_num"] },
"results": { "distinct": false, "ordered": true, "bindings": [
{ "country_uri": { "type": "uri", "value": "http://publications.europa.eu/resource/authority/country/AFG" } , "named_authority_code": { "type": "literal", "value": "AFG" } , "country_en": { "type": "literal", "value": "Afghanistan" } , "ISO_31661_alpha3": { "type": "literal", "value": "AFG" } , "interinstitutional_style_guide_code": { "type": "literal", "value": "AF" } , "ISO_31661_alpha2": { "type": "literal", "value": "AF" } , "ISO_31661_num": { "type": "literal", "value": "004" }} ]
Current countries and territories (JSON)
1.3 Results in CSV for Excel:
The triple store returns directly a CSV file (comma separated), with 7 columns.
Current countries and territories (CSV) - for Excel
2.0 All countries and territories available in the dataset (including historical data)
2.1 Results in HTML:
The results enclose all the countries and territories included the dataset (including the "deprecated" countries, which are available for historical reasons).
They are shown on 2 columns :
- country_uri : the identifier of the country
- country_en : the preferred labels in English
Full list of countries and territories (HTML)
2.2 Results in JSON:
The results have 2 fields : "country_uri" and "country_en". The values are returned as followed:
{ "country_uri": { "type": "uri", "value": "http://publications.europa.eu/resource/authority/country/BDI" },
"country_en": { "type": "literal", "value": "Burundi" }}
Full list of countries and territories (JSON)
2.3 Results in CSV for Excel:
The triple store returns directly a CSV file (comma separated), with 2 columns: country_uri and country_en.
Full list of countries and territories (CSV - for Excel)
3.0 Current EU Member states
The following queries retrieves all the current EU member states, their related english (preferred) labels and long labels, and their protocol order :
3.1 Results in HTML:
The results are set on 4 columns:
- ?country_uri : the identifier of the country or the territory inside the dataset
- ?country_en : the preferred label (in English)
- ?longLabel_en : the related long label (in English)
- ?protocol_order: the related protocol order.
3.2 Results in JSON:
3.3 Results in CSV for Excel:
Current EU members in CSV for Excel
4.0 Retrieving new information and data
Note: this data will only be officially published in september 2023.
Note: The following queries should be copy and paste into the user interface from Cellar to retrieve the information about Countries, territories and marine areas.
Note: the following queries are based on SPARQL, which is the query language for the databases based on semantics technologies.
4.1 Procedure to retrieve the data from Cellar:
- Access the page: https://publications.europa.eu/webapi/rdf/sparql
- Copy and paste one of the following query into the text editor (replace the existing one)
- Press"Submit".
- The results appear as a list.
- On the right side, click on "Save result as..." and select the type of export you need.
- The data retrieval is automatically launched.
4.2 UN Members (English preferred labels):
The following query retrieves the 193 UN members and their english preferred labels.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
SELECT distinct ?country_uri ?named_authority_code ?country_en
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_en .
Bind(str(?c_en) as ?country_en)
filter(lang(?c_en) = "en")
# Filtering on the memberhip to UNO
?country_uri org:hasMembership ?membership .
?membership org:organization <http://publications.europa.eu/resource/authority/corporate-body/UNO> .
?membership org:role <http://publications.europa.eu/resource/authority/role/MEMBER> .
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?true}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
} order by ?country_uri
4.3 UN Members (all EU languages):
The following query retrieves all the UN members with their labels in the 24 official EU languages (the header of the column are as follow : "?country_" + language tag.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
SELECT distinct ?country_uri ?named_authority_code ?country_en ?country_bg ?country_cs ?country_da ?country_de ?country_el ?country_es ?country_et ?country_fi ?country_fr ?country_ga ?country_hr ?country_it ?country_lt ?country_lv ?country_mt ?country_nl ?country_pl ?country_pt ?country_ro ?country_sk ?country_sl ?country_sv
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_en . Bind(str(?c_en) as ?country_en) filter(lang(?c_en) = "en")
?country_uri skos:prefLabel ?c_bg . Bind(str(?c_bg) as ?country_bg) filter(lang(?c_bg) = "bg")
?country_uri skos:prefLabel ?c_cs . Bind(str(?c_cs) as ?country_cs) filter(lang(?c_cs) = "cs")
?country_uri skos:prefLabel ?c_da . Bind(str(?c_da) as ?country_da) filter(lang(?c_da) = "da")
?country_uri skos:prefLabel ?c_de . Bind(str(?c_de) as ?country_de) filter(lang(?c_de) = "de")
?country_uri skos:prefLabel ?c_el . Bind(str(?c_el) as ?country_el) filter(lang(?c_el) = "el")
?country_uri skos:prefLabel ?c_es . Bind(str(?c_es) as ?country_es) filter(lang(?c_es) = "es")
?country_uri skos:prefLabel ?c_et . Bind(str(?c_et) as ?country_et) filter(lang(?c_et) = "et")
?country_uri skos:prefLabel ?c_fi . Bind(str(?c_fi) as ?country_fi) filter(lang(?c_fi) = "fi")
?country_uri skos:prefLabel ?c_fr . Bind(str(?c_fr) as ?country_fr) filter(lang(?c_fr) = "fr")
?country_uri skos:prefLabel ?c_ga . Bind(str(?c_ga) as ?country_ga) filter(lang(?c_ga) = "ga")
?country_uri skos:prefLabel ?c_hr . Bind(str(?c_hr) as ?country_hr) filter(lang(?c_hr) = "hr")
?country_uri skos:prefLabel ?c_hu . Bind(str(?c_hu) as ?country_hu) filter(lang(?c_hu) = "hu")
?country_uri skos:prefLabel ?c_it . Bind(str(?c_it) as ?country_it) filter(lang(?c_it) = "it")
?country_uri skos:prefLabel ?c_lt . Bind(str(?c_lt) as ?country_lt) filter(lang(?c_lt) = "lt")
?country_uri skos:prefLabel ?c_lv . Bind(str(?c_lv) as ?country_lv) filter(lang(?c_lv) = "lv")
?country_uri skos:prefLabel ?c_mt . Bind(str(?c_mt) as ?country_mt) filter(lang(?c_mt) = "mt")
?country_uri skos:prefLabel ?c_nl . Bind(str(?c_nl) as ?country_nl) filter(lang(?c_nl) = "nl")
?country_uri skos:prefLabel ?c_pl . Bind(str(?c_pl) as ?country_pl) filter(lang(?c_pl) = "pl")
?country_uri skos:prefLabel ?c_pt . Bind(str(?c_pt) as ?country_pt) filter(lang(?c_pt) = "pt")
?country_uri skos:prefLabel ?c_ro . Bind(str(?c_ro) as ?country_ro) filter(lang(?c_ro) = "ro")
?country_uri skos:prefLabel ?c_sk . Bind(str(?c_sk) as ?country_sk) filter(lang(?c_sk) = "sk")
?country_uri skos:prefLabel ?c_sl . Bind(str(?c_sl) as ?country_sl) filter(lang(?c_sl) = "sl")
?country_uri skos:prefLabel ?c_sv . Bind(str(?c_sv) as ?country_sv) filter(lang(?c_sv) = "sv")
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Filtering on the memberhip to UNO
?country_uri org:hasMembership ?membership .
?membership org:organization <http://publications.europa.eu/resource/authority/corporate-body/UNO> .
?membership org:role <http://publications.europa.eu/resource/authority/role/MEMBER> .
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?true}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
} order by ?country_uri
4.4 UN observers:
The following query retrieves the 2 UN observers and their english preferred labels.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX org: <http://www.w3.org/ns/org#>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT distinct ?country_uri ?named_authority_code ?country_en
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_en .
Bind(str(?c_en) as ?country_en)
filter(lang(?c_en) = "en")
# Filtering on the memberships
?country_uri org:hasMembership ?membership .
?membership org:organization <http://publications.europa.eu/resource/authority/corporate-body/UNO> .
?membership org:role <http://publications.europa.eu/resource/authority/role/UN_OBSERVER> .
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?true}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
} order by ?country_uri
4.5 Disputed territories:
The following query retrieves the territories or marine areas disputed by different countries.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT distinct ?country_uri ?named_authority_code ?country_en
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_en .
filter(lang(?c_en) = "en")
Bind(str(?c_en) as ?country_en)
# Filtering only the territories and marine areas link to the scheme "Disputed territories"
?country_uri skos:inScheme <http://publications.europa.eu/resource/authority/country/0004> .
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?true}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
} order by ?country_uri
4.6 Territories and marine areas:
The following query retrieves all the territories and marine areas with their labels in English.
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT distinct ?country_uri ?named_authority_code ?country_en
from <http://publications.europa.eu/resource/authority/country>
WHERE {
values ?scheme {
<http://publications.europa.eu/resource/authority/country/0002>
<http://publications.europa.eu/resource/authority/country/0003>
}
# Retrieving the territories and the marine areas, and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_en .
Bind(str(?c_en) as ?country_en)
filter(lang(?c_en) = "en")
# Filtering the territories and the marine areas
?country_uri skos:inScheme ?scheme .
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?true}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
} order by ?country_uri
Note: The disputed territories are also included into the results of this SPARQL query.
4.7 Current countries, their related ISO and Interinstitutional Style Guide codes:
The following query retrieves all the current states, their official codes, their related english (preferred) labels , their ISO codes (ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric), and their Interinstitutional Style Guide (ISG) codes:
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?country_uri ?named_authority_code ?country_en ?ISO_31661_alpha3
?interinstitutional_style_guide_code ?ISO_31661_alpha2 ?ISO_31661_num
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the current countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:inScheme <http://publications.europa.eu/resource/authority/country/0001> .
?country_uri skos:prefLabel ?c_label_en .
Bind(str(?c_label_en) as ?country_en) .
filter(lang(?c_label_en) = "en")
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Retrieving the 2 alpha ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_alpha2 .
?not_alpha2 rdf:value ?ISO_31661_alpha2 .
?not_alpha2 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_2> .
}
# Retrieving the 3 alpha ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_alpha3 .
?not_alpha3 rdf:value ?ISO_31661_alpha3 .
?not_alpha3 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_3> .
}
# Retrieving the numerical ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_num .
?not_num rdf:value ?ISO_31661_num .
?not_num dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_NUM> .
}
#retrieving the codes used into the interinstitutional style guide
optional {
?country_uri euvoc:xlNotation ?not_style .
?not_style rdf:value ?interinstitutional_style_guide_code .
?not_style dct:type <http://publications.europa.eu/resource/authority/notation-type/ISG_COU> .
}
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?dep}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
} order by ?country_uri
4.8 Current countries, territories and marines areas and their related ISO codes:
The following query retrieves all the current states, territories and marine areas, their official codes, their related english (preferred) labels , and their ISO codes (ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric) if they exists :
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?country_uri ?named_authority_code ?country_en ?ISO_31661_alpha2
?ISO_31661_alpha3 ?ISO_31661_num
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the current countries, territories and marine areas, and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:prefLabel ?c_label_en .
Bind(str(?c_label_en) as ?country_en) .
filter(lang(?c_label_en) = "en")
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Retrieving the 2 alpha ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_alpha2 .
?not_alpha2 rdf:value ?ISO_31661_alpha2 .
?not_alpha2 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_2> .
}
# Retrieving the 3 alpha ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_alpha3 .
?not_alpha3 rdf:value ?ISO_31661_alpha3 .
?not_alpha3 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_3> .
}
# Retrieving the numerical ISO codes (if available)
optional {
?country_uri euvoc:xlNotation ?not_num .
?not_num rdf:value ?ISO_31661_num .
?not_num dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_NUM> .
}
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?dep}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>}
} order by ?country_uri
4.9 Current EU member states, their official code, their preferred labels in english and their ISO codes:
The following query retrieves all the current EU member states, their official codes, their related english (preferred) labels , and their ISO codes (ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric) if they exists :
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX org: <http://www.w3.org/ns/org#>
SELECT ?country_uri ?named_authority_code ?country_en ?ISO_31661_alpha2
?ISO_31661_alpha3 ?ISO_31661_num
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:topConceptOf <http://publications.europa.eu/resource/authority/country> .
?country_uri skos:prefLabel ?c_label_en .
Bind(str(?c_label_en) as ?country_en) .
filter(lang(?c_label_en) = "en")
# Filtering on the current memberhip to EU
?country_uri org:hasMembership ?membership .
?membership org:organization <http://publications.europa.eu/resource/authority/corporate-body/EURUN> .
?membership org:role <http://publications.europa.eu/resource/authority/role/MEMBER> .
filter not exists {?membership euvoc:exitDate ?end }
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Retrieval of the 2 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha2 .
?not_alpha2 rdf:value ?ISO_31661_alpha2 .
?not_alpha2 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_2> .
}
# Retrieval of the 3 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha3 .
?not_alpha3 rdf:value ?ISO_31661_alpha3 .
?not_alpha3 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_3> .
}
# Retrieval of the 3 digit ISO code
optional {
?country_uri euvoc:xlNotation ?not_num .
?not_num rdf:value ?ISO_31661_num .
?not_num dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_NUM> .
}
# Filtering out the deprecated and the retired concepts
filter not exists {?country_uri owl:deprecated ?dep}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>
}
} order by ?country_uri
4.10 Current OECD member states, their official code, their preferred labels in english and their ISO codes:
The following query retrieves all the current OECD member states, their official codes, their related english (preferred) labels , and their ISO codes (ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric) if they exists :
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX org: <http://www.w3.org/ns/org#>
SELECT ?country_uri ?named_authority_code ?country_en ?ISO_31661_alpha2
?ISO_31661_alpha3 ?ISO_31661_num
from <http://publications.europa.eu/resource/authority/country>
WHERE {
# Retrieving the countries and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:topConceptOf <http://publications.europa.eu/resource/authority/country> .
?country_uri skos:prefLabel ?c_label_en .
Bind(str(?c_label_en) as ?country_en) .
filter(lang(?c_label_en) = "en")
# Filtering on the current memberhip to OECD
?country_uri org:hasMembership ?membership .
?membership org:organization <http://publications.europa.eu/resource/authority/corporate-body/OECD> .
?membership org:role <http://publications.europa.eu/resource/authority/role/MEMBER> .
filter not exists {?membership euvoc:exitDate ?end }
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Retrieval of the 2 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha2 .
?not_alpha2 rdf:value ?ISO_31661_alpha2 .
?not_alpha2 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_2> .
}
# Retrieval of the 3 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha3 .
?not_alpha3 rdf:value ?ISO_31661_alpha3 .
?not_alpha3 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_3> .
}
# Retrieval of the 3 digit ISO code
optional {
?country_uri euvoc:xlNotation ?not_num .
?not_num rdf:value ?ISO_31661_num .
?not_num dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_NUM> .
}
# Filtering out the deprecated and the retired concepts
filter not exists { ?country_uri owl:deprecated ?dep}
filter not exists {
?country_uri euvoc:status <http://publications.europa.eu/resource/authority/concept-status/RETIRED>
}
} order by ?country_uri
4.11 All countries, territories and marine areas, their official code, their preferred labels in english, their ISO codes and their status:
The following query retrieves all the concepts into the dataset (including the deprecated and the retired ones), their official codes, their related english preferred and long labels, their ISO codes (ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, ISO 3166-1 numeric), their start and end dates, and their status (current, deprecated or retired) :
The results can be directly retrieve using the following links:
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX euvoc: <http://publications.europa.eu/ontology/euvoc#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX org: <http://www.w3.org/ns/org#>
SELECT ?country_uri ?named_authority_code ?country_en ?country_long_en ?ISO_31661_alpha2
?ISO_31661_alpha3 ?ISO_31661_num ?start_date ?end_date ?status
from <http://publications.europa.eu/resource/authority/country>
from named <http://publications.europa.eu/resource/authority/concept-status>
WHERE {
# Retrieving the countries, territories and marine areas and their english preferred labels
?country_uri a skos:Concept .
?country_uri skos:inScheme <http://publications.europa.eu/resource/authority/country> .
?country_uri skos:prefLabel ?c_label_en .
Bind(str(?c_label_en) as ?country_en) .
filter(lang(?c_label_en) = "en")
# Retrieval of the EU official code
?country_uri euvoc:xlNotation ?not_authority .
?not_authority rdf:value ?named_authority_code .
?not_authority dct:type <http://publications.europa.eu/resource/authority/notation-type/NAC> .
# Retrieval of the long label in English
optional {
?country_uri skosxl:altLabel ?c_long_en .
?c_long_en dct:type <http://publications.europa.eu/resource/authority/label-type/LONGLABEL> .
?c_long_en skosxl:literalForm ?country_long_en .
filter(lang(?country_long_en) = "en")
}
# Retrieval of the 2 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha2 .
?not_alpha2 rdf:value ?ISO_31661_alpha2 .
?not_alpha2 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_2> .
}
# Retrieval of the 3 letters ISO code
optional {
?country_uri euvoc:xlNotation ?not_alpha3 .
?not_alpha3 rdf:value ?ISO_31661_alpha3 .
?not_alpha3 dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_ALPHA_3> .
}
# Retrieval of the 3 digit ISO code
optional {
?country_uri euvoc:xlNotation ?not_num .
?not_num rdf:value ?ISO_31661_num .
?not_num dct:type <http://publications.europa.eu/resource/authority/notation-type/ISO_3166_1_NUM> .
}
# Retrieval of the start date of the concept (available on all)
optional {
?country_uri euvoc:startDate ?start_date
}
# Retrieval of the end date of the concept (available on deprecated or retired concepts)
optional {
?country_uri euvoc:endDate ?end_date
}
# Retrieval of the status of the concept (current, deprecated or retired)
optional{
?country_uri euvoc:status ?country_status .
graph <http://publications.europa.eu/resource/authority/concept-status> {
?country_status skosxl:prefLabel ?label_status .
?label_status skosxl:literalForm ?c_status .
filter(lang(?c_status) = "en")
Bind(str(?c_status) as ?status)
}
}
# Removal of the 3 technical concepts : "Marine Zone", "Disputed region" and "OP_DATPRO"
filter(?named_authority_code != "XMAZ")
filter(?named_authority_code != "XDST")
filter(?named_authority_code != "OP_DATPRO")
} order by ?country_uri