   #      score: 0
   #    }]
   getAllEntriesForWeek = (recordType, weekNum) ->
+    console.log(calculateKey(recordType, weekNum))
     (robot.brain[calculateKey(recordType, weekNum)] || {}).data || []
 
 


  robot.hear /.*/, (msg)->
    # match everything and log it
    logSentiment(msg)

  robot.respond /who( i|')s happy\??/i, (msg) ->
    # responds in the current channel
    msg.send "Top happy people:\n" + prettyPrintList (onlyPositive || "Nobody... :(\n") getTopForWeek('descending', 10, 'user', getWeekOfYear())

  robot.respond /who( i|')s (sad|stress)\??/i, (msg) ->
    # responds in the current channel
    msg.send "Top stressed people:\n" + prettyPrintList (onlyNegative || "Nobody! :)\n") getTopForWeek('ascending', 10, 'user', getWeekOfYear())

  robot.respond /where( i|')s( the)? happiness\??/i, (msg) ->
    # responds in the current channel
    msg.send "Top happy channels:\n" + prettyPrintList (onlyPositive || "People need more hugs.\n") getTopForWeek('descending', 10, 'channel', getWeekOfYear())

  robot.respond /where( i|')s( the)? (sad|stress)\??/i, (msg) ->
    # responds in the current channel
    msg.send "Top stressed channels:\n" +  prettyPrintList (onlyNegative || "Everything is dandy!\n") getTopForWeek('ascending', 10, 'channel', getWeekOfYear())


      updateEntry('user', get_username(response), getWeekOfYear(), analysis.score)
      updateEntry('channel', get_channel(response), getWeekOfYear(), analysis.score)

  prettyPrintList = (entries, emptyMessage) ->
    output = ''
    entries = entries || []
    if entries.length
      for entry, i in entries
        output += "#{i+1}: #{entry.name}\n"
    output || emptyMessage

  onlyNegative = (list) ->
    _.filter(list || [], (x) -> (x.score_average <= 0))
