I want to assign the data that is loaded from a csv file using d3.csv(), to a global variable, so I can use it later on in my code, but I am get undefined for the global variable dataset.
var dataset;
d3.csv("/csv/census_tracts.csv", function(data){
dataset=data;
});
console.log(dataset);