<commit_before>/**
 * Call the wdmmg aggregate api function (/api/2/aggregate)
 * and build a tree that can be used by for the bubble charts
 *
 * @public getTree
 *
 * @param {string} api_url The url to the api,
 * e.g. 'http://openspending.org/api'
 * @param {string} dataset The name of the dataset, e.g. 'cra'
 * @param {array} cuts The array with cuts, each element in the
 * format 'key:value', e.g. ['time.from.year:2010']
 * @param {array} drilldowns the dimensions to drill down to, e.g.
 * ['cofog1', 'cofog2', 'cofog3']
 * @param {string} test_data_path (optional) Pass the path to
 * a json sample file for tests.
 **/

var getTree = function(api_url, dataset, cuts, drilldowns, test_data_path) {

    //construct the url
    var url = api_url,
        data = '',
        tree_root;
    url = url + '/2/aggregate';<commit_msg>put getTree() in OpenSpending.BubbleChart namespace<commit_after>/**
 * Call the wdmmg aggregate api function (/api/2/aggregate)
 * and build a tree that can be used by for the bubble charts
 *
 * @public getTree
 *
 * @param {string} api_url The url to the api,
 * e.g. 'http://openspending.org/api'
 * @param {string} dataset The name of the dataset, e.g. 'cra'
 * @param {array} cuts The array with cuts, each element in the
 * format 'key:value', e.g. ['time.from.year:2010']
 * @param {array} drilldowns the dimensions to drill down to, e.g.
 * ['cofog1', 'cofog2', 'cofog3']
 * @param {string} test_data_path (optional) Pass the path to
 * a json sample file for tests.
 **/

OpenSpendings.BubbleChart.getTree = function(api_url, dataset, cuts, drilldowns, test_data_path) {

    //construct the url
    var url = api_url,
        data = '',
        tree_root;
    url = url + '/2/aggregate';
{'fraction_non_alphanumeric': 0.13306451612903225, 'fraction_numerical': 0.010368663594470046, 'mean_word_length': 3.4198473282442747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7047348', 'n_tokens_mistral': 609, 'n_tokens_neox': 590, 'n_words': 208}