Zoom Logo

Writing Wikidata queries - Shared screen with speaker view
Mahir Morshed
30:52
https://etherpad.wikimedia.org/p/swt-2020-queries (for those that did not see it already)
Mahir Morshed
39:46
https://etherpad.wikimedia.org/p/swt-2020-queries(for those that did not see it already)
sushant Savla
44:04
relogin and click on button join via audio device button
Muthuramalingam
44:13
yes
RAMU SHETTY
44:14
yes
shrini
44:14
yes. we see
Piyush Maurya
44:17
Yes
Manik Soren
44:29
yes
Jinoy
44:47
Yes
Piyush Maurya
46:20
You can start with basic
Muthuramalingam
52:30
yes, you can move on
Suyash Dwivedi
53:06
yes
Suyash Dwivedi
53:13
fine
Manik Soren
53:25
nice
Suyash Dwivedi
54:24
please shere link here
Tiven2240
55:01
https://reasonator.toolforge.org/
Suyash Dwivedi
55:06
thanks
Durga Soren
56:05
Durga Soren - Santali Wikipedia
Muthuramalingam
01:03:20
no
Suyash Dwivedi
01:13:13
ya
Suyash Dwivedi
01:13:36
please move
Muthuramalingam
01:17:22
what is the query language used here
Jinoy
01:17:35
sparql
Muthuramalingam
01:17:39
ok thanks
Satpal Singh
01:19:44
yes
Suyash Dwivedi
01:20:14
link
Mahir Morshed
01:20:30
https://query.wikidata.org/
Muthuramalingam
01:21:28
yes
Jinoy
01:21:30
Yes
Satpal Singh
01:21:40
yes..
Piyush Maurya
01:21:40
Yes
shrini
01:21:51
what is P31?
Manik Soren
01:21:52
yes
Bodhisattwa
01:22:02
P31 is instance of
shrini
01:22:02
how to relate that with this query?
shrini
01:22:07
ok
Muthuramalingam
01:22:38
Query is malformed: Encountered " "?" "? "" at line 1, column 8.
Muthuramalingam
01:23:05
ok
Muthuramalingam
01:23:10
ok I will copy
Bodhisattwa
01:23:15
instance of (P31) describes what actually the item is
shrini
01:23:17
select ?i{?i wdt:P31 wd:Q842402}
shrini
01:23:32
this works
Bodhisattwa
01:24:01
it works same for Linux
Muthuramalingam
01:24:08
it works fine now
Muthuramalingam
01:24:59
yes
Satpal Singh
01:25:05
on mac it’s same “control+space”
Jinoy
01:25:20
SELECT ?i {?i wdt:P31 wd:Q146}147
Bodhisattwa
01:25:21
Please mute Durga's audio, @Srishti
Srishti Sethi
01:25:53
Thanks Bodhi for informing, just did!
Bodhisattwa
01:26:10
Thanks
shrini
01:26:40
capital - Q5519 gives 388 results
shrini
01:27:32
fort - Q1785071 - 2863 result
Bodhisattwa
01:28:32
Village in India gives 143999 results ;-)
Tiven2240
01:29:38
ok here
Suyash Dwivedi
01:32:18
SELECT?i {?i wdt:P31 wd:Q229058}
Satpal Singh
01:34:16
yes
Bodhisattwa
01:38:03
RDF ==> Resource Description Framework
Bodhisattwa
01:38:05
https://en.wikipedia.org/wiki/Resource_Description_Framework
Bodhisattwa
01:39:13
rdfs ==> Resource Description Framework Schema
Bodhisattwa
01:39:15
https://en.wikipedia.org/wiki/RDF_Schema
shrini
01:45:43
My firefox hangs for some big queryes
RAMU SHETTY
01:45:48
SELECT ?i ?iLabel ?iDescription ?iAltLabel {?i wdt:P31 wd:Q729.?i rdfs:label ?iLabel.?i schema:description ?iDescription.?i skos:altLabel ?iAltLabel.} 264685 results
Jay Prakash
01:46:09
Hi, Mahir
Mahir Morshed
01:46:52
https://etherpad.wikimedia.org/p/swt-2020-queries (for Jay and others who may not have seen it)
Muthuramalingam
01:46:55
select ?i ?iLabel ?iDescription{?i wdt:P31 wd:Q39367.?i rdfs:label ?iLabel.?i schema:description ?iDescription.?i skos:altLabel ?iAltLabel.}
Muthuramalingam
01:47:11
I tried this and got
Muthuramalingam
01:47:12
1985023 results in 30190 ms
Piyush Maurya
01:47:17
Query is malformed: Encountered " <VAR1> "?iLabel "" at line 3, column 17.
Piyush Maurya
01:47:29
I copied everything from you.
Muthuramalingam
01:47:29
yes
Muthuramalingam
01:47:33
I will change it
shrini
01:47:58
any way to get only 10 results?
shrini
01:48:40
like LIMIT 10 in sql
shrini
01:49:43
thanks
Muthuramalingam
01:50:35
select ?i ?iLabel ?iDescription ?iAltLabel{?i wdt:P31 wd:Q436240.?i rdfs:label ?iLabel.?i schema:description ?iDescription.?i skos:altLabel ?iAltLabel.}LIMIT 100
Satpal Singh
01:50:36
SELECT ?iLabel ?iDescription ?iAltlabel {?i wdt:P31 wd:Q7725634.?i rdfs:label ?iLabel.?i schema:description ?iDescription.?i skos:altLabel ?iAltLabel.}LIMIT 10000
Muthuramalingam
01:50:38
try this
Satpal Singh
01:50:48
I’ve tried this and it worked well
Soumendra Sahoo
01:51:10
Are you going to tell us about sorting, duplicate removal and grouping of the results? Are there such options?
Satpal Singh
01:51:19
I tried without LIMIT but it showed server error.
Suyash Dwivedi
01:52:17
internet issue
Soumendra Sahoo
01:52:19
thanks
Srishti Sethi
01:53:34
@Mahir Maybe we should give a 5-10 minute break, I believe we are half way through the session?
Muthuramalingam
01:54:29
ok, will be back by 10.45
Srishti Sethi
01:54:58
Yes, resuming at 10:45 starts like a good idea :)
Soumendra Sahoo
01:55:06
Sorry, I joined a bit late. Can you please share the slide link ?
shrini
01:55:33
mahir, add the query examples to therpad too
shrini
01:55:41
will be good to copy/paste and run
Mahir Morshed
01:55:48
I have not uploaded the slides yet, but you can see what is written here: https://etherpad.wikimedia.org/p/swt-2020-queries
shrini
01:55:51
as many have slow internet and slow typing speed
Mahir Morshed
01:56:05
(also rather than copy-paste, try making some changes to it and see what happens :-) )
Soumendra Sahoo
01:56:34
I echo Srini, if you can paste the queries on the Etherpad, it will be useful. Thanks.
Mahir Morshed
01:57:49
(again, please consider making some changes when you try these queries yourself!)
Soumendra Sahoo
01:58:42
sure
sushant Savla
02:00:51
We have seen Example to include temples in India, Is there any way to extract data excluding India for example.
Soumendra Sahoo
02:01:10
Is there any way to stop executing long running queries?
Mahir Morshed
02:01:51
@sushant It is possible to make exclusions happen; I hope we can get to this soon.
Mahir Morshed
02:02:35
@Soumendra Queries on the Wikidata Query Service are killed after a minute of execution; I am not sure of a way to terminate it beforehand besides closing the tab
Soumendra Sahoo
02:02:56
Ok, thanks
Muthuramalingam
02:04:20
present
Satpal Singh
02:04:24
we can start
Muthuramalingam
02:06:02
yes, for sure - we edit and learn as you suggested
Soumendra Sahoo
02:13:37
186 in Odia
Muthuramalingam
02:13:48
please try "ta"
Soumendra Sahoo
02:13:53
Yes Hindu temples
Muthuramalingam
02:14:00
I couldn't see description
sushant Savla
02:14:11
I got 90 for Gu
Jinoy
02:15:38
SELECT ?i ?iLabel {?i wdt:P31 wd:Q4022.?i wdt:P17 wd:Q668.?i rdfs:label ?iLabel.FILTER (LANGMATCHES(LANG(?iLabel),"en"))}
Jinoy
02:16:03
Why it is getting multiple results...???
Satpal Singh
02:18:14
I got repetition of items in my query results
Satpal Singh
02:20:27
how to exclude others apart from only “zh”
Muthuramalingam
02:20:56
In my understanding: wd is a subset of wdt. Is this correct?
Satpal Singh
02:21:53
okay fine
Satpal Singh
02:21:56
I got it
Muthuramalingam
02:24:25
ok, wdt is for mentioning Property(Characteristics), wd is for specific object (LIke Country)
Muthuramalingam
02:24:28
couldn't hear you
shrini
02:24:38
yes
Bodhisattwa
02:24:40
yes
shrini
02:24:43
I hear
Satpal Singh
02:24:44
yes it’s audible
Muthuramalingam
02:25:10
ok, let me check my internet
Bodhisattwa
02:28:10
Muthu is asking the host to let him enter
Bodhisattwa
02:28:23
@Srishti
Jay Prakash
02:29:24
wait a minute
Srishti Sethi
02:29:46
Did!
Bodhisattwa
02:37:10
For those who are copying , u can type SER and then CTRL+Space, the code will come in second
Soumendra Sahoo
02:37:17
Yes, working
Jinoy
02:37:53
SELECT ?i ?iLabel {?i wdt:P31 wd:Q4022.?i wdt:P17 wd:Q668.?i rdfs:label ?iLabel.SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }}
Muthuramalingam
02:49:41
SELECT ?i ?sitelink ?name ?isPartOf{?i wdt:P31 wd:Q842402.?sitelink schema:about ?i; schema:isPartOf ?isPartOf <https://bn.wikipedia.org/>";schema:name ?name;schema:inLanguage "bn"}
Muthuramalingam
02:49:49
May I know the error please here
Satpal Singh
02:50:19
Worked with me
Muthuramalingam
02:51:09
ok thanks
Muthuramalingam
02:51:28
yes, it worked
Jinoy
02:53:21
Yes.. It works.. :)
Jinoy
02:53:33
Ya.. Rivers
Soumendra Sahoo
02:55:14
Worked
AshokChakra
02:55:17
yes
shrini
02:55:17
works for me
Bodhisattwa
03:00:50
use temples instead of Hindu temples for Birbhum district
Satpal Singh
03:07:11
yes
Piyush Maurya
03:07:22
yes
Bodhisattwa
03:08:16
Please continue
Jinoy
03:08:40
Yes Sure.. Please continue
Satpal Singh
03:08:46
I would like to continue
Jay Prakash
03:08:50
Thank you very very much for taking such awesome session.
Suyash Dwivedi
03:09:33
Nice session
Jay Prakash
03:09:33
it is really a awesome session.
Muthuramalingam
03:09:35
Very useful session indeed
Bodhisattwa
03:09:46
We can continue, those who want to
Muthuramalingam
03:09:49
Thanks for your time
Satpal Singh
03:10:10
Is that pdf available online, which you have prepared?
Bodhisattwa
03:10:19
@Mahir, please continue for those who want to continue
Srishti Sethi
03:10:57
Does everyone want to do a quick group photo before we all leave? :)
Srishti Sethi
03:11:11
You can keep your video off if you like, no compulsion.
Jinoy
03:11:19
:)
Muthuramalingam
03:12:06
Yes
AshokChakra
03:12:20
Thank You!!!!!!!!!!!!!
Soumendra Sahoo
03:12:24
Thank you all
Satpal Singh
03:12:41
okay thank you
Durga Soren
03:12:48
thanks to all
Suyash Dwivedi
03:12:52
Thank you alll
Jinoy
03:13:04
Thank you Mahir and the team for conducting this online section..
Suyash Dwivedi
03:13:41
photo?
Satpal Singh
03:13:51
let’s take group photo