query-e4330c7501da5f4cc9bb8e5f92aeff5e

rq turtle/ttl

Fixing up the details: Timeline within the window for a wider year span? the viewHi, I would like to show all items (publications & printed matter Q732577 Q1261026) in a timeline, but would like to round up to year (no YYYYMMDD format) and show the labels, not the QIDs as they appear now. I tried some solutions adding itemLabel and placeLabel at different positions in the expression, but not my forte... it did not work out. Additionally, would it possible to expand horizontally

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# tool: scholia
#defaultView:Timeline
SELECT ?item ?label ?place ?argitaratze_data WHERE {
  VALUES ?type {
    wd:Q732577 wd:Q1261026
  }
  ?item wdt:P31 ?type;
    wdt:P577 ?argitaratze_data.
  FILTER((?argitaratze_data > "1700-01-01"^^xsd:dat) && (?argitaratze_data < "1799-12-31"^^xsd:dat))
  BIND(YEAR(?argitaratze_data) as ?year_)
  VALUES ?place {wd:Q8692 wd:Q10313 wd:Q497801 wd:Q14318 wd:Q10282 wd:Q134674}  
  ?item wdt:P291 ?place.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en, eu". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?argitaratze_data"):::projected v3("?item"):::projected v5("?place"):::projected v2("?type") v4("?year_") c9(["#91;AUTO_LANGUAGE#93;,en, eu"]):::literal c7(["bd:serviceParam"]):::iri f0[["?argitaratze_data > s1700-01-01^^<http://www.w3.org/2001/XMLSchema#dat>'?argitaratze_data < s1799-12-31^^<http://www.w3.org/2001/XMLSchema#dat>'"]] f0 --> v1 bind1[/VALUES ?type/] bind1-->v2 bind10(["wd:Q732577"]) bind10 --> bind1 bind11(["wd:Q1261026"]) bind11 --> bind1 v3 --"wdt:P31"--> v2 v3 --"wdt:P577"--> v1 bind2[/"year-from-dateTime(?argitaratze_data)"/] v1 --o bind2 bind2 --as--o v4 bind3[/VALUES ?place/] bind3-->v5 bind30(["wd:Q8692"]) bind30 --> bind3 bind31(["wd:Q10313"]) bind31 --> bind3 bind32(["wd:Q497801"]) bind32 --> bind3 bind33(["wd:Q14318"]) bind33 --> bind3 bind34(["wd:Q10282"]) bind34 --> bind3 bind35(["wd:Q134674"]) bind35 --> bind3 v3 --"wdt:P291"--> v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c7 --"wikibase:language"--> c9 end