Wikidata:WikiProject SrpKor/Queries

From Wikidata
Jump to navigation Jump to search

Home

 

Property overview

 

Collections

 


Queries

 

About

 


ELTeC queries

[edit]

Basic queries: novels in SrpKor and srpELTEC collections

[edit]
  • Novels in SrpKor Q117079024 (srpELTeC collection =wd:Q106936149)
#defaultView:Tree
SELECT DISTINCT ?novel ?novelLabel 
WHERE {
  #published in (P1433)  collection (Q117079024)
  ?novel wdt:P1433  wd:Q117079024.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Novels in srpELTeC-extended collection
#Мilica Ikonić Nešič
#novels in srpELTeC-extended collection (Q109123373)
#defaultView:Tree
SELECT DISTINCT ?novel ?novelLabel 
WHERE {
  # roman objavljen u (P1433) u srpELTeC-extended kolekciji (Q109123373)
  ?novel wdt:P1433 wd:Q109123373.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Subcollections for specific language within ELTeC collection
# Subcollections of ELTeC collection 
SELECT DISTINCT ?subcoll ?subcollLabel 
WHERE {
  #  ELTeC collection(Q106927517) contains 
  wd:Q106927517 wdt:P4330 ?subcoll.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!


Size of novels (pages, words)

[edit]
  • Bubble chart of novels in srpELTeC and srpELTeC-extended by number of pages
#defaultView:BubbleChart
SELECT DISTINCT ?novel ?novelLabel ?num_pages  
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373  }
  ?novel wdt:P1433 ?collection;
         wdt:P1104 ?num_pages.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Bubble chart of novels in srpELTeC and srpELTeC-extended by number of words
#defaultView:BubbleChart
SELECT DISTINCT ?novel ?novelLabel ?num_words  
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P1433 ?collection;
         wdt:P6570 ?num_words;
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!


  • Interactive bubble chart with novels in the ELTeC collection, where size of sircle is number of pages
#defaultView:BubbleChart
SELECT DISTINCT ?novel ?novelLabel ?num_pages ?num_words 
WHERE {
  ?novel  wdt:P31  wd:Q7725634;
           wdt:P747 ?edition.
  ?edition  wdt:P1433 ?corpus;
            wdt:P1104 ?num_pages;
            wdt:P6570 ?num_words.
  ?corpus wdt:P361 wd:Q106927517.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Time and place of publication

[edit]
  • Map of novels by publication year colored by period Т1: [1840-1859] blue, Т2: [1860-1879] orang, Т3: [1880-1899] green, Т4: [1900-1920] red
#defaultView:Map
SELECT DISTINCT ?novel ?name ?pubplace ?pubyear ?coord ?layer ?image
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 wd:Q117079024 }
  { ?novel wdt:P747 ?edition;
           wdt:P747 ?firsted.
    ?edition  wdt:P1433 ?collection.
    ?firsted wdt:P31 wd:Q10898227;
             wdt:P291 ?place. }
    ?place wdt:P625 ?coord.
  OPTIONAL {?firsted wdt:P577 ?dob.}
  OPTIONAL {?firsted  wdt:P18 ?image.}
  BIND(YEAR(?dob) AS ?pubyear)
  BIND(IF(?pubyear < 1839 , "-1840", IF(?pubyear < 1860 , "1840-1859", IF(?pubyear < 1880 , "1860-1879", IF(?pubyear < 1900 , "1880-1899", IF(?pubyear < 1921 , "1900-1920", "Post-1920"))))) AS ?layer)
  ?novel rdfs:label ?name.
  FILTER((LANG(?name)) = "sr")
  ?place rdfs:label ?pubplace.
  FILTER((LANG(?pubplace)) = "sr")
}
#sortiraj prema godini publikovanja
ORDER BY (?pubyear)
Try it!


  • Map of first publication place of novels in srpELTeC and srpELTeC-extended
#defaultView:Map
SELECT DISTINCT ?edition ?editionLabel ?place ?placeLabel ?coor 
WHERE {
  VALUES ?collection { wd: wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P747 ?edFirst, ?edition.
  ?edFirst wdt:P31 wd:Q10898227;
           wdt:P291 ?place.
  ?place wdt:P625 ?coor.
  ?edition wdt:P1433 ?collection.
SERVICE wikibase:label { bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Publication place of the first edition
#defaultView:Map
SELECT DISTINCT ?edition ?editionLabel ?place ?placeLabel ?coor
WHERE {
  ?novel  wdt:P31  wd:Q7725634;
          wdt:P747 ?ELTeC;
          wdt:P747 ?edition.
  ?ELTeC  wdt:P1433 ?corpus.
  ?corpus wdt:P361 wd:Q106927517.
  # edition is (P31) first edition (Q10898227)
  ?edition  wdt:P31 wd:Q10898227;
            wdt:P291 ?place.
    # place coordinate location (P625)
OPTIONAL {?place wdt:P625 ?coor}
SERVICE wikibase:label { bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Timeline visualization of novels in srpELTeC and srpELTeC-extended by year of first publication
#defaultView:Timeline
SELECT DISTINCT ?novel ?novelLabel ?image ?date ?author ?authorLabel 
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31  wd:Q7725634;
         wdt:P747 ?edition;
         wdt:P747 ?edFirst.
  ?editon wdt:P1433 ?collection.
  ?edFirst wdt:P31 wd:Q10898227;
          wdt:P18 ?image.
  OPTIONAL { ?edition wdt:P577 ?date. }
  OPTIONAL { ?novel wdt:P50 ?author. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Novels presented in timeline
#defaultView:Timeline
SELECT DISTINCT ?novel ?novelLabel ?image ?date  ?author ?authorLabel 
WHERE {
  ?novel  wdt:P747 ?edition;
          wdt:P747 ?edFirst;
          wdt:P18 ?image.
  ?edition wdt:P31 wd:Q3331189;
            wdt:P1433 ?corpus.
  ?corpus wdt:P361 wd:Q106927517.
  ?edFirst wdt:P31 wd:Q10898227;
            wdt:P577 ?date.

  OPTIONAL { ?novel wdt:P50 ?author. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!

Authors of novels

[edit]
  • All authors in ELTeC collection
#defaultView:ImageGrid
SELECT DISTINCT ?author ?authorLabel ?image 
WHERE {
  ?edition wdt:P31 wd:Q3331189;
           wdt:P50 ?author;
           wdt:P1433 ?corpus.
  ?corpus wdt:P361 wd:Q106927517.  
OPTIONAL {?author wdt:P18 ?image}
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Bubble chart of numbers of male and female authors in srpELTeC and srpELTeC-extended
#defaultView:BubbleChart
SELECT ?polA ?pol (COUNT(DISTINCT ?author) as ?count) 
WHERE {
    VALUES ?collection { wd:Q106936149 wd:Q109123373  }
    ?novel  wdt:P31  wd:Q7725634;
            wdt:P50 ?author;
            wdt:P747 ?edition.
    ?edition wdt:P1433 ?collection.
    ?author wdt:P21 ?polA.
   OPTIONAL {
		?polA rdfs:label ?pol
        filter (lang(?pol) = "sr")
	}
  }
GROUP BY ?polA ?pol 
ORDER BY DESC(?count) ASC(?pol)
Try it!


  • Tree map of authors in srpELTeC and srpELTeC-extended collection
#defaultView:Tree
SELECT DISTINCT ?autor ?autorLabel ?novel ?novelLabel 
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373  }
  ?novel wdt:P1433 ?collection;
         wdt:P50 ?autor.
SERVICE wikibase:label 
{ bd:serviceParam wikibase:language "sr,[AUTO_LANGUAGE],en". }
}
Try it!
  • Map of birth place of authors colored by time period of birth 1801-1840 blue, 1841-1870 orang, 1871-1900 green
#defaultView:Map
SELECT DISTINCT ?person ?name ?birthplace ?birthyear ?coord ?layer ?image
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373  }
  { ?novel wdt:P747 ?edition;
           wdt:P50 ?person.
    ?edition  wdt:P1433 ?collection.
  }
  ?person wdt:P19 ?place.
  ?place wdt:P625 ?coord.
  OPTIONAL { ?person wdt:P569 ?dob. }
  OPTIONAL {?person wdt:P18 ?image.}
  BIND(YEAR(?dob) AS ?birthyear)
BIND(IF(?birthyear < 1801 , "-1800", IF(?birthyear < 1831 , "1801-1840",  IF(?birthyear < 1871 , "1841-1870", IF(?birthyear < 1901 , "1871-1900", "Post-1900")))) AS ?layer)
  ?person rdfs:label ?name.
  FILTER((LANG(?name)) = "sr")
  ?place rdfs:label ?birthplace.
  FILTER((LANG(?birthplace)) = "sr")
}
ORDER BY (?birthyear)
Try it!

Place of narration and characters

[edit]
  • Narative characters in srpELTeC and srpELTeC-extended collection
SELECT DISTINCT ?novel ?novelLabel ?characters ?charactersLabel 
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P674 ?characters;
         wdt:P747 ?edition.
  ?edition wdt:P1433 ?collection.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr". }
}
Try it!
  • Place of narration in srpELTeC and srpELTeC-extended collection
SELECT DISTINCT ?novel ?novelLabel ?place ?placeLabel 
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P840 ?place;
         wdt:P747 ?edition.
  ?edition wdt:P1433 ?collection.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr". }
}
Try it!
  • Interactive balloon chart with the places most often mentioned in novels, where the size of the circle is the number of mentions. When you set mouse pointer on the circle, you can see number of places. (ERR)
#defaultView:BubbleChart
SELECT ?pid ?place (COUNT(*) as ?count)
WHERE {
    ?novel  wdt:P31  wd:Q7725634;
            wdt:P840 ?pid;
            wdt:P747 ?edition.
    ?edition wdt:P1433 wd:Q106927517.
           #  wdt:P123 wd:Q106926624.
    OPTIONAL {
		?pid rdfs:label ?place
        filter (lang(?place) = "sr")}
	}
GROUP BY ?pid ?place
ORDER BY DESC(?count) ASC(?place)
Try it!


Family relations in novels

[edit]
  • All husbands and wives in srpELTeC and srpELTeC-extended collection
SELECT DISTINCT ?h ?hLabel ?w ?wLabel
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
          wdt:P674 ?h;
         wdt:P747 ?edition.
    ?h wdt:P21 wd:Q6581097;
       wdt:P26 ?w.
  ?edition wdt:P1433 ?collection.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr". }
}
Try it!
  • Mothers and children in srpELTeC and srpELTeC-extended collection
SELECT DISTINCT ?mother ?motherLabel ?child ?childLabel
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P674 ?mother;
         wdt:P747 ?edition.
    ?mother wdt:P21 wd:Q6581097;
       wdt:P25 ?child.
  ?edition wdt:P1433 ?collection.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr". }
}
Try it!
  • Fathers and children in srpELTeC and srpELTeC-extended collection
SELECT DISTINCT ?father ?fatherLabel ?child ?childLabel
WHERE {
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P674 ?father;
         wdt:P747 ?edition.
    ?father wdt:P21 wd:Q6581097;
       wdt:P22 ?child.
  ?edition wdt:P1433 ?collection.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr,en". }
Try it!

Statistics in srpETLeC

[edit]
  • Number of pages per novel
# Number of pages per novel in SrpELTeC collection
SELECT DISTINCT ?novel ?novelLabel ?collection ?collectionLabel ?numpage
WHERE {
  # novel in collection srpELTeC (Q106936149) and srpELTeC-extended (Q109123373)
  VALUES ?collection { wd:Q106936149 wd:Q109123373 }
  ?novel wdt:P31 wd:Q7725634;
         wdt:P747 ?edition.
  ?edition wdt:P1433 ?collection;
           wdt:P1104 ?numpage.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "sr". }
}
Try it!
  • Number of mentioned places per novel
SELECT   ?novel ?nid (COUNT(DISTINCT ?place) as ?count)
WHERE {
  VALUES ?collection {
    wd:Q106936149
    wd:Q109123373
  }
    ?novel  wdt:P31  wd:Q7725634;
            wdt:P50 ?author;
            wdt:P747 ?edition.
            ?edition wdt:P1433 ?collection.
    OPTIONAL {
		?novel wdt:P840 ?place.
	}
    OPTIONAL {
		?novel rdfs:label ?nid
        filter (lang(?nid) = "sr")
	}
}
GROUP BY ?novel ?nid
Try it!

SrpKor queries

[edit]
  • Sum per collections
  • Words (per collection and for novel)
  • Naration places (per collection and for novel)
  • Characters (per collection and for novel)
  • Male and female authors
  • Short novels...