I'm trying to use csv from d3 to render some data in my Next.js application. Following this tutorial, I got a 404 error. I've searched a lot, and as it's showed in the video, it's possible to use csv with React. Here is my code
import {csv} from 'd3';
import datacsv from './test.csv';
class Power extends Component {
...
componentDidMount() {
csv(datacsv).then(data=>{
console.log(data);
});
}
...
I've double-checked the path to the file.
Note. I've seen some questions in StackOverflow about this topic but they refer to Node.js or are not answered.