Beruflich Dokumente
Kultur Dokumente
Com
and
Google Earth is a powerful and free mapping tool that lets users
zoom into any location on earth.
Google Earth (GE) is free, just download it here. Go here for free tutorials and advice on how
to use GE.
http://earth.google.com/
Mapping Excel Data in GE
GE uses latitude and longitude coordinates to map locations on earth. This workbook
demonstrates how to get the latitude and longitude of Excel address locations.
GE uses Keyhole Markup Language (KML) files to import data into GE for display as overlays
to the basemap.. KML files are similar to XML type files, specialized for map display. Excel
users can display Excel based data points in GE by creating a KML file with VBA and opening
that file in GE.
Here's an example of a map of the USA showing the major IT companies: Microsoft, Google
and Yahoo. I've included JuiceAnalytics because this workbook uses their geocoding VBA
code.
This workbook includes VBA code prepared by JuiceAnalytics.Com and A Simon. See
Acknowledgements sheet for details.
The Configuration Steps sheet explains what you need to do to develop this capability on your
desktop. You must register with Yahoo to be able to geocode addresses and obtain a working
version of Google Earth to be able to run this demo on your desktop.
Acknowledgements
MapExcelData.Xls uses two web based tools and two Excel - VBA tools.
The web based tools are Yahoo's geocoding service to assign latitude and longitude to addresses and Google Earth to map Excel locations.
The two Excel VBA tools were prepared by A Simon and JuiceAnalytics. MapExcelData.Xls combines VBA code from JuiceAnalytics Geocoding
tool.Xls and KML file generation code from A Simon's Excel2KML.Xls
Simon's and JuiceAnalytics' VBA code has been incorporated into MapExcelData.XLS and modified by ProcessTrends.Com, Oct., 2007 to
provide both geocoding capability (assign latitude and longitude based on address) and production of KML files.
JuiceAnalytics VBA code is determines the latitude and longitude for locations given location as street address, street intersection or Zip code.
A Simon's Excel2KML.XLS VBA code is used to KML files by using File_Details worksheet KML code fragments. Simon's VBA code processes
the source data file with latitude and longitude and builds a KML
file using the KML fragments from File_Details.
Geocode Configuration
Complete the Geocode Configuration sheet fields:
Geocode Tool
Yahoo User ID
Location of GoogleEarth.exe
KML Details
Enter output File path and Name
Enter Document Name
Geocode Configuaration As Developed by JuiceAnalytics.Com
Geocoder.us Username:
Geocoder.us Password:
To get a geocoder.us username and password go to: http://geocoder.us/user/signup
Beep? FALSE
if true, will beep every time an address is geocoded
Instructions
Enter addresses that you want to geocode in the Street, City, State, Zip
columns on the Geocode page. Not all fields must be entered, but there
must be a valid address and city+state or zip for geocoding to be
performed.
Select the rows that you want to geocode. You don't have to select the
entire row, any cell in the row will do. Click the geocode selected rows
button to start geocoding. About 2-3 rows are geocoded each second,
depending on the speed of your Internet connection.
At any time you can see the geocoded addresses in Google Earth by
clicking the "View in Google Earth" button. This will save all the
geocoded addresses to a Google Earth "KML" file and open the file in
Google Earth. The file will appear in the Temporary Places folder.
B C
2 Filepath C:\Data\google_Earth\kml_IT_co.kml
3 Document name KML File of Major IT Companies
4
<?xml version="1.0" encoding="UTF-8"?>
File Header <kml xmlns="http://earth.google.com/kml/2.1">
5
Code fragment 1 <Document>
<name>
Placemark ,0</coordinates>
10 </Point>
Code fragment 3
<description><![CDATA[
Placemark ]]></description>
11
Code fragment 4 </Placemark>
12
</Document>
13 Footer
</kml>
14
<Style id="a">
<IconStyle>
<Icon>
15 Style <href>http://maps.google.com/mapfiles/ms/icons/red-dot.png</href>
</Icon>
</IconStyle>
</Style>
</name>
16 Placemark code fragment style
<styleUrl>#a</styleUrl>
17
18
19
Step 1: Geocode Step 2: Generate KML File Step 3: View Map
Determine Lattitude & Longitude: Update File_Details Sheet: in Google Earth:
Select Rows, Press Geocode Button Press Gen KML File Button Press Run Google Earth Button