Doing Averages
From Geoqo
(Difference between revisions)
| Line 9: | Line 9: | ||
%search | %search | ||
cache:owner_name==%[Owner] | cache:owner_name==%[Owner] | ||
| − | + | ||
%print | %print | ||
====================================================================== | ====================================================================== | ||
%print | %print | ||
STATS FOR CACHES MADE BY %[Owner] | STATS FOR CACHES MADE BY %[Owner] | ||
| − | + | ||
%display | %display | ||
top10:groundspeak_container | top10:groundspeak_container | ||
| − | + | ||
# the show=0 here will display *only* the average | # the show=0 here will display *only* the average | ||
%display | %display | ||
top10:groundspeak_difficulty,doaverage=1,show=0,averagetext=Ave Difficulty: | top10:groundspeak_difficulty,doaverage=1,show=0,averagetext=Ave Difficulty: | ||
| − | + | ||
%display | %display | ||
top10:groundspeak_terrain,doaverage=1,show=0,averagetext= Ave Terrain: | top10:groundspeak_terrain,doaverage=1,show=0,averagetext= Ave Terrain: | ||
Revision as of 03:39, 30 March 2007
(you should probably read Scripting Examples for Mulitple Top10 Outputs first)
requires geoqo 0.7 which isn't out at the time of this writing
Lets say you want to show averages for terrain, difficulty, or whatever else might be numeric in the text (class of service for geodining data, for example):
Create a script (put it in, say, $HOME/.geoqo/scripts/average):
%search cache:owner_name==%[Owner] %print ====================================================================== %print STATS FOR CACHES MADE BY %[Owner] %display top10:groundspeak_container # the show=0 here will display *only* the average %display top10:groundspeak_difficulty,doaverage=1,show=0,averagetext=Ave Difficulty: %display top10:groundspeak_terrain,doaverage=1,show=0,averagetext= Ave Terrain:
Will result as follows when run:
> geoqo -x averages:Owner=Yamar ====================================================================== STATS FOR CACHES MADE BY Yamar Top 10 'groundspeak_container's Num % Value ---------------------------------------------------------------------- 17 47 Micro 13 36 Regular 4 11 Small 1 2 Not chosen 1 2 Other Ave Difficulty: 1.90278 Ave Terrain: 1.36111