title: How can I loop a csv file with countries and data in a Google Geochart?
body: <p>I have a large csv file that contains a country and a corresponding piece of data for that country. 
  <br> In the form (excel example):<br></p>
  
  <pre><code>[Country1, Data1],
  [Country2, Data2] etc
  </code></pre>
  
  <p>How would use a loop with the csv file to produce each item in the Geocharts array. Instead of writing them all out as in the example below.</p>
  
  <pre><code> function drawRegionsMap() {
  
      var data = google.visualization.arrayToDataTable([
        ['Country', 'Popularity'],
        ['Germany', 200],
        ['United States', 300],
        ['Brazil', 400],
        ['Canada', 500],
        ['France', 600],
        ['RU', 700]
      ]);
  </code></pre>
  
  <p>I'm not really sure how to work with the csv file as I haven't worked with them in js before, however I did stumble upon the jquery-csv tool at <a href="https://github.com/evanplaice/jquery-csv" rel="nofollow noreferrer">https://github.com/evanplaice/jquery-csv</a> but am not really understanding it fully.</p>