[10:38:10] maxlath: Hey, I saw two days ago you were looking at creating items in one hit like ResearchBot does. You should look at WikidataIntegrator and how it does it since that is what Fatameh uses (which is what ResearchBot uses). I think the place to start would be the write method in here https://github.com/SuLab/WikidataIntegrator/blob/master/wikidataintegrator/wdi_core.py. [10:41:03] thanks tarrow, I got it to work :) it was an issue with qualifiers snak formatting [10:41:14] https://github.com/maxlath/wikidata-edit/tree/master/lib/entity [10:41:32] yay! I thought my message might have been a little late (forgot to press enter two days ago) :) [13:07:06] hi [13:07:31] I want to filter items that have a specific statement. how can I do that? [13:07:56] if it has a certains statement, don't show it [14:06:25] fragenfragenfrag: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries#Excluding_subsets ? [14:06:32] not sure if I understand your question correctly [14:08:37] andre__: you have [14:08:41] thank you [14:09:06] huh, I hadn’t seen that before andre__ [14:09:10] “Currently, in almost all circumstances, Blazegraph resolves all of these to the same query plan.” [14:09:15] that sounds very surprising :) [14:21:46] do wikipedia contributors complian if interwiki links disappear for semantic reasons? [14:22:00] complain [14:45:54] a 'clone this item' function would be nice ^^ [16:23:07] hey, can I remove certain conntections in the graph view? [16:36:13] I have ?a wdt:P361 ?b. ?b wdt:P361 ?c. [16:36:39] unfortunately there is also a connection between ?a and ?c [16:40:57] I think you would have to split them up into two results, somehow [16:42:30] Lucas_WMDE: do you have an example? [16:44:50] no simple one, I’m afraid… but you could look at ?toggle in https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples#A_network_of_Drug-disease_interactions_on_infectious_diseases_.28Source:_Disease_Ontology.2C_NDF-RT_and_ChEMBL.29, or at the “fan out …” part of http://tinyurl.com/ycxpwd8l [16:45:53] I'm afraid I'm too drunk 😆 [16:52:49] no it seemed like it worked [16:54:01] ok cool :) [16:57:23] it just seems like it wouldn't create `?itemLabel`s [16:58:36] https://cdn-images-1.medium.com/max/1200/1*snTXFElFuQLSFDnvZKJ6IA.png [17:07:21] can I include a certain item into the graph? [17:07:42] lets say, whatever the result is I want Q42 as well [17:08:29] and if it is connected to something, connect it [17:08:41] you can wrap everything you currently have inside the SELECT { … } inside another pair of braces and UNION it with something else [17:08:41] e. g. SELECT { { … } UNION { BIND(wd:Q42 AS ?item) } } [17:09:04] depending on the query it may make more sense to have the label service inside the … part or outside of it, at the end [17:14:55] Lucas_WMDE: it wouldn't draw the connections between Q42 and everything else [17:15:12] what do you want it to be connected with? [17:16:12] every P361 connection [17:16:30] with items on the other side of the UNION [17:17:32] Have created a query for the most populous cities in the world http://tinyurl.com/y77u6zbo need some help to remove the duplicates from the results. [17:18:29] planemad: SELECT → SELECT DISTINCT is hopefully enough [17:19:14] Lucas_WMDE, perfect! was hunting through docs endlessly for this [17:21:59] Also, how do i display just the Qid for each row for a CSV export? http://tinyurl.com/y8et6356 [17:25:37] you can do some silly construction like http://tinyurl.com/yc4m4rgz [17:25:54] but I’d prefer to do that when processing the CSV, to keep the query clean :) [17:27:05] ouch, thought there might be a more direct way [17:27:53] from what I hear, people usually replace http://www.wikidata.org/entity/ with in Excel/Calc [17:31:37] Was hoping to do as much in the query itself to produce a clean output [17:32:29] Is it possible to rename a column like `(?cityLabel AS ?name)`? this doesn't seem to work [17:33:32] this works, but it confuses the label service [17:34:16] you have to explicitly tell it which variables belong together, with this: http://tinyurl.com/y9674h9j [17:34:28] but then you might as well do: http://tinyurl.com/yaeylyvp [17:35:30] aha that makes sense [17:42:05] This is looking good http://tinyurl.com/yajt3prm . Noticed a few duplicate cities like Sydney and Hanoi since Wikidata has multiple coordinates [17:42:49] is there a simple way to reconcile that with some logic? [17:43:06] in that case you would use grouping [17:44:24] http://tinyurl.com/ybl5lz4n [17:44:36] (check if the aggregate functions – MIN/MAX/SAMPLE – make sense) [17:49:04] oo [17:50:39] looks perfect, just checking again [17:59:31] can I set qualifiers with quickstatements? [18:30:24] how can I set dates in quickstatements?