             .attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')scale(' + k + ')translate(' + -x + ',' + -y + ')')
             .style('stroke-width', 1 / k + 'px')
 
+    # Calculate data mapping, draw and colorize countries.
     update = ()->
         # Create mapping of iso3 to data selected value and set min and max.
         min = null

            .append('title')
                .text((d)-> d.properties.name + ': ' + format(iso_val(d.id)))

    draw = (selection)->
        svg = selection.append('svg')
            .attr('width', width)

    color_val = (iso3)->
        if data_by_iso[iso3] then colorize(data_by_iso[iso3]) else '#eeeeee'

    # Zoom map on mouse click. If clicked on country and not zoomed, zoom in,
    # else zoom out and center map.
    clicked = (d)->
        x = null
        y = null
