User:Ash Crow/xkcd
Dashboard
editall entities | count | all groupings | without grouping property | below threshold (20) | Querying about comic strip (Q838795) , xkcd (Q13915)
Top groupings (Minimum 20 items) | Top Properties (used at least 10 times per grouping) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | Count | title (P1476) | author (P50) | language of work or name (P407) | publication date (P577) | depicts (P180) | URL (P2699) | issue (P433) | copyright license (P275) | part of the series (P179) | main subject (P921) | full work available at URL (P953) | has part(s) of the class (P2670) |
Totals (all items): | 2189 | 20.15% (441) | 100.0% (2189) | 86.66% (1897) | 99.91% (2187) | 49.57% (1085) | 22.52% (493) | 100.0% (2189) | 86.84% (1901) | 0.05% (1) | 2.88% (63) | 77.39% (1694) | 0.96% (21) |
Queries
editProperties used on xkcd comic strips
editThe following query uses these:
- Items: comic strip (Q838795) , xkcd (Q13915)
- Properties: instance of (P31) , part of (P361)
SELECT DISTINCT ?p ?prop ?propLabel (count(?item) as ?uses) WHERE { ?item wdt:P31 wd:Q838795 ; wdt:P361 wd:Q13915 . ?item ?p ?y . ?prop wikibase:directClaim ?p . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr, en". } } GROUP BY ?p ?prop ?propLabel ORDER BY DESC(?uses)
Number of xkcd by weekday of publication
editThe following query uses these:
- Items: comic strip (Q838795) , xkcd (Q13915)
- Properties: instance of (P31) , part of (P361) , publication date (P577)
SELECT ?weekday (COUNT(?xkcd) AS ?count) (xsd:integer(?offset + 1) AS ?dayorder) WHERE { ?xkcd wdt:P31 wd:Q838795; wdt:P361 wd:Q13915; p:P577/psv:P577 [ wikibase:timeValue ?date; wikibase:timePrecision ?precision ]. FILTER(?precision >= "11"^^xsd:integer) # calculate the weekday as the offset from January first, 1973 (arbitrary Monday that preceeds the first xkcd) modulo 7 # SPARQL has no modulo operator, so this gets finicky BIND(?date - "1973-01-01"^^xsd:dateTime AS ?offsetInt) BIND(?offsetInt - (7 * xsd:integer(xsd:float(?offsetInt) / 7.0)) AS ?offsetSigned) BIND(IF(?offsetSigned < 0, ?offsetSigned + 7, ?offsetSigned) AS ?offset) BIND(IF(?offset = 0, "Monday"@en, IF(?offset = 1, "Tuesday"@en, IF(?offset = 2, "Wednesday"@en, IF(?offset = 3, "Thursday"@en, IF(?offset = 4, "Friday"@en, IF(?offset = 5, "Saturday"@en, IF(?offset = 6, "Sunday"@en, "unknown day"@en))))))) AS ?weekday) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } GROUP BY ?weekday ?offset ORDER BY ?dayorder