k_means_visualization.html 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. <html>
  2. <head>
  3. <link rel='icon' href="doge123.png">
  4. <script type="text/javascript" src="loader.js"></script>
  5. <script type="text/javascript" src="k_means_data.js"></script>
  6. <script type="text/javascript">
  7. google.charts.load('current', {
  8. 'packages':['geochart'],
  9. 'mapsApiKey': 'AIzaSyCM2XMOAsoTdl5H2JsaUO0QzWHnX40fYOA'
  10. });
  11. google.charts.setOnLoadCallback(drawRegionsMap);
  12. function drawRegionsMap() {
  13. var data = google.visualization.arrayToDataTable(clusters);
  14. var options = {
  15. colorAxis:{colors:['blue', 'red', 'green', 'orange', 'purple', 'pink', 'yellow', 'black']},
  16. backgroundColor: '#ffffff',
  17. datalessRegionColor: '#f2f2f2',
  18. defaultColor: '#f5f5f5',
  19. };
  20. var chart = new google.visualization.GeoChart(document.getElementById('geochart-colors'));
  21. chart.draw(data, options);
  22. }
  23. </script>
  24. </head>
  25. <body>
  26. <div id="geochart-colors" style="width: 1900px; height: 850px;"></div>
  27. </body>
  28. </html>