Goal: get a simple Google Chart w/ world map into the Notebook.

This might not prove to be the best way to do things, but the goal is to get a start.


In [1]:
%%javascript
$.getScript('//www.google.com/jsapi');



In [2]:
%%html
<div id="chart_div"></div>



In [3]:
%%javascript

var drawRegionsMap = function() {
    var data = google.visualization.arrayToDataTable([
      ['Country', 'Popularity'],
      ['Germany', 200],
      ['United States', 300],
      ['Brazil', 400],
      ['Canada', 500],
      ['France', 600],
      ['RU', 700]
    ]);
    var options = {};

    var chart = new google.visualization.GeoChart(document.getElementById('chart_div'));
    chart.draw(data, options);
}

// google.setOnLoadCallback(drawRegionsMap);
google.load('visualization', '1', {'packages': ['geochart'],
                                   'callback': drawRegionsMap});