Wikidata:Property proposal/World Factbook country code

From Wikidata
Jump to navigation Jump to search

World Factbook country code[edit]

Originally proposed at Wikidata:Property proposal/Authority control

   Withdrawn
Descriptioncode for countries in The World Factbook (Online)
RepresentsThe World Factbook (Q97142711)
Data typeString
Domaincountry (Q6256), dependent territory (Q161243), territory (Q183366), ocean (Q9430)
Allowed valuestwo lower-case letters
Example 1Albania (Q222)al
Example 2American Samoa (Q16641)aq
Example 3Ashmore and Cartier Islands (Q133888)at
Example 4Bhutan (Q917)bt
Example 5Greenland (Q223)gl
Example 6Indian Ocean (Q1239)xo
Example 7Isle of Man (Q9676)im
Example 8Liechtenstein (Q347)ls
Example 9Niue (Q34020)ne
Example 10Midway Atoll (Q47863)um
Example 11Kingman Reef (Q130895)um
Example 12Palmyra Atoll (Q123076)um
Example 13Wallis and Futuna (Q35555)wf
Sourcehttps://www.cia.gov/library/publications/resources/the-world-factbook/
Planned useWill add codes for countries as their items are edited for other reasons.
Number of IDs in source267
Expected completenesseventually complete (Q21873974)
Formatter URLhttps://www.cia.gov/library/publications/the-world-factbook/geos/$1.html

Motivation[edit]

The CIA's World Factbook contains detailed information on 267 world entities. Having a link from Wikidata to these country accounts would very useful, as the information is authoritative and updated annually. Note that some entities have the same code, so the same code should be permitted on multiple Wikidata items. UWashPrincipalCataloger (talk) 02:00, 29 September 2020 (UTC)[reply]

Discussion[edit]

@Adam Schiff: If the code list is the same, it's better to add alias "World Factbook country code" to FIPS 10-4 (countries and regions) (P901) (I'd even make that the primary name) and add formatterURL. Thanks for your contribution!!
We'll need a custom resolver to lowercase the code, since https://www.cia.gov/library/publications/the-world-factbook/geos/AX.html doesn't resolve. --Vladimir Alexiev (talk) 09:15, 5 October 2020 (UTC)[reply]
@Vladimir Alexiev, Adam Schiff, Jura1: However, FIPS 10-4 includes subnational regions (with a numeric extension, like AU01 in the property examples), and those do not seem to be supported by the CIA formatter. ArthurPSmith (talk) 17:47, 5 October 2020 (UTC)[reply]
Maybe it can be made to work with MediaWiki:Gadget-AuthorityControl.js. --- Jura 19:54, 5 October 2020 (UTC)[reply]
However we manage to get a link to The World Factbook online, I'm in favor. It's an important source of information that should have links from Wikidata. UWashPrincipalCataloger (talk) 23:58, 5 October 2020 (UTC)[reply]
Hmm, I think I'll take a look at linking FIPS 10-4 to the World Factbook by just stripping off the numeric bits (and lowercasing) - it will just go to the country rather than a subregion, but that seems at least somewhat useful and better than nothing. ArthurPSmith (talk) 19:25, 6 October 2020 (UTC)[reply]
And this is now done - see FIPS 10-4 (countries and regions) (P901). @UWashPrincipalCataloger: - ok to close this request? ArthurPSmith (talk) 18:10, 7 October 2020 (UTC)[reply]
@UWashPrincipalCataloger: would you like to add your excellent examples (and Akrotyri)? They should not go to waste! --Vladimir Alexiev (talk) 00:33, 20 October 2020 (UTC)[reply]