data = {
let final = []
let data = d3.csvParse(await FileAttachment("plants_since_1980@1.csv").text())
data.forEach(d => {
if (d.SimpleType != "Other") {
if (d.SimpleType == "Solar"|| d.SimpleType == "Wind") {d.Category = "Charismatic Renewables"}
else if (d.SimpleType == "Nuclear") {d.Category = "Nuclear"}
else if (d.SimpleType == "Coal"||d.SimpleType == "Natural Gas") {d.Category = "Fossil Fuels"}
else {d.Category = "Other"}
final.push(d);
}
});
return final
}