CSV (in textedit I had to hit “Format > Make Plain Text” then save)ġ3. Copy and Paste the output into your favorite text editor (“File > Save as” in Firefox adds newlines and messes up the file)ġ2. XML file you just saved in Firefox (Google Chrome DID NOT work for me) to let it parse the file with the XSL stylesheet to convert the XML into a CSV format (this might with a large file my computer was unresponsive for 10-15 seconds so have patience)ġ1. KML file in your favorite text editor.ġ0. Now we have to do some minor editing to the KML file and apply a XSL stylesheet.
Download the “kml2csv.xsl’ stylesheet in the same directory as the KML file and Download: KML2CSV.XSL from githubħ. Export the geocoded data by clicking “Export to KML”Ħ. Use “Edit” > “Modify Columns” to choose which columns contain location data.ĥ. To geocode the data click “Visualize” > “Map.” Pay attention to which column Google is using to geocode the dataset.
Import the data into Fusion Tables by clicking “New Table” > “Import Table” then follow the on-screen instructionĤ. Double click the little blue box on the lower left corner of the selected cell with the concatenate function to copy it down the entire column. My dataset had these values in separate columns so I used the CONCATENATE function in excel to combine the location information into one column.Ģ. Google likes the Addreses to be formated as “street city state zip”. Prepare the data for Google Fusion Tables. This guide will allow you to convert Google Fusion Table KML to CSV format by using a custom XSL stylesheet.ġ.
Unfortunately, Google doesn’t allow you to export the Latitude and Longitude coordinates from the geocoded datasets in CSV format only KML format. The DictReader is a collection of dicts, one for each row. Import geocodingforkml.py into your module. These are the steps for parsing the CSV file and creating a KML file. While working on a project involving large datasets of pharmacy and hospital locations I found Fusion Tables useful especially because it geocoded 60,000 addresses with no apparent rate limitations and has a robust API and JSON support. You create an element with createElement or createElementNS, and append to another element with appendChild. Google Fusion Tables is a service by Google for managing and visualizing large data sets in the cloud.