title: couchdb: calculate average of a value
body: <p>I'm new to Couchdb. I want to calculate an average of a value in futon. </p>
  
  <p>My map-function:</p>
  
  <pre><code>function(doc) {
  if(doc.Fares.Taxes)
      emit(1, doc.Fares.Taxes);
  }
  </code></pre>
  
  <p>My reduce-function:</p>
  
  <pre><code>function(amount,values){
  return sum(values/amount);
  }
  </code></pre>