linksWithDirection = {
const edges = [];
for (const row of sheet1) {
let destination = "";
for (const [key, value] of Object.entries(row)) {
if (key === "Station") {
destination = value.toString();
}
}
for (const [key, value] of Object.entries(row)) {
const entryStation = key.toString();
if (key !== "Station" && key !== destination) {
edges.push({
source: nameMap.get(entryStation) + "_S",
target: nameMap.get(destination) + "_T",
value: value
});
}
}
}
yield edges;
}