This may be a too late (already relying on this structure) but if not, it would be more clear if the values in these hashes were themselves hashes with named keys. i.e.
`all_but_best_code_map = Hash.new{|h,k| h[k] = {:code => k, :count => 0, :popular => false} }`

then we can do
```
if activity.best?
          best_code_map[activity.level_source_id][:count] += 1
```
and
```
if passing_code_map.has_key?(pop_level_source_id)
         passing_code_map[pop_level_source_id][:popular] = true
```