Template:Greece/RiskMap functionality script

// Load the Visualization API and the corechart package.

     google.charts.load('current', {'packages':['corechart']});
     // Set a callback to run when the Google Visualization API is loaded.
     google.charts.setOnLoadCallback(drawChart);
     // Callback that creates and populates a data table,
     // instantiates the pie chart, passes in the data and
     // draws it.
     function drawChart() {
       // Create the data table.
       var dataTable = new google.visualization.DataTable();
       dataTable.addColumn('number', 'Likeliness');
       dataTable.addColumn('number', 'Impact');
       dataTable.addColumn({type: 'string', role: 'tooltip'});
       dataTable.addRows([
         [2, 7,'Negative impact on livelihood'],
         [3, 6,'Unpredicted behavior of invasive bacteria'],
         [7, 6,'Inadequte miRNA candidates for pANDORRA'],
         [2, 6,'Infection of pathogens to wet lab members'],
         [7, 4,'Disruption of gut microbiome'],
         [2, 9,'Bioterrorism'],
         [8, 7,'Enviromental ecosystem disruption'],
         [6, 8,'Inhibiting basic research by excessive pattenting'],
         [1, 9,'Rise of biohacker culture'],
         [5, 8,'Biased/incomplete information'],
         [4, 8,'Incomplete biosafety training'],
         [2, 8,'Radical human genome altering'],
         [7, 9,'Failure to fundraise necessary amount']
       ]);
       // Set chart options
       var options = {'title':'Risk Map',
                      'width':400,
                      'height':400,
                      'hAxis': {
                         title: 'Likeliness'
                       },
                      'vAxis':{title: 'Impact'},
                      'legend': 'none'
                       };
       // Instantiate and draw our chart, passing in some options.
       var chart = new google.visualization.ScatterChart(document.getElementById('chart_div'));
       chart.draw(dataTable, options);
     }