Difference between revisions of "GW150914"

From BITPlan Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
* https://en.wikipedia.org/wiki/Talk:List_of_gravitational_wave_observations#Wikidata_Query_/_List_of_Gravitational_Wave_events
 
* https://en.wikipedia.org/wiki/Talk:List_of_gravitational_wave_observations#Wikidata_Query_/_List_of_Gravitational_Wave_events
 
= WikiData Query =
 
= WikiData Query =
 +
[https://query.wikidata.org/#%23%20Find%20Gravitational%20wave%20events%0A%23%20Created%202018-10-16%20by%20Wolfgang%20Fahl%20BITPlan%20GmbH%0A%23%0A%23%20select%20the%20events%0ASELECT%20%3Fevent%20%3FcatalogCode%20%3Fdiscovery%20%3FeventLabel%20%3Fduration%20%3Farticle%20%0AWHERE%20%0A%7B%0A%20%20%23%20any%20subject%0A%20%20%23%20which%20is%20an%20instance%20of%0A%20%20%23%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FProperty%3AP31%0A%20%20%0A%20%20%23%20gravitational%20wave%20event%0A%20%20%23%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FQ24748034%0A%20%20%3Fevent%20wdt%3AP31%20wd%3AQ24748034.%0A%20%20%0A%20%20%23%20and%20might%20hava%20catalog%20code%0A%20%20%23%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FProperty%3AP528%0A%20%20%23%20catalog%20Code%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fevent%20wdt%3AP528%20%3FcatalogCode%0A%20%20%7D%0A%20%20%0A%20%20%23%20and%20might%20have%20a%20time%20of%20discovery%0A%20%20%23%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FProperty%3AP575%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fevent%20wdt%3AP575%20%3Fdiscovery%0A%20%20%7D%20%20%20%0A%20%20%0A%20%20%23%20and%20might%20have%20a%20time%20duration%0A%20%20%23%20https%3A%2F%2Fwww.wikidata.org%2Fwiki%2FProperty%3AP2047%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%3Fevent%20wdt%3AP2047%20%3Fduration%0A%20%20%7D%20%20%20%0A%20%20%0A%20%20%23%20show%20the%20Labels%20%28e.g.%20eventLabel%29%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20...%20include%20the%20labels%0A%20%20%20%20%20%20%20%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22%0A%20%20%7D%0A%20%20%0A%20%20%23%20the%20event%20might%20have%20an%20english%20wikipedia%20article%0A%20%20OPTIONAL%20%7B%0A%20%20%20%20%20%20%3Farticle%20schema%3Aabout%20%3Fevent%20.%0A%20%20%20%20%20%20%3Farticle%20schema%3AinLanguage%20%22en%22%20.%0A%20%20%20%20%20%20FILTER%20%28SUBSTR%28str%28%3Farticle%29%2C%201%2C%2025%29%20%3D%20concat%28%22https%3A%2F%2Fen.wikipedia.org%2F%22%29%29%0A%20%20%7D%0A%7D%0Aorder%20by%20%3Fdiscovery%0A try it!]
 
<source lang='sparql'>
 
<source lang='sparql'>
 
# Find Gravitational wave events
 
# Find Gravitational wave events
Line 8: Line 9:
 
#
 
#
 
# select the events
 
# select the events
SELECT ?event ?catalogCode ?discovery ?eventLabel ?article  
+
SELECT ?event ?catalogCode ?discovery ?eventLabel ?duration ?article  
 
WHERE  
 
WHERE  
 
{
 
{
Line 30: Line 31:
 
   OPTIONAL {
 
   OPTIONAL {
 
     ?event wdt:P575 ?discovery
 
     ?event wdt:P575 ?discovery
   }                        
+
   }  
 +
 
 +
  # and might have a time duration
 +
  # https://www.wikidata.org/wiki/Property:P2047
 +
  OPTIONAL {
 +
    ?event wdt:P2047 ?duration
 +
  } 
 
    
 
    
 
   # show the Labels (e.g. eventLabel)
 
   # show the Labels (e.g. eventLabel)

Revision as of 08:25, 17 October 2018

WikiData Query

try it!

# Find Gravitational wave events
# Created 2018-10-16 by Wolfgang Fahl BITPlan GmbH
#
# select the events
SELECT ?event ?catalogCode ?discovery ?eventLabel ?duration ?article 
WHERE 
{
  # any subject
  # which is an instance of
  # https://www.wikidata.org/wiki/Property:P31
  
  # gravitational wave event
  # https://www.wikidata.org/wiki/Q24748034
  ?event wdt:P31 wd:Q24748034.
  
  # and might hava catalog code
  # https://www.wikidata.org/wiki/Property:P528
  # catalog Code
  OPTIONAL {
    ?event wdt:P528 ?catalogCode
  }
  
  # and might have a time of discovery
  # https://www.wikidata.org/wiki/Property:P575
  OPTIONAL {
    ?event wdt:P575 ?discovery
  }   
  
  # and might have a time duration
  # https://www.wikidata.org/wiki/Property:P2047
  OPTIONAL {
    ?event wdt:P2047 ?duration
  }   
  
  # show the Labels (e.g. eventLabel)
  SERVICE wikibase:label {               # ... include the labels
        bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"
  }
  
  # the event might have an english wikipedia article
  OPTIONAL {
      ?article schema:about ?event .
      ?article schema:inLanguage "en" .
      FILTER (SUBSTR(str(?article), 1, 25) = concat("https://en.wikipedia.org/"))
  }
}
order by ?discovery

GW150914

GW151226

GW170104

GW170608

GW170814

GW170817

Open Data

O3