             if data_by_iso[iso3] then geomap.properties.format(data_by_iso[iso3]) else 'No data'
 
         color_val = (iso3)->
-            if data_by_iso[iso3] then colorize(data_by_iso[iso3]) else '#eeeeee'
+            if data_by_iso[iso3] then geomap.colorize(data_by_iso[iso3]) else '#eeeeee'
 
         geomap.private.units.enter().append('path')
             .attr('class', 'unit')

            .attr('width', rect_w)
            .attr('height', rect_h)

        # TODO use colorize.invertExtent(colorval) to label each bin


(exports? or this).d3.geomap.choropleth = ()->
    new Choropleth()
            data_by_iso[d.iso3] = val

        # Set the coloring function.
        geomap.colorize = d3.scale.quantize()
            .domain([min, max])
            .range(geomap.properties.colors)

