     alphabet                   = require 'cs!app/alphabet'
     accessibility              = require 'cs!app/accessibility'
     {mixOf, pad, withDeferred} = require 'cs!app/base'
+    dataviz                    = require 'cs!app/data-visualization'
 
     BACKEND_BASE = appSettings.service_map_backend
     LINKEDEVENTS_BASE = appSettings.linkedevents_backend

                        statistic = statistics[id]
                        currentStatistic = {}
                        value = if isNaN(+statistic[comparisonKey]) then 0 else statistic[comparisonKey]
                        currentStatistic[statisticsName] =
                            value: "" + statistic.value
                            normalized: value / maxVal
                            proportion: statistic.proportion
                        areas[id] = Object.assign({}, areas[id], currentStatistic)
                    )
                    areas

                ((areas, key) ->
                    statistics = response.asuntokunnat[key]
                    statisticsName = key
                    isHouseholdDwellingUnit = statisticsName == dataviz.getStatisticsLayer('household-dwelling_unit')
                    # Decide comparison value
                    comparisonKey = if statistics[Object.keys(statistics)[0]].proportion != undefined && !isHouseholdDwellingUnit
                    then 'proportion'
                    else 'value'
                    maxVal = Math.max(Object.keys(statistics).map( (id) ->
                        if isNaN(+statistics[id][comparisonKey]) then 0 else +statistics[id][comparisonKey]
                    )...)
