Skip to content

Instantly share code, notes, and snippets.

View jrc's full-sized avatar

John Chang jrc

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jrc on github.
  • I am jrc (https://keybase.io/jrc) on keybase.
  • I have a public key whose fingerprint is 992C 4519 EF34 0CCA CA9E 08A3 0D2E 1F38 61F5 F472

To claim this, I am signing this object:

# Get ISO country codes and demonyms for all countries and geo regions
SELECT ?item ?itemLabel ?countryCode ?demonym
WHERE {
{
# see "Query not returning all expected results"
# https://www.wikidata.org/wiki/Wikidata_talk:SPARQL_query_service/queries
?item p:P31 [ps:P31 wd:Q6256]. # categoryof (P31) country (Q6256)
?item wdt:P297 ?countryCode .
?item wdt:P1549 ?demonym .
FILTER (LANG(?demonym) = "en") .