r.appendChild(td_name);
            tr.appendChild(td_bar);
            tr.appendChild(td_number);
            table.appendChild(tr);
        });

        return [sorted_indices, baseline_data];
    }

    function colorize(elem, ratio) {
        let [r, g, b] = [0, 0, 0];

        /// ratio less than 1 - green
        /// ratio from 1 to 2 - green to yellow
        /// ratio from 2 to 10 - yellow to red
        /// ratio from 10 to 1000 to infinity - red to brown to black

        /// Note: we are using RG