Shortcut: wd:WDQS/Result views
Wikidata:SPARQL query service/Wikidata Query Help/Result Views/he

This page helps you to understand the various possibilities to display results on SPARQL query service.
The query example page contains many good examples you can try!
After running a query, you can choose with the "Display" button which result view you want to display. Depending on your query and the data type, some of the views will be available.
טבלה (בררת מחדל)
Shows the result data as a table. It is the default view for results and can display every data type.
Will map every variable from the SPARQL select clause to a formatted table column.
-
טבלת תוצאות
-
טבלת תוצאות במסכים קטנים עם עמודות הפוכות.
רשת תמונות

Shows the result data as a grid with images.
Every grid item has a big picture and opens the gallery when clicking on it.
Contents an item is the formatted row data.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | מדיה של ויקישיתוף | פריט ברשת | Image columns will create a grid item. |
Rows containing no image will be ignored.
It’s nonetheless possible to include no image rows in the result by modifying the sparql by including a default image in case the image variable is not bound:
optional {
?item wdt:P18 ?img_ .
}
bind (if(bound(?img_),
?img_,
<http://commons.wikimedia.org/wiki/Special:FilePath/File:Profile_avatar_placeholder_large.png>) as ?image) # [[:commons:File:Profile_avatar_placeholder_large.png]] as a placeholder
Here the file commons:File:Profile avatar placeholder large.png is used as a placeholder, you can use your own
אפשרויות
שם האפשרות | סוג | תיאור |
---|---|---|
hide
|
שם משתנה אחד או יותר (מחרוזות, שמתחילות ב־ ? ), ערך בודד או מערך
|
לא להציג את המשתנים האלה בתוצאה. |
מפה
מציג את התוצאות כמפה עם הנתונים של Open Street Map.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | נקודת ציון או צורה גאוגרפית | סמן במפה | Columns will create a marker on the map.
Content of that marker is the formatted row data. |
?layer | Map Marker Layer | Creates a colored map layer that allows filtering. | |
?rgb | Color | Color Map Marker | Example 000000 for black color. |
Technically, any well-known text literal can be displayed, not just a point coordinate.
Non-point geometry values are never stored on Wikidata, but they can be constructed in SPARQL using functions like CONCAT()
and STRDT()
–
see this map of Czech railway lines for an example of LINESTRING()
geometry.
אפשרויות
specify using e.g. #defaultView:Map{"hide":["?foo", "?bar"],"layer":"?bar"}
, using an array when there are multiple variables.
שם האפשרות | סוג | תיאור |
---|---|---|
hide
|
One or more variable names (strings, starting with ? ), single value or array
|
לא להציג את המשתנים האלו בתוצאה. |
layer
|
One or more variable names (strings, starting with ? ), single value or array
|
Use these variables for the map layer, instead of the default ?layerLabel , ?layer .
|
markercluster
|
בוליאני או עצם |
|
Line, Bar, Scatter and Area Chart
Shows one of these chart types.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | מספר
תווית DateTime |
ציר X
ציר Y |
הראשון יהיה ציר X, השני ציר Y |
* | תווית | פריט בקטגוריה / מקרא (רשות) | Will only be used after the above are mapped |
* | תווית | Storyboard / Animation (optional) | Will only be used after the above are mapped |
תרשים בועות

Shows a bubble chart where the size and the color of the bubble can configured.
When an item is provided a bubble is linked to Wikidata.org.
משתנה | סוג נתונים | מיפוי |
---|---|---|
* | תווית | תווית בועה |
* | מספר | גודל בועה |
* | פריט | קישור בועה (רשות) |
?rgb | צבע | צבע בועה (רשות) |
מפת עץ

מציג מפת עץ עם אפשרות תקריב.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | תווית | תווית | תווית ראשונה בשורה תהיה הרמה הראשונה במפת העץ.
התווית השנייה תהיה הרמה השנייה. התווית השלישית תהיה הרמה השלישית וכו׳. |
* | פריט | קישור (רשות) | |
* | כמות | גודל |
עץ
מציג עץ מתרחב.

משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | פריט | מזהה מפרק | הפריט הראשון יהיה מפרק השורש שהפריטים הבאים מאותה השורה יחוברו תחתיו. |
* | תווית | תווית המפרק (רשות) | תתווספנה תוויות למפרק הנוכחי. |
* | מספר | תווית המפרק (רשות) | |
* | מדיה של ויקישיתוף | תמונת פריט |
ציר זמן

מציג ציר זמן שניתן לחקור.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | תאריך ושעה | פריט נקודה בזמן
פריט סיום נקודה בזמן |
תאריך ראשון בשורה מגדיר את מיקום הפריט בציר הזמן.
אם קיים תאריך שני יוגדרו תאריכי התחלה וסיום. |
* | מדיה של ויקישיתוף | תמונת פריט |
אפשרויות
שם האפשרות | סוג | תיאור |
---|---|---|
hide
|
שם של משתנה אחד או יותר (מחרוזות, מתחילות ב־? ), ערך או מערך בודד
|
לא להציג את המשתנים האלה בתוצאה. |
ממדים

הצגת ממדים ואת הקישורים שלהם.
מאפשר גם לסנן אותם על ידי בחירת חלק מציר.
This type of graph is also known as parallel coordinates.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | תווית | ממד | כל עמודה בשורת התוצאה ממופה לממד |
* | מספר | ||
* | תאריך ושעה |
תרשים
הצגת תרשים אינטראקטיבי שמציג סדר היררכי ופריטים לחקירה.
משתנה | סוג נתונים | מיפוי | תיאור |
---|---|---|---|
* | פריט | מזהה מפרק | לפריט הראשון בשורה יהיה חץ שמצביע על הפריטים באותה השורה |
* | תווית | תווית המפרק (רשות) | |
* | מדיה של ויקישיתוף | תווית המפרק (רשות) | |
?rgb | צבע | צבע המפרק (רשות) | למשל 000000 לצבע שחור. |
* | מספר | גודל המפרק (רשות) | |
?edgeLabel | תווית | תווית הקצה (רשות) |

מידע נוסף
RDF Data Type Mapping
RDF Type | RDF Data Type | Constraint | Data Type |
---|---|---|---|
URI | String starts with http://www.wikidata.org/entity/Q |
Entity | |
URI | String starts with http://commons.wikimedia.org/wiki/Special:FilePath |
Commons Media | |
Literal | http://www.w3.org/2001/XMLSchema#dateTime | DateTime | |
Literal | http://www.opengis.net/ont/geosparql#wktLiteral | Coordinate | |
Literal | http://www.w3.org/2001/XMLSchema#double
http://www.w3.org/2001/XMLSchema#float http://www.w3.org/2001/XMLSchema#decimal http://www.w3.org/2001/XMLSchema#integer http://www.w3.org/2001/XMLSchema#long http://www.w3.org/2001/XMLSchema#int http://www.w3.org/2001/XMLSchema#short http://www.w3.org/2001/XMLSchema#nonNegativeInteger http://www.w3.org/2001/XMLSchema#positiveInteger http://www.w3.org/2001/XMLSchema#unsignedLong http://www.w3.org/2001/XMLSchema#unsignedInt http://www.w3.org/2001/XMLSchema#unsignedShort http://www.w3.org/2001/XMLSchema#nonPositiveInteger http://www.w3.org/2001/XMLSchema#negativeInteger |
Number | |
Literal | Has no RDF Data Type | Label | |
Literal | Has property xml:lang |
Label | |
Literal | String matches /^[0-9A-F]{6}$/ |
Color |
Formatting
There is special formatting for the following data types:
Data Type | Format |
---|---|
Entity | Link to Wikidata.org
Label is shortened to wd:Qxx Explore an item (magnify icon) |
DateTime | MM DD, YYYY
Tooltip shows raw ISO timestamp |
Commons Media | Link to Commons.Wikimedia.org
Displaying Gallery ( image icon ) |
Mobile / Responsive
Result views are made to work on different devices and resolutions. Their appearance may change depending on the space they can use.
Embed Mode
Result views can be linked or embedded via iframes. You can get the regarding link or code by clicking Link in the above menu.
See the difference: link to a query and link to a result or the embed code:
<iframe style="width:80vw; height:50vh;" scrolling="yes" frameborder="0" src="http://tinyurl.com/zwf4k2w">
Download results

There are several ways to export the results of a query.
JSON, TSV and CSV are three different open-standard formats to download the data, offered under the Download tab. To get results in XML format, click on Link > SPARQL endpoint.
You can also download some of the graphic views as a SVG file: this feature works with all the views except table, image grid, timeline, graph builder, map, and graph.
Default View
The default view can be change for each SPARQL query by using a comment:
#defaultView:[NAME]
For example:
#defaultView:ImageGrid
Result view options
Result views can be configured with various options, which are specified in JSON (Q2063) format,
either following the defaultView
comment (see previous section)
or following a separate view
comment.
#defaultView:Map{"layer": "?typeLabel"}
#view:ImageGrid{"hide": "?coords"}
Title
Result views can show a title. The title can be set via a title
comment.
#title:A title of your choice
Auto language
When using the magic keyword [AUTO_LANGUAGE]
it is replaced by the users language when submitting the query. This allows writing a query with where the result is display in the users language.
Example:
#<span lang="en" dir="ltr" class="mw-content-ltr">Use language of the user for display labels and fallback to english as default</span>
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" .
}
Auto coordinates
When using the magic keyword [AUTO_COORDINATES]
it is replaced by the users location when submitting the query. This allows writing a query with the users' location.
Example:
SERVICE wikibase:around {
?place wdt:P625 ?coordinate_location.
bd:serviceParam wikibase:center "[AUTO_COORDINATES]".
bd:serviceParam wikibase:radius "1".
bd:serviceParam wikibase:distance ?dist.
}