Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Chart of P921 usage
- # Note: this chart is based on https://www.wikidata.org/wiki/Template:Property_uses
- # which is updated once a day by PLbot
- #defaultView:LineChart
- SELECT ?DAY ?COUNT ?property {
- values (?property) {("921") ("50") ("2093")}
- BIND (CONCAT("|", ?property, "=") AS ?p)
- BIND (CONCAT(".+\\", ?p, "(\\d+).+") AS ?r)
- SERVICE wikibase:mwapi {
- bd:serviceParam wikibase:api "Generator" ; wikibase:endpoint "www.wikidata.org" ; mwapi:generator "allpages" ;
- mwapi:gapfrom "Property_uses" ; mwapi:gapto "Property_uses" ; mwapi:gapnamespace "10" ;
- mwapi:prop "revisions" ; mwapi:rvprop "content|timestamp" ; mwapi:rvlimit "50" ; mwapi:rvuser "PLbot" .
- ?t1 wikibase:apiOutput "revisions/rev[1]/@timestamp" . ?r1 wikibase:apiOutput "revisions/rev[1]/text()" .
- }
- BIND (IF(CONTAINS(?r1, ?p), xsd:integer(REPLACE(?r1, ?r, "$1")), -1) AS ?COUNT)
- FILTER (?COUNT != -1)
- BIND (xsd:dateTime(?t1) AS ?DAY)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement