1

I am loading 3 csv with a d3.queue and a would like to get the object inside the function call in await. Is that even possible.

dmObj.loadAllData = function (url1,url2,url3) {
        d3.queue(1)
            .defer(d3.csv, url1)
            .defer(d3.csv, url2)
            .defer(d3.csv, url3)
            .await(processus);

        function processus(error,data1, data2, data3) {
            if (error) throw error;
            ref14data = data1;
            townsCSV = data2;
            learningProviders = data3;


            //Create master table
            combineLPwithTownData(learningProviders, townsCSV);
            console.log('ref data ',learningProviders);
            console.log('town',townsCSV);

            combineREFwithLPdata(ref14data, learningProviders);


            //Just consider "overall" assessments
            ref14data = ref14data.filter(function (e) { return e.Profile === "Overall" })

            console.log(ref14data);

I would like to acces the ref14data outsite this function to use it in my chart or any object.

Boat
  • 509
  • 3
  • 8
  • 21

0 Answers0