Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Institutional membership (2020) in wikidata #144

Open
nickynicolson opened this issue Feb 26, 2020 · 0 comments
Open

Institutional membership (2020) in wikidata #144

nickynicolson opened this issue Feb 26, 2020 · 0 comments

Comments

@nickynicolson
Copy link
Member

(Of potential interest to TDWG website development due to use of multiple languages in institutional membership list (as per recent commit 7c1d0b6): I added TDWG institutional membership statements to wikidata, which also holds translations of institutional names, and location coordinates etc.

SPARQL query to retrieve these below:

# TDWG institutional members
# These have a varied mix of "instanceOf" (P31) values - here aggregated as "instanceLabels"
# Due to mix of instances, not all have coordinate locations (hence coordinates OPTIONAL)
SELECT ?item ?itemLabel ?geo
               (GROUP_CONCAT(DISTINCT ?instanceLabel; SEPARATOR=", ") AS ?instanceLabels)
WHERE
{
  # memberof TDWG
  ?item wdt:P463 wd:Q4914768.
  ?item wdt:P31 ?instance .
  OPTIONAL {?item wdt:P625 ?geo}
  FILTER NOT EXISTS { 
    # Exclude humans
    ?item wdt:P31 wd:Q5 
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". 
                         ?instance rdfs:label ?instanceLabel.
                         ?item rdfs:label ?itemLabel.
                         }
}
GROUP BY ?item ?itemLabel ?geo
ORDER BY ?itemLabel

This link loads the query in the wikidata query service - which supports map format results if coordinate location available for items (select "map" from drop-down above results panel, default is "table").

Two members are currently missing from wikidata, but can be added:

One is listed as a kind of consortium in the TDWG membership list (Harvard University/Ernst Mayr Library/Museum of Comparative Zoology), but each of the members have their own wikidata item:

If this is useful, advice on how to handle this "consortium" welcomed - three separate statements are simple, but would give an inflated number of institutional members in the SPARQL query above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant