ویکیداده: سرویس کوئری اسپارکل
اسپارکل چیست؟
اسپارکل یک زبان برنامهنویسی برای گرفتن کوئری از دادههای RDF است. ویکیداده از سپتامبر 2015 اسپارکل شامل یک GUI قدرتمند تحت وب بهره میگیرد. با کمک اسپارکل شما میتوانید همه نوع داده را استخراج کنید و کوئری شما میتواند شامل ترکیبی از سهگانههای منطقی باشد.
- SPARQL query service GUI is here: https://query.wikidata.org
- SPARQL Endpoint: https://query.wikidata.org/bigdata/namespace/wdq/sparql?query={SPARQL} (some docs for this API endpoint)
Learning SPARQL
Help portal
- Wikidata Query Service help portal
- Wikidata:SPARQL query service/queries
- Queries from Wikidata status update weekly summaries
Other materials
- SPARQL in 11 minutes Basic Introduction-Video
- SPARQL Tutorial
- 2016 SPARQL Workshop
- Querying Wikidata with SPARQL for Absolute Beginners, 2 hour tutorial
- Wikidata:SPARQL tutorial
- Wikidata:SPARQL query service/query optimization
- Wikidata:SPARQL query service/query limits
{{Item documentation}}
and other generic queries templates
Interfacing
SPARQL queries can be submitted directly to the SPARQL endpoint with GET request to https://query.wikidata.org/bigdata/namespace/wdq/sparql?query={SPARQL}
or the endpoint's alias https://query.wikidata.org/sparql?query={SPARQL}
. The result is returned as XML by default, or as JSON if either the query parameter format=json
or the header Accept: application/sparql-results+json
are provided. See the user manual for more detailed information. RDF data can alternatively be accessed via a Linked Data Fragments[۱] interface at https://query.wikidata.org/bigdata/ldf
.
- R package WikidataQueryServiceR which queries the WDQS SPARQL endpoint and returns data.frames
- R script ([۲]) that plots Wikidata content on a world map in R. (Andra Waagmeester, [۳])
- Python example, how to make a plot of causes of death for U.S. Presidents
- An example of using SPARQLWrapper library to query WDQS in Python: https://people.wikimedia.org/~bearloga/notes/wdqs-python.html
- An example using the Apache Jena command line tools. (This is useful e.g. for very large SPARQL statements with +2000 lines which WDQS UI currently cannot handle properly because of the parsing, or e.g., for scripting a batch of queries to run every week (via cron) and report the results by email)
- https://wdq2sparql.toolforge.org/w2s.php Convert WDQ (previous tool to query Wikidata) queries syntax to SPARQL (By Stas Malyshev)
- Generate plots for results by cutting-and-pasting queries to http://demo.seco.tkk.fi/visu – some examples by User:Pyb: U.S. States by date of creation, Burial counts for Père Lachaise cemetery by year, Dates of birth of 2000 centenarians
خدمات جستجو ویکیمیڈیا SPARQL
Human interface | Machine's endpoint | Description |
---|---|---|
https://query.wikidata.org/sparql
|
Run SPARQL Queries upon Wikidata's wikibase. Run, test, download the data as xml, json, csv or tsv. Has advanced user-friendly features such as : word hovering too see a term's meaning, code optimization, etc. | |
https://commons-query.wikimedia.org/sparql
|
Run SPARQL Queries upon Wikimedia Commons wikibase. | |
https://lingualibre.org/sparql
|
Run SPARQL Queries upon LinguaLibre's wikibase. Run, test, download the data as json, xml, csv or tsv. |
Stats
Further resources
ثب