Re: [Wikidata] Query Help - Stock Symbols and Wikipedia Pages

2016-10-13 Thread Denny Vrandečić
As far as I can tell on https://www.wikidata.org/wiki/Q156578 VW indeed has
three different stock symbols.

On Thu, Oct 13, 2016 at 1:34 PM Hampton Snowball 
wrote:

> Hi Stas - Thank you so much for your response! It seems the difference
> between 1 and 2 is that for the same company name, their are multiple
> symbols?
>
> In terms of labeling the symbols - i'd be nice to have that label
> information (nyse) in another column, however I can get away with this as
> is so thank you for your help!
>
>
> On Thu, Oct 13, 2016 at 3:50 PM, Stas Malyshev 
> wrote:
>
> Hi!
>
> > There are only 73 entries (including some duplicates) showing up for a
> > straight P249 search, which is a bit strange in any case -
> >
> >
> https://query.wikidata.org/#SELECT%20%3Fitem%20%20%3Fstock%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP249%20%3Fstock%20.%0A%20%7D
> >
> > Sampling a few items suggests that most businesses don't use P249
> > directly, instead they use it as a qualifier on P414, eg
> > https://www.wikidata.org/wiki/Q156578 or
> > https://www.wikidata.org/wiki/Q156238
>
> You can use something like this: http://tinyurl.com/hdoqrjt
>
> The key thing there is UNION - that's how you do "this or that".
>
> Note though ticker symbols are not unique (they are per exchange) so you
> may want to either group: http://tinyurl.com/jmbrf4p or add stock
> exchange name to it or do something else, depending on your case.
>
> --
> Stas Malyshev
> smalys...@wikimedia.org
>
> ___
> 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


Re: [Wikidata] Query Help - Stock Symbols and Wikipedia Pages

2016-10-13 Thread Hampton Snowball
Thank you Andrew. You are pointing out that simply trying to export p249
alone is not working properly or needs a different query, I see.

On Thu, Oct 13, 2016 at 3:02 PM, Hampton Snowball  wrote:

> When I got to the 'what links here' for p249 seems like a lot more
> (hundreds) of entries:
>
> https://www.wikidata.org/wiki/Special:WhatLinksHere/Property:P249
>
>
> On Thu, Oct 13, 2016 at 2:20 PM, Andrew Gray 
> wrote:
>
>> There are only 73 entries (including some duplicates) showing up for a
>> straight P249 search, which is a bit strange in any case -
>>
>> https://query.wikidata.org/#SELECT%20%3Fitem%20%20%3Fstock%
>> 20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP249%20%3Fstock%20.%0A%20%7D
>>
>> Sampling a few items suggests that most businesses don't use P249
>> directly, instead they use it as a qualifier on P414, eg
>> https://www.wikidata.org/wiki/Q156578 or
>> https://www.wikidata.org/wiki/Q156238
>>
>> These won't show up on a straight search. I'm not familiar with how
>> searching for qualifiers is best done, but at least it narrows down
>> the problem...
>>
>> A.
>>
>> On 13 October 2016 at 18:42, Hampton Snowball 
>> wrote:
>> > I took another query from this list and have been trying to modify it
>> to get
>> > stock symbols and there wikipedia pages.  But I am only getting 64
>> results.
>> > Am I  doing something wrong, filtering the results?
>> >
>> > http://tinyurl.com/go8zpvy
>> >
>> > Thanks in advance!
>> >
>> > Hampton
>> >
>> > ___
>> > Wikidata mailing list
>> > Wikidata@lists.wikimedia.org
>> > https://lists.wikimedia.org/mailman/listinfo/wikidata
>> >
>>
>>
>>
>> --
>> - Andrew Gray
>>   andrew.g...@dunelm.org.uk
>>
>> ___
>> 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


Re: [Wikidata] Query Help - Stock Symbols and Wikipedia Pages

2016-10-13 Thread Hampton Snowball
When I got to the 'what links here' for p249 seems like a lot more
(hundreds) of entries:

https://www.wikidata.org/wiki/Special:WhatLinksHere/Property:P249


On Thu, Oct 13, 2016 at 2:20 PM, Andrew Gray 
wrote:

> There are only 73 entries (including some duplicates) showing up for a
> straight P249 search, which is a bit strange in any case -
>
> https://query.wikidata.org/#SELECT%20%3Fitem%20%20%
> 3Fstock%20WHERE%20%7B%0A%20%20%3Fitem%20wdt%3AP249%20%3Fstock%20.%0A%20%7D
>
> Sampling a few items suggests that most businesses don't use P249
> directly, instead they use it as a qualifier on P414, eg
> https://www.wikidata.org/wiki/Q156578 or
> https://www.wikidata.org/wiki/Q156238
>
> These won't show up on a straight search. I'm not familiar with how
> searching for qualifiers is best done, but at least it narrows down
> the problem...
>
> A.
>
> On 13 October 2016 at 18:42, Hampton Snowball 
> wrote:
> > I took another query from this list and have been trying to modify it to
> get
> > stock symbols and there wikipedia pages.  But I am only getting 64
> results.
> > Am I  doing something wrong, filtering the results?
> >
> > http://tinyurl.com/go8zpvy
> >
> > Thanks in advance!
> >
> > Hampton
> >
> > ___
> > Wikidata mailing list
> > Wikidata@lists.wikimedia.org
> > https://lists.wikimedia.org/mailman/listinfo/wikidata
> >
>
>
>
> --
> - Andrew Gray
>   andrew.g...@dunelm.org.uk
>
> ___
> 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] Wikidata Query Help: IMDB id + wikipedia

2016-05-05 Thread Hampton Snowball
Hello,

I am trying to query the wikidata service for IMDB + the wikipedia of the
person. English only wikipedia is okay too.

I previously was able to use the following to include the
english wikipedia in the query, which is included below. I've tried the
query below, but believe I am doing something wrong. Your help is
appreciated. Thanks!

query:

PREFIX wd: 
PREFIX wdt: 
PREFIX rdfs: 
PREFIX schema: 

SELECT ?item  ?IMDB ?article WHERE {
  ?item wdt:P345 ?IMDB
  OPTIONAL {?item rdfs:label ?item_label filter (lang(?item_label) = "en")
.}

  ?article schema:about ?item .
  ?article schema:inLanguage "en" .
  FILTER (SUBSTR(str(?article), 1, 25) = "https://en.wikipedia.org/;)

 }
ORDER BY ASC (?article)
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread Remko de Keijzer
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 
> 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
> 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/ interface
to export to csv all wikidatas with this property P2002.


https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002=500=21542767=20967485

I am looking for the Wikipedia Article_Name + the value
associated with that property.

Thanks in advance!



___
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


___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread James Heald

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 
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 <
hamptonsnowb...@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 <
re...@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/ interface to export to csv all wikidatas
with this property P2002.



https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002=500=21542767=20967485

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


[Wikidata] Query Help

2015-11-09 Thread Hampton Snowball
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:P2002=500=21542767=20967485

I am looking for the Wikipedia Article_Name + the value associated with
that property.

Thanks in advance!
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread Remko de Keijzer
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/ interface to export 
to csv all wikidatas with this property P2002.


https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002=500=21542767=20967485

I am looking for the Wikipedia Article_Name + the value associated 
with that property.


Thanks in advance!



___
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


Re: [Wikidata] Query Help

2015-11-09 Thread Hampton Snowball
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 
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/ interface to export to csv all wikidatas with
> this property P2002.
>
>
> https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002=500=21542767=20967485
>
> 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 list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread 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  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  > 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/ interface to export to csv all wikidatas
>> with this property P2002.
>>
>>
>> https://www.wikidata.org/w/index.php?title=Special:WhatLinksHere/Property:P2002=500=21542767=20967485
>>
>> 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 list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread Tom Morris
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_avoided
[2] https://en.wikipedia.org/wiki/Template:Twitter
___
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata


Re: [Wikidata] Query Help

2015-11-09 Thread Hampton Snowball
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  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_avoided
> [2] https://en.wikipedia.org/wiki/Template:Twitter
>
> ___
> 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