Semantic Result Formats: Difference between revisions
Line 82: | Line 82: | ||
* [http://www.semantic-mediawiki.org/wiki/Help:D3_chart_format Help: D3 chart format] | * [http://www.semantic-mediawiki.org/wiki/Help:D3_chart_format Help: D3 chart format] | ||
* [http://www.semantic-mediawiki.org/wiki/Demo:D3chart/Bubble_chart Demo: D3 bubble chart] | * [http://www.semantic-mediawiki.org/wiki/Demo:D3chart/Bubble_chart Demo: D3 bubble chart] | ||
List of parameters: | |||
{{#smwdoc:d3chart}} | |||
<source lang="bibtex"> | <source lang="bibtex"> |
Revision as of 19:53, 27 November 2013
Category:MediaWiki extension Semantic Result Formats | |
---|---|
Extension name | Semantic Result Formats |
About this article / disclaimer | This is not an official page. In addition, it is just a stub. Lots of missing information.... |
Logo | |
Screenshot | |
Location of the main author | Gent, Belgium |
Coordinates of the main authors | 51.053829, 3.725012 |
Developers | Jeroen De Dauw, Frank Dengler, Steren Giannini, James Hong Kong, Fabian Howahl, Yaron Koren, Markus Krötzsch, David Loomer, Joel Natividad, Denny Vrandecic, Nathan Yergler, others |
Licences | GPL |
Description | Semantic Result Formats (SRF) is a MediaWiki extension, used in conjunction with the Semantic MediaWiki extension, that bundles a number of further result formats for SMW's inline queries. The individual formats can be added to the installation independently... |
Mediawiki requirements | Any recent version |
Dependencies | Semantic MediaWiki |
Related extensions (documented here) | Semantic Forms, Semantic Forms Inputs, Semantic Maps, Semantic MediaWiki |
Related extensions | |
Discussion | |
Language support | |
Status | stable |
First release date | 2010/12/10 |
Last release date (as of 2013/06/26!) | 2012/12/02 |
Last version number | 1.8.0 |
Programming language | PHP |
Alternatives | |
Website | home page |
Publications | |
Support websites | web site |
Example websites | |
Last edited | 2013/06/26 |
<pageby nominor="false" comments="false"/>
Introduction
Semantic Result Formats (SRF) is a MediaWiki extension, used in conjunction with the Semantic MediaWiki extension, that bundles a number of further result formats for SMW's inline queries. The individual formats can be added to the installation independently. (Mediawiki.org extension page, June 12 2013).
By default, semantic Mediawiki displays results with tables using a column for each query item. A simple example is below:
This code:
{{#ask: [[Category:Software information]]
| ?Is developed by
}}
... will produce this table:
Is developed by | |
---|---|
Mediawiki | MediaWiki foundation and MediaWiki volunteers |
Some software | Many |
Semantic Result Formats adds other visualization types. Most of these are based on various JavaScript libraries, such as D3.
Examples
Simple lists
This code
{{#ask: [[Category:Software information]]
| ?Is developed by
| format=outline
}}
produces this:
- Mediawiki (Is developed by MediaWiki foundation and MediaWiki volunteers)
- Some software (Is developed by Many)
Tagcloud
The following:
{{#ask: [[Category:MediaWiki extension]]
| ?Is developed by
| format=tagcloud
}}
produces:
D3 Bubble chart
Official documentation:
List of parameters:
⧼validator-describe-header-parameter⧽ | ⧼validator-describe-header-type⧽ | ⧼validator-describe-header-default⧽ | ⧼validator-describe-header-description⧽ |
---|---|---|---|
distribution | ⧼validator-type-boolean⧽ | no | Instead of displaying all values, count their occurrences, and show these. |
distributionsort | ⧼validator-type-string⧽ | none | Sort the value distribution by occurrence count. |
distributionlimit | ⧼validator-type-integer⧽ | no | Limit the value distribution to the count of only some values. |
aggregation | ⧼validator-type-string⧽ | subject | Specify to what the aggregation should relate to |
min | ⧼validator-type-integer⧽ | no | The minimum value to show on the Y-axis |
charttype | ⧼validator-type-string⧽ | treemap | Available chart type |
height | ⧼validator-type-integer⧽ | 400 | Specify the height (in pixels) of a chart or graph |
width | ⧼validator-type-string⧽ | 100% | Specify the width (in pixels or percent) of a chart or graph |
charttitle | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | The title of the chart |
charttext | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Descriptive chart text |
class | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Specify an additional cascading style sheet class |
datalabels | ⧼validator-type-string⧽ | none | Chart/graph data labels |
colorscheme | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Select a color scheme |
chartcolor | ⧼validator-type-string⧽ | ⧼validator-describe-empty⧽ | Assign individual chart colors |
{{#ask: [[Category:MediaWiki extension]]
| ?Is developed by
|format=d3chart
|distribution=yes
|mainlabel=-
|charttype=bubble
|headers=show
|link=all
|charttitle= SMW developers
|datalabels=chart
}}
Notice the use of the following parameters:
- distribution=yes will count occurences
- mainlabel=- will exclude the count of the pages themselves
We roughly get the same information as in the word cloud.
The result of not using mainlabel=- is below:
{{#ask: [[Category:MediaWiki extension]][[Is developed by::+]]
| ?Is developed by
|format=d3chart
|distribution=yes
|charttype=bubble
|headers=show
|link=all
|charttitle= SMW developers
|datalabels=chart
}}
Useless resulting chart:
Links
- List of Result formats (Official manual pages)