Hi!
I've finished migrating SPARQL examples to https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples - this is now the official examples page.
I've also created a redirect: https://www.wikidata.org/wiki/Wikidata:SPARQL_examples for convenience. The old page at mediawiki.org is now soft redirect to a new one.
Please notify me if you see any issues.
Thanks,
Nice work.
What is the difference between the pink and grey backgrounds in the query examples?
On Thu, Sep 22, 2016 at 10:38 PM, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
I've finished migrating SPARQL examples to https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/ queries/examples
- this is now the official examples page.
I've also created a redirect: https://www.wikidata.org/wiki/Wikidata:SPARQL_examples for convenience. The old page at mediawiki.org is now soft redirect to a new one.
Please notify me if you see any issues.
Thanks,
Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi!
What is the difference between the pink and grey backgrounds in the query examples?
They use different templates - SPARQL and SPARQL2. The latter is the recommended one as it automatically detects the items/properties used, but some queries are still on the old one. I'm not sure why they have different backgrounds exactly, but somebody did it so I left it as is :)
Thank you Stas!
On 23 September 2016 at 07:00, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
What is the difference between the pink and grey backgrounds in the query examples?
They use different templates - SPARQL and SPARQL2. The latter is the recommended one as it automatically detects the items/properties used, but some queries are still on the old one. I'm not sure why they have different backgrounds exactly, but somebody did it so I left it as is :)
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
I wasn't aware of the SPARQL2 template, really nice! Now adding example queries becomes even less time consuming.
A minor comment is that to me red as background color feels a bit like something that needs improvement. Where from now on I will use the SPARQL2 template by default. Is it possible to change the background color to, for example, green?
On Fri, Sep 23, 2016 at 7:00 AM, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
What is the difference between the pink and grey backgrounds in the query examples?
They use different templates - SPARQL and SPARQL2. The latter is the recommended one as it automatically detects the items/properties used, but some queries are still on the old one. I'm not sure why they have different backgrounds exactly, but somebody did it so I left it as is :)
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi!
On 9/23/16 2:44 PM, Andra Waagmeester wrote:
I wasn't aware of the SPARQL2 template, really nice! Now adding example queries becomes even less time consuming.
A minor comment is that to me red as background color feels a bit like something that needs improvement. Where from now on I will use the SPARQL2 template by default. Is it possible to change the background color to, for example, green?
I've removed the background, looks like nobody is really happy about it being there :)
I am still a happy consumer/contributor to the WDQS example page. In this context I am wondering if it is possible, and if so what it would take to extent the "Tri It!" link in the SPARQL2 template, with a "get the code in the <programming language of your choice>"?
When using libraries like WikidataQueryServiceR or python I often rely on examples stored in the WDQS example page. It would be quite convenient to be able to do something like: demo_query("Popular surnames among fictional characters") in R which would direct feed on the WDQS example page.
Where can I express such a feature request?
Cheers,
Andra
On Sat, Sep 24, 2016 at 12:48 AM, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
On 9/23/16 2:44 PM, Andra Waagmeester wrote:
I wasn't aware of the SPARQL2 template, really nice! Now adding example queries becomes even less time consuming.
A minor comment is that to me red as background color feels a bit like something that needs improvement. Where from now on I will use the SPARQL2 template by default. Is it possible to change the background color to, for example, green?
I've removed the background, looks like nobody is really happy about it being there :)
-- Stas Malyshev smalyshev@wikimedia.org
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi Andra!
I actually built that functionality into WikidataQueryServiceR -- see `help("scrape_example", package = "WikidataQueryServiceR")` and https://github.com/bearloga/WikidataQueryServiceR/#extracting-and-running-ex... https://cran.r-project.org/web/packages/WikidataQueryServiceR/README.html#extracting-and-running-example-sparql-queries -- but had to make it optional (not part of the core functionality) for licensing/dependency reasons.
Glad to see people are using WDQSR! :)
On the Python side, I'm sure there's a way to do something similar using BeautifulSoup web-scraping library.
Cheers, Mikhail
*Mikhail Popov* // Count Logula, Discovery https://www.mediawiki.org/wiki/Wikimedia_Discovery, Wikimedia Foundation https://wikimediafoundation.org/ Public PGP Key https://people.wikimedia.org/~bearloga/public.asc
*Imagine a world in which every single human being can freely share in the **sum of all knowledge. That's our commitment.* Donate https://donate.wikimedia.org/.
On Fri, Mar 3, 2017 at 5:38 AM, Andra Waagmeester andra@micelio.be wrote:
I am still a happy consumer/contributor to the WDQS example page. In this context I am wondering if it is possible, and if so what it would take to extent the "Tri It!" link in the SPARQL2 template, with a "get the code in the <programming language of your choice>"?
When using libraries like WikidataQueryServiceR or python I often rely on examples stored in the WDQS example page. It would be quite convenient to be able to do something like: demo_query("Popular surnames among fictional characters") in R which would direct feed on the WDQS example page.
Where can I express such a feature request?
Cheers,
Andra
On Sat, Sep 24, 2016 at 12:48 AM, Stas Malyshev smalyshev@wikimedia.org wrote:
Hi!
On 9/23/16 2:44 PM, Andra Waagmeester wrote:
I wasn't aware of the SPARQL2 template, really nice! Now adding example queries becomes even less time consuming.
A minor comment is that to me red as background color feels a bit like something that needs improvement. Where from now on I will use the SPARQL2 template by default. Is it possible to change the background color to, for example, green?
I've removed the background, looks like nobody is really happy about it being there :)
-- Stas Malyshev smalyshev@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