Extension:Semantic Result Formats/googlebar and googlepie formats

The result formats googlebar and googlepie, both part of the Semantic Result Formats extension, create a bar chart and a pie chart, respectively, based on property values, using the Google Charts API.

Examples
googlebar:

googlepie:

See the North America page on semanticweb.org for a live example.

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.

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. 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 fairly easy to do; see here for how.

Future work
It would be good to allow users to choose colours and to add more info, and to use more of the chart types that Google offers. If you want to take over development here, feel free to do so! Just send an email to the semediawiki-devel list before you do so.