Doing Averages

From Geoqo
(Difference between revisions)
Jump to: navigation, search
Line 41: Line 41:
 
  Ave Difficulty: 1.90278
 
  Ave Difficulty: 1.90278
 
     Ave Terrain: 1.36111
 
     Ave Terrain: 1.36111
 +
 +
{{TRICKS}}

Revision as of 03:45, 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

Tips and Tricks

Personal tools