Help:Googlepie format

From semantic-mediawiki.org

Jump to: navigation, search

This format creates a pie chart based on property values, using the Google Charts API. The Googlepie format is not switched on by default in a Semantic MediaWiki, but needs to be enabled by an administrator of the wiki.

The format is defined within the Semantic Result Formats extension.

Contents

Example

  {{#ask:
    [[Category:City]] [[located in::Germany]]
    |?population
    |format=googlepie
  }}

This query currently cannot be displayed here, since the Googlepie format is not switched on on this site. See the North America page on semanticweb.org for an example.

Installation

Privacy notice

You must not forget that every time a user comes to a page with a Google chart, Google gets a ping. And you also send all your data to Google in order to render it. Don't forget also that these printers do not work offline, if you have a local wiki.

It should be noted that, if the Googlepie format is not enabled, the queries will be rendered as tables.

Usage

You use the same queries as usual, but make sure to add a printout statement with a property that is of type number. All printouts of properties of type number will be taken for the visualization. Specify format googlepie. The only further parameters (for now) are height and width (if not given, mostly sensible values are assumed).

You may want a pie chart to not show property values directly, but rather the popularity of different values of a property across the entire wiki; i.e. a numerical distribution. This is easy to do; see Help:Displaying numerical distributions for how to do this.

Future work

See at the Googlebar page.

This documentation page applies to all SMW versions from 1.3 to the most current version.
     

Help:Googlepie format en 1.3

Personal tools