       $("#" + metric + " " + ".score").text(parseFloat(data).toFixed(2))
     )
 
-  load_scores = (repository) ->
-    # TODO: access metric meter objcets dynamically
-    # to update score
-    console.log repository.accessibility
+  load_scores = (repository, metricMeter) ->
 
-  load_scores(gon.repository)
+    if gon.repository['accessibility']?
+      score = gon.repository.accessibility.average
+      $("#accessibility .score").text(parseFloat(score).toFixed(2))
+
+    for metric in ['completeness', 'weighted-completeness',
+      'richness-of-information', 'accuracy']
+
+      if gon.repository[metric]?
+        score = gon.repository[metric].average
+        metricMeter[metric].updateScore(score)
+      
+  load_scores(gon.repository, metricMeter)

#=require d3
$ ->

  class MetricMeter
    


  $(".metric-meter").each () ->
    metric = @id
    metricMeter[metric] = new MetricMeter metric

  $(".score").bind "click", (event) =>
    metric = $(event.target).parent()[0].id
