MLS membership to Google Earth
Posted: Mon Jul 02, 2007 9:43 pm
Hi,
I'm new here so forgive me if this has already been posted(It didn't turn up on a search). Also it seems that those of you in the US have tools not available to the rest of the world so I don't know if you already have a nice membership map with your ward websites. I wrote a python script to convert the MLS exported csv to a format that can be imported into google earth or google maps.
If any one is interested here it is:
http://web.mac.com/davidostler/iWeb/PYT ... leEarth.py
Usage: python mls2GoogleEarth.py Membership.csv
Membership.csv being the csv export from MLS.
This creates a file called wardMap.kml that you can import into Google Earth
I've created this based on the way we format addresses down here in New Zealand. I've tried to revamp the script to work with US addresses but I can't test it because I don't have data to test it with.
If anything is amiss it should be easy to fix by editing the script values for city and state.
The script also produces a csv file with the ward info reformatted to work better with address book imports. This file also contains the latitude and longitude for each member. If you run the script again from the same directory containing this file it will pull the coordinates from here instead of accessing Google.
Further it will write out an error file called geoError.txt containing a list of addresses that google could not find. You can use this to identify errors in the MLS information.
Hope you find this useful.
I'm new here so forgive me if this has already been posted(It didn't turn up on a search). Also it seems that those of you in the US have tools not available to the rest of the world so I don't know if you already have a nice membership map with your ward websites. I wrote a python script to convert the MLS exported csv to a format that can be imported into google earth or google maps.
If any one is interested here it is:
http://web.mac.com/davidostler/iWeb/PYT ... leEarth.py
Usage: python mls2GoogleEarth.py Membership.csv
Membership.csv being the csv export from MLS.
This creates a file called wardMap.kml that you can import into Google Earth
I've created this based on the way we format addresses down here in New Zealand. I've tried to revamp the script to work with US addresses but I can't test it because I don't have data to test it with.
If anything is amiss it should be easy to fix by editing the script values for city and state.
The script also produces a csv file with the ward info reformatted to work better with address book imports. This file also contains the latitude and longitude for each member. If you run the script again from the same directory containing this file it will pull the coordinates from here instead of accessing Google.
Further it will write out an error file called geoError.txt containing a list of addresses that google could not find. You can use this to identify errors in the MLS information.
Hope you find this useful.