title: How to load data from a CSV file in D3 v5
body: <p>I'm trying to load data from a CSV file in D3; I have this code:</p>
  
  <pre><code>function update (error, data) {
      if (error !== null) {
          alert ("Couldn't load the dataset!");
      } else {
          //do something
      };
  
  function changeData () {
      d3.csv ("data/dataset.csv", update);
  }
  </code></pre>
  
  <p>If I use D3 v4 it works fine, but if I switch to v5 it doesn't work anymore.
  Can someone explain to me how to modify the code to make it work with D3 v5?</p>