EARTHIFY

written by Jeff Crouse () at

Earthify takes a page of Craigslist posts and maps them on Google Earth. It has been tested with both search result pages and browse pages in several categories. The results are divided into "Earthifyable Listings" and "Un-Earthifyable Listings", the un-earthifyable ones being those that could not be located using the Google Geocode API based on the location provided by the user. In my tests, the listings are Earthifyable more often than not, but it really depends on how much information is in the posting.

I'd like to EMPHASIZE that Earthify uses Google Earth, which is Google's 3D gegraphical browser. It really is a great program, so if you don't have it, I suggest that you get it here.

Although Craigslist does have RSS feeds, these feeds only contain 14 listings, as opposed to the 100 listings that you get on a typical result page. Therefore, to get the listings, I scrape the page rather than parsing the RSS. Because of this, Earthify is somewhat vulnerable to changes on Craigslist, so if you encounter problems while using the script, please let me know.

Turn this:
Into this:

There are two ways you can use it.

1. The Bookmarklet

thumnbnail
watch the screencast example

A bookmarklet is usually a few lines of javascript posing as a toolbar shortcut. Instead of taking you to a new page, bookmarklets usually do something with the page that you are looking at when you click it. If you are using a browser that lets you drag links into a bookmark bar (ie: one that supports bookmarklets, like Firefox), you can...

  1. Drag the link below into your bookmark bar bar.
  2. Go to Craigslist and find the page of listings that you want to Earthify.
  3. Click the Earthify bookmarklet
  4. Please be patient! It takes a while to do all the magic to plot the listings, but it will work eventually.
  5. If you have your browser set up to automatically open KML files with Google Earth, then that should be the end of it. Otherwise, you will see a file called earthify.kml on your desktop. Open this with Google Earth and you will see your listings Earthified.
Earthify

2. The Network Link

thumnbnail
watch the screencast example

You can also add Earthify to “Your Places” in Google Earth. This is essentially like subscribing to Craigslist listing page from within Google Earth. All you have to do is...

  1. Find the page of Craigslist posts that you want to Earthify
  2. Paste the Craigslist URL into the field below and click "Create Network Link URL"
  3. Copy that link to your clipboard.
  4. Open Google Earth.
  5. Right-click on the “My Places” menu under the Places menu and select Add > Network Link....
  6. Paste the modified URL into the "Link" field and give the Network Link a name like "Earthified Craigslist Rentals", or whatever applies to your listing.
  7. Click "OK"

It will take a little while for the listings to download, so please be patient! Now, whenever you open up Google Earth, all you have to do is right click on the Place that you created and select "Refresh", and you will have the most recent postings Earthified.

About Earthify

I originally came up with the idea for the Earthify script while I was looking for an apartment in Brooklyn. I didn't know the area very well, so I was having a hard time figuring out if the listings I was seeing on Craigslist were close to Subways, restaurants, and other amenities. Housingmaps was nice, but it didn't allow me the search flexibility that I wanted, and I couldn't see where the places were in relation to the Subway. The Google Maps/Subway mashup was great for the Subway issue, but it was still very time-consuming to take every address one-by-one and plug them in. I wanted a way to browse the listings geographically, like with HousingMaps, but also have other information about the area, like the Subway mashup.

Eventually I started using Google Earth with Brian Abbotts New York Subway overlay and Metal Toads KMLPhotos script, and this was giving me great results, but I still had to look up the listings one-by-one on Craigslist and paste the address into Google Earth to find the location. I couldn't browse by location like I could on HousingMaps. So I decided to write this little script to combine all of the goodness of Craigslist, HousingMaps, GoogleMaps/Subway mashup, and Google Earth.

Source

There are basically two parts to Earthify - the bookmarklet, the server-side code, and the database schema.

I will be adding instructions on how to install this on your own server in the future some time. For now, hopefully this will be useful to someone.

  1. the bookmarklet - just put this into a link to make the bookmark.
  2. You can get the server-side code through SVN: http://svn.earthify.org
  3. the database schema

Future Plans