User:Digipres

From Wikidata
Jump to navigation Jump to search

I work in the heritage sector at Archives New Zealand Te Rua Mahara o te Kāwanatanga.

The aim of my contributions is to surface open data from New Zealand for the benefit of everyone.


Queries I'm experimenting[edit]

The idea is to start with this list and then fill up the significant events of all countries. The use case is to be able to view at one glance what are the significant events around the world by year. Example, what's happening in Europe during the Xinhai Revolution (1911)?

List of significant event (P793) for a given country (Q6256)[edit]

The following query uses these:

  • Properties: instance of (P31)  View with Reasonator View with SQID, significant event (P793)  View with Reasonator View with SQID
    #List of significant event (P793) for a given country (Q6256)
    SELECT DISTINCT ?cid ?country ?significant_event ?significant_eventLabel   
    WHERE {
      ?cid wdt:P31 wd:Q6256.
      OPTIONAL {
        ?cid rdfs:label ?country.    
        FILTER((LANG(?country)) = "en")
      }
      OPTIONAL { 
        ?cid wdt:P793 ?significant_event.
        ?significant_event rdfs:label ?significant_eventLabel.
        SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } #Provide label for significant_event
      }
    }