I'm looking to use the https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer remko@remkodekeijzer.nl wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Maybe I misunderstood. I think the item label is actually what's used in the wikipedia article url, just convert spaces to underscores?
Thanks!
On Mon, Nov 9, 2015 at 11:47 AM, Hampton Snowball <hamptonsnowball@gmail.com
wrote:
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer <remko@remkodekeijzer.nl
wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
No. The label is the label in Wikidata. Not a sitelink. You're not querying Wikipedia, but Wikidata. If you really need the sitelink, I hope someone else can help you further, since I'm a mere beginner at SPARQL and was happy I could get this result.
Thank you for doing what you could! In terms of wikipedia links it does look like the wikidata records do link to wikpedia, e.g. at the bottom of this record:
https://www.wikidata.org/wiki/Q25369
Since there is multiple wikpedia entries, I guess I'd be going for the "en" english one.
Best, HS
On Mon, Nov 9, 2015 at 12:18 PM, Remko de Keijzer remko@remkodekeijzer.nl wrote:
No. The label is the label in Wikidata. Not a sitelink. You're not querying Wikipedia, but Wikidata. If you really need the sitelink, I hope someone else can help you further, since I'm a mere beginner at SPARQL and was happy I could get this result.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 18:13 schreef Hampton Snowball:
Maybe I misunderstood. I think the item label is actually what's used in the wikipedia article url, just convert spaces to underscores?
Thanks!
On Mon, Nov 9, 2015 at 11:47 AM, Hampton Snowball < hamptonsnowball@gmail.comhamptonsnowball@gmail.com> wrote:
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer < remko@remkodekeijzer.nlremko@remkodekeijzer.nl> wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002&limit=500&from=21542767&back=20967485 https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi Hampton,
The SPARQL syntax needed to extract wiki-sitelinks isn't the best, and with luck will get updated when the data design is next reviewed. (Something like the proposed new scheme for identifiers would be better). But I think the following should be more or less what you were asking for:
tinyurl.com/nsfwr8k
All best,
James.
On 09/11/2015 17:25, Hampton Snowball wrote:
Thank you for doing what you could! In terms of wikipedia links it does look like the wikidata records do link to wikpedia, e.g. at the bottom of this record:
https://www.wikidata.org/wiki/Q25369
Since there is multiple wikpedia entries, I guess I'd be going for the "en" english one.
Best, HS
On Mon, Nov 9, 2015 at 12:18 PM, Remko de Keijzer remko@remkodekeijzer.nl wrote:
No. The label is the label in Wikidata. Not a sitelink. You're not querying Wikipedia, but Wikidata. If you really need the sitelink, I hope someone else can help you further, since I'm a mere beginner at SPARQL and was happy I could get this result.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 18:13 schreef Hampton Snowball:
Maybe I misunderstood. I think the item label is actually what's used in the wikipedia article url, just convert spaces to underscores?
Thanks!
On Mon, Nov 9, 2015 at 11:47 AM, Hampton Snowball < hamptonsnowball@gmail.comhamptonsnowball@gmail.com> wrote:
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer < remko@remkodekeijzer.nlremko@remkodekeijzer.nl> wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002&limit=500&from=21542767&back=20967485 https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
This StackExchange answer describes how to get site links:
http://opendata.stackexchange.com/questions/6050/get-wikipedia-urls-sitelink...
You could graft in the appropriate clause from that answer to get enwiki sitelinks. It looks like there are a total of 37092 Twitter handles, of which 29945 have links to enwiki and 29930 have an English label as well (of course you could get the English names for the others by looking at the title of the Wikipedia article).
Two things to be aware of are that this isn't a one-to-one correspondence and the quality of the links varies, so, for example, @ADFP_Peru has 7 English wikipedia articles nominally "about" it, but none of them actually describe the Peruvian professional football association. That article is the rather generically named https://en.wikipedia.org/wiki/Professional_Football_Sports_Association
There are only ~160 Twitter accounts with multiple articles though. All 22 the links for the account @status should be ignored as their the result of a bots bad parse of things like the link to https://twitter.com/WAFCA/status/410033143148978176 in https://en.wikipedia.org/wiki/Tye_Sheridan#cite_note-22
Tom
prefix schema: http://schema.org/ PREFIX wd: http://www.wikidata.org/entity/ PREFIX wdt: http://www.wikidata.org/prop/direct/ PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
SELECT ?Twitter ?item ?item_label ?article WHERE { {?item wdt:P2002 ?Twitter FILTER(?Twitter = "ADFP_Peru") } {?item rdfs:label ?item_label filter (lang(?item_label) = "en") .} { ?article schema:about ?item . FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/") } }
On Mon, Nov 9, 2015 at 12:25 PM, Hampton Snowball <hamptonsnowball@gmail.com
wrote:
Thank you for doing what you could! In terms of wikipedia links it does look like the wikidata records do link to wikpedia, e.g. at the bottom of this record:
https://www.wikidata.org/wiki/Q25369
Since there is multiple wikpedia entries, I guess I'd be going for the "en" english one.
Best, HS
On Mon, Nov 9, 2015 at 12:18 PM, Remko de Keijzer <remko@remkodekeijzer.nl
wrote:
No. The label is the label in Wikidata. Not a sitelink. You're not querying Wikipedia, but Wikidata. If you really need the sitelink, I hope someone else can help you further, since I'm a mere beginner at SPARQL and was happy I could get this result.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 18:13 schreef Hampton Snowball:
Maybe I misunderstood. I think the item label is actually what's used in the wikipedia article url, just convert spaces to underscores?
Thanks!
On Mon, Nov 9, 2015 at 11:47 AM, Hampton Snowball < hamptonsnowball@gmail.comhamptonsnowball@gmail.com> wrote:
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer < remko@remkodekeijzer.nlremko@remkodekeijzer.nl> wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002&limit=500&from=21542767&back=20967485 https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Freebase has another 18,000 Twitter handles which are linked to IMDB, G+, etc which don't have English Wikipedia links (as well as 13K which are linked to English Wikipedia, although those should be in Wikidata too). http://tinyurl.com/omb6bxf
I know some Wikipedias actively discourage links to social networking sites like Twitter [1]. What is Wikidata's position on Twitter handles? Is the existence of the property P2002 sufficient justification to fill it in? (Unlike enwiki's "Yes, we have Twitter template, but you shouldn't be using it" stance [2]).
Tom
[1] https://en.wikipedia.org/wiki/Wikipedia:External_links#Links_normally_to_be_... [2] https://en.wikipedia.org/wiki/Template:Twitter
I think a lot of the freebase handles can be out of date and incorrect in what I previously saw.
On Mon, Nov 9, 2015 at 2:56 PM, Tom Morris tfmorris@gmail.com wrote:
Freebase has another 18,000 Twitter handles which are linked to IMDB, G+, etc which don't have English Wikipedia links (as well as 13K which are linked to English Wikipedia, although those should be in Wikidata too). http://tinyurl.com/omb6bxf
I know some Wikipedias actively discourage links to social networking sites like Twitter [1]. What is Wikidata's position on Twitter handles? Is the existence of the property P2002 sufficient justification to fill it in? (Unlike enwiki's "Yes, we have Twitter template, but you shouldn't be using it" stance [2]).
Tom
[1] https://en.wikipedia.org/wiki/Wikipedia:External_links#Links_normally_to_be_... [2] https://en.wikipedia.org/wiki/Template:Twitter
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Thanks to everyone who added their answers - this all did the trick! :)
On Mon, Nov 9, 2015 at 1:59 PM, Tom Morris tfmorris@gmail.com wrote:
This StackExchange answer describes how to get site links:
http://opendata.stackexchange.com/questions/6050/get-wikipedia-urls-sitelink...
You could graft in the appropriate clause from that answer to get enwiki sitelinks. It looks like there are a total of 37092 Twitter handles, of which 29945 have links to enwiki and 29930 have an English label as well (of course you could get the English names for the others by looking at the title of the Wikipedia article).
Two things to be aware of are that this isn't a one-to-one correspondence and the quality of the links varies, so, for example, @ADFP_Peru has 7 English wikipedia articles nominally "about" it, but none of them actually describe the Peruvian professional football association. That article is the rather generically named https://en.wikipedia.org/wiki/Professional_Football_Sports_Association
There are only ~160 Twitter accounts with multiple articles though. All 22 the links for the account @status should be ignored as their the result of a bots bad parse of things like the link to https://twitter.com/WAFCA/status/410033143148978176 in https://en.wikipedia.org/wiki/Tye_Sheridan#cite_note-22
Tom
prefix schema: http://schema.org/ PREFIX wd: http://www.wikidata.org/entity/ PREFIX wdt: http://www.wikidata.org/prop/direct/ PREFIX rdfs: http://www.w3.org/2000/01/rdf-schema#
SELECT ?Twitter ?item ?item_label ?article WHERE { {?item wdt:P2002 ?Twitter FILTER(?Twitter = "ADFP_Peru") } {?item rdfs:label ?item_label filter (lang(?item_label) = "en") .} { ?article schema:about ?item . FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/") } }
On Mon, Nov 9, 2015 at 12:25 PM, Hampton Snowball < hamptonsnowball@gmail.com> wrote:
Thank you for doing what you could! In terms of wikipedia links it does look like the wikidata records do link to wikpedia, e.g. at the bottom of this record:
https://www.wikidata.org/wiki/Q25369
Since there is multiple wikpedia entries, I guess I'd be going for the "en" english one.
Best, HS
On Mon, Nov 9, 2015 at 12:18 PM, Remko de Keijzer < remko@remkodekeijzer.nl> wrote:
No. The label is the label in Wikidata. Not a sitelink. You're not querying Wikipedia, but Wikidata. If you really need the sitelink, I hope someone else can help you further, since I'm a mere beginner at SPARQL and was happy I could get this result.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 18:13 schreef Hampton Snowball:
Maybe I misunderstood. I think the item label is actually what's used in the wikipedia article url, just convert spaces to underscores?
Thanks!
On Mon, Nov 9, 2015 at 11:47 AM, Hampton Snowball < hamptonsnowball@gmail.comhamptonsnowball@gmail.com> wrote:
Thank you. Is there a way to export it though with the Wikipedia Article name with underscores or wikipedia url? So like Barack_Obama or en.wikipedia.org/wiki/Barack_Obama.
On Mon, Nov 9, 2015 at 11:34 AM, Remko de Keijzer < remko@remkodekeijzer.nlremko@remkodekeijzer.nl> wrote:
I think this: http://tinyurl.com/o5lahko is what you wanted. It's got the item ID, the label and the value of P2002.
-- Mbch331
When you have eliminated the impossible, whatever remains, however improbable, must be the truth. (Sir Arthur Conan Doyle)
Op 9-11-2015 om 17:09 schreef Hampton Snowball:
I'm looking to use the https://query.wikidata.org/ https://query.wikidata.org/ interface to export to csv all wikidatas with this property P2002.
https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002&limit=500&from=21542767&back=20967485 https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2...
I am looking for the Wikipedia Article_Name + the value associated with that property.
Thanks in advance!
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing listWikidata@lists.wikimedia.orghttps://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata