Value distribution examples

From Mapping on MediaWiki
Jump to: navigation, search

These examples are not really mapping specific, but merely use the data on this wiki.

Usage of the distribution parameter

This example will get the countries the matching cities are located in, count the occurance of each, and display this as a pie chart. Note the use of the mainlabel parameter. If this is not done, the cities themselves will also be put into the value distribution.

{{#ask: [[Category:Locations]] [[Has location type::City]]
| ?Located in
| format=jqplotpie
| limit=500
| distribution=on
| mainlabel=-
}}
Loading...

Sort and limit

{{#ask: [[Category:Locations]] [[Has location type::City]]
| ?Located in
| format=jqplotpie
| limit=500
| distribution=on
| distributionsort=desc
| distributionlimit=10
| mainlabel=-
}}
Loading...

Bar charts

{{#ask: [[Category:Locations]] [[Has location type::City]]
| ?Located in
| format=jqplotbar
| limit=500
| distribution=on
| distributionsort=desc
| distributionlimit=7
| min=0
| mainlabel=-
}}
Loading...
{{#ask: [[Category:Locations]] [[Has location type::City]]
| ?Located in
| format=jqplotbar
| limit=500
| distribution=on
| distributionlimit=20
| min=0
| mainlabel=-
}}
Loading...