Help us understand the problem. What is going on with this article?

GoogleChartsのGeochartで都道府県分布マップを簡単作成

More than 5 years have passed since last update.

GoogleChart便利ですね。
下記のような分布マップを簡単に作成できます。

スクリーンショット 2014-09-03 12.45.44.png

<script src="https://www.google.com/jsapi"></script>
<script>
google.load('visualization', '1', {packages:['geochart']});
google.setOnLoadCallback(graphChart);

function graphChart() {
  var data = google.visualization.arrayToDataTable([
    ["都道府県", "データ"], 
    ["北海道", 20], 
    ["青森", 3], 
    ...
  ]);

  var option = {
    region: 'JP',
    resolution: 'provinces'
  };

  var chart = new google.visualization.GeoChart(document.getElementById('chart'));
  chart.draw(data, option);
}
</script>

<div id="chart"></div>

都道府県のデータを入れてるところで適切にデータを入れれば簡単に分布マップを作成してくれます。
「青森県」じゃなくて「青森」にしないとうまく動作しないので要注意です。

sue738
グロービスで働いています
globis
グロービスは 1992 年の創業以来、社会人を対象とした MBA、人材育成の領域で Ed-Tech サービスを提供し、現在は日本 No.1 の実績があります。これらの資産と、さらに IT や AI を活用することで、アジア No.1 を目指しています。
http://www.globis.co.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした