Birthdays and Death Anniversaries of public figures in India

Here are SPARQL queries you can run against Wikipedia data to generate a list of birthdays and death anniversaries of public figures in India.

1. Go to https://query.wikidata.org/
2. In the query window, cut and paste any of the queries below.
3. Do not copy the comments that begins with //
4. Here is the link to the results collated.


Query #1:
// Indians born any day. Lists occupation as well.

SELECT ?a ?aLabel ?birth_date (month(?birth_date) as ?month) (day(?birth_date) as ?day)
?occupationLabel WHERE {

   ?a p:P569/psv:P569
   ?birth_date_node .
   ?birth_date_node wikibase:timePrecision "11"^^xsd:integer .
   ?birth_date_node wikibase:timeValue ?birth_date .

   FILTER (month(?birth_date) >= 1) .
   FILTER (day(?birth_date) >= 1) .
   ?a wdt:P27 wd:Q668 .
   ?a wdt:P106 ?occupation .

   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
      }
}
ORDER BY day(?birth_date) ?aLabel

Query #2:
// Indians with date of death any day. Lists occupation as well.

SELECT ?a ?aLabel ?death_date (month(?death_date) as ?month) (day(?death_date) as ?day)
?occupationLabel WHERE {

   ?a p:P570/psv:P570
   ?death_date_node .
   ?death_date_node wikibase:timePrecision "11"^^xsd:integer .
   ?death_date_node wikibase:timeValue ?death_date .

   FILTER (month(?death_date) >= 1) .
   FILTER (day(?death_date) >= 1) .
   ?a wdt:P27 wd:Q668 .
   ?a wdt:P106 ?occupation .

   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
      }
}
ORDER BY day(?death_date) ?aLabel

Query #3:
// Indians born today. Lists occupation as well.

SELECT ?a ?aLabel ?birth_date ?occupationLabel WHERE {

   ?a p:P569/psv:P569
   ?birth_date_node .
   ?birth_date_node wikibase:timePrecision "11"^^xsd:integer .
   ?birth_date_node wikibase:timeValue ?birth_date .
   FILTER (month(?birth_date) = month(now())) .
   FILTER (day(?birth_date) = day(now())) .
   ?a wdt:P27 wd:Q668 .
   ?a wdt:P106 ?occupation .

   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
      }
}
ORDER BY day(?birth_date) ?aLabel

Query #4:
// Indians with date of death today. Lists occupation as well.

SELECT ?a ?aLabel ?death_date (month(?death_date) as ?month) (day(?death_date) as ?day)
?occupationLabel WHERE {

   ?a p:P570/psv:P570
   ?death_date_node .
   ?death_date_node wikibase:timePrecision "11"^^xsd:integer .
   ?death_date_node wikibase:timeValue ?death_date .

   FILTER (month(?death_date) = month(now())) .
   FILTER (day(?death_date) = day(now())) .
 
   ?a wdt:P27 wd:Q668 .
   ?a wdt:P106 ?occupation .

   SERVICE wikibase:label {
      bd:serviceParam wikibase:language "en" .
      }
}
ORDER BY day(?death_date) ?aLabel

Comments

Popular posts from this blog