Introduction
What do you want to map? There are a variety of maps and a variety of methods.
choropleth 1
These are color gradient maps. A simple method is to use IBM’s Many Eyes online software to do a graph by state or by country.
choropleth 2
Google has a nice way to do a simple choropleth map: Here is the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <html><br/>
<head><br/>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['intensitymap']});
google.setOnLoadCallback(drawChart);
function drawChart()
{
var data = new google.visualization.DataTable();
data.addColumn('string', '', 'State');
data.addColumn('number', 'Accurate', 'a');
data.addColumn('number', 'Ghost', 'b');
data.addRows(6);
data.setValue(0, 0, 'OH');
data.setValue(0, 1, 1324);
data.setValue(0, 2, 9640821);
data.setValue(1, 0, 'IN');
data.setValue(1, 1, 1133);
data.setValue(1, 2, 3287263);
data.setValue(2, 0, 'TN');
data.setValue(2, 1, 304);
data.setValue(2, 2, 9629091);
data.setValue(3, 0, 'IO');
data.setValue(3, 1, 232);
data.setValue(3, 2, 1904569);
data.setValue(4, 0, 'MA');
data.setValue(4, 1, 187);
data.setValue(4, 2, 8514877);
data.setValue(5, 0, 'DC');
data.setValue(5, 1, 187);
data.setValue(5, 2, 8514877);
var chart = new google.visualization.IntensityMap(document.getElementById('chart_div'));
chart.draw(data, {region:'usa',width: 800, height: 640});
}
</script>
</head>
<body><br/>
<div id="chart_div"></div><br/>
</body>
</html> |
Another method is to plug the address (& all data) into google fusion tables (here)
Google Map with marker size variation by frequency
Here are the easiest steps:
- You need a spreadsheet or CSV file with the following columns:
| Description | Latitude | Longitude | Frequency |
|---|---|---|---|
| Chicago | 30.343 | –44.43535 | 5 |
- If you need the lat and long data, but have the zipcode, name, address, or almost any scrap of data, go to this site. This can be a little tedious, but will give you the values. There are also lookup tables (xls) by zipcode. Perhaps a better option is this site, which allows you to simply paste in info such as :
Duke
Vanderbilt
University of Michigan
and get back latitude and longitude cooridinates.
- Take the above formatted csv file, and go to this very useful site. You can either upload or simply paste in the data and a google map is generated (or google earth map).