I am relatively new to D3.js (version 6). I am trying to load a local .txt file "data.tsv (see github repo at the end).
Here is what I have tried:
var psv=d3.dsvFormat("|");
d3.text("data.txt", function(d){
var rows= psv.parse(data);
}).then(function(data){
console.log(rows);
});
The console log says: dataHandlers.js:39 Uncaught (in promise) ReferenceError: rows is not defined
Note: I have uploaded the .txt on my github page! https://raw.githubusercontent.com/AhmadMobin/D3-Learning/main/data.txt
Thank you so much in advance in helping a newbie on his D3.js journey
Note: I did ask a very similar question on how to load .csv file in which a kind soul did provide me with a solution :) D3.js version 6: Loading a CSV and changing Variable types