);
    
    // for testing
    //console.log(data);
    
    //define a dimension
    //Here we will group by state
    var stateDim = ndx.dimension(dc.pluck('Unidade_da_Federacao'));
    var weekDim = ndx.dimension(dc.pluck('isoweek'));
    var allDim = ndx.dimension(function(d){d});
    
    var ufAlertDim = ndx.dimension(function (d) {
        //stringify() and later, parse() to get keyed objects
        return JSON.stringify({
            'uf': d['Unidade_da_Federacao'], 'alert': d['alert']
        });
