Skip to content

Commit 49b38b7

Browse files
authored
Improve metadata: add descriptions, fix field types, add wikidata_id to schema (#102)
1 parent 41ed732 commit 49b38b7

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ codes, ISO 4217 currency codes, and many others. Provided as a [Tabular Data Pac
1010
Data are fetched from multiple sources:
1111

1212
- Official formal and short names (in English, French, Spanish, Arabic, Chinese, and Russian) are from
13-
[United Nations Protocol and Liaison Service](https://protocol.un.org/dgacm/pls/site.nsf/PermanentMissions.xsp)
13+
[United Nations Protocol and Liaison Service](https://www.un.org/dgacm/sites/www.un.org.dgacm/files/Documents_Protocol/unterm-efsrca.xlsx)
1414

1515
- Customary English short names are from
1616
[Unicode Common Locale Data Repository (CLDR) Project](https://raw.githubusercontent.com/unicode-org/cldr-json/d38478855dd8342749f0494332cc8acc2895d20d/cldr-json/cldr-localenames-full/main/ms/territories.json).
@@ -35,6 +35,8 @@ resources and is much easier to scrape than multiple Wikipedia pages.
3535

3636
- EDGAR codes are from [sec.gov](https://www.sec.gov/submit-filings/filer-support-resources/edgar-state-country-codes)
3737

38+
- Wikidata entity URLs (`wikidata_id`) are fetched via the [Wikidata SPARQL endpoint](https://query.wikidata.org/sparql) using the ISO 3166-1 alpha-2 property (P297)
39+
3840

3941
## Preparation
4042

datapackage.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ format: csv
1111
last_modified: 2023-09-25
1212
licenses:
1313
- name: ODC-PDDL-1.0
14-
path: http://opendatacommons.org/licenses/pddl/
14+
path: https://opendatacommons.org/licenses/pddl/
1515
title: Open Data Commons Public Domain Dedication and License v1.0
1616
name: country-codes
17+
description: Comprehensive dataset of country codes combining ISO 3166 alpha-2/alpha-3/numeric,
18+
ITU dialing codes, ISO 4217 currency codes, UN M49 region codes, Geonames, CLDR
19+
display names, EDGAR codes, and Wikidata identifiers for all countries and territories.
1720
related:
1821
- formats:
1922
- CSV
@@ -46,6 +49,9 @@ resources:
4649
- format: csv
4750
name: country-codes
4851
path: data/country-codes.csv
52+
description: One row per country or territory with code columns from multiple international
53+
standards bodies including ISO 3166, ITU, ISO 4217, UN M49, Geonames, CLDR, EDGAR,
54+
and Wikidata.
4955
schema:
5056
fields:
5157
- description: "Codes assigned by the F\xE9d\xE9ration Internationale de Football\
@@ -182,7 +188,7 @@ resources:
182188
Islands or Sark, for example)
183189
name: M49
184190
title: M49
185-
type: number
191+
type: integer
186192
- description: Country classification from United Nations Statistics Division
187193
name: Sub-region Code
188194
title: sub-region code
@@ -287,7 +293,7 @@ resources:
287293
description: Geoname ID
288294
name: Geoname ID
289295
title: Geoname ID
290-
type: number
296+
type: integer
291297
- description: Country's customary English short name (CLDR)
292298
name: CLDR display name
293299
title: CLDR display name
@@ -298,12 +304,17 @@ resources:
298304
name: EDGAR
299305
title: EDGAR code
300306
type: string
307+
- description: Wikidata entity URL for the country, sourced via Wikidata SPARQL
308+
query on ISO 3166-1 alpha-2 property (P297)
309+
name: wikidata_id
310+
title: Wikidata ID
311+
type: string
301312
sources:
302313
- name: United Nations Protocol and Liaison Service
303314
path: https://www.un.org/dgacm/sites/www.un.org.dgacm/files/Documents_Protocol/unterm-efsrca.xlsx
304315
title: United Nations Protocol and Liaison Service
305316
- name: Unicode Common Locale Data Repository (CLDR) Project
306-
path: https://github.com/unicode-org/cldr-json/blob/d38478855dd8342749f0494332cc8acc2895d20d/cldr-json/cldr-localenames-full/main/ms/territories.json
317+
path: https://raw.githubusercontent.com/unicode-org/cldr-json/d38478855dd8342749f0494332cc8acc2895d20d/cldr-json/cldr-localenames-full/main/ms/territories.json
307318
title: Unicode Common Locale Data Repository (CLDR) Project
308319
- name: United Nations Department of Economic and Social Affairs Statistics Division
309320
path: https://unstats.un.org/unsd/methodology/m49/overview/
@@ -320,5 +331,8 @@ sources:
320331
- name: US Securities and Exchange Commission
321332
path: https://www.sec.gov/submit-filings/filer-support-resources/edgar-state-country-codes
322333
title: US Securities and Exchange Commission
334+
- name: Wikidata
335+
path: https://query.wikidata.org/sparql
336+
title: Wikidata SPARQL endpoint
323337
title: 'Comprehensive country codes: ISO 3166, ITU, ISO 4217 currency codes and many
324338
more'

scripts/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"official_name_fr",
2222
"UNTERM French Short",
2323
"ISO4217-currency_name",
24-
"Developed / Developing Countries",
2524
"UNTERM Russian Formal",
2625
"UNTERM English Short",
2726
"ISO4217-currency_alphabetic_code",

0 commit comments

Comments
 (0)