performance update

October 5th, 2006 by ed_park

Whew! Got so much traffic yesterday that the site started to really seriously bog down; apologies to anyone visiting during that time! In the meantime, I’ve implemented caching in Rails, which should help tremendously. On a technical note, I still have a love/hate relationship with mime types. Why doesn’t apache respect the DefaultType mime-type option if it doesn’t have an html extension? I don’t know. On the bright side, things really should be much faster now.

picked up by googlemapsmania, retecool.com, and more

October 4th, 2006 by ed_park

Traffic continues to pick up! 2178 unique visitors so far today. Most importantly, a new feed picked up earthalbum today: googlemapsmania.blogspot.com, which I’ve followed for a while. It’s an honor to be written up. Thanks, Mike!
googlemapsmania

Meanwhile, the thumbs keep coming on stumbleupon.com– up to 7390:
stumbleupon - 7390 thumbs-ups!

Also, a new site showed up big in the weblogs today: retecool, which appears to be a Web 2.0 Dutch site:
retecool

Finally, earthalbum has shown up on del.icio.us, saved by 24 people so far:
del.icio.us

Thanks again for all the support so far! If I get a bit of time, I really do want to do local (i.e. country/region-specific) versions of this… stay tuned! :)

5000 thumbs-ups! plus smooth panning…

October 2nd, 2006 by ed_park

Just hit 5000 thumbs-ups on stumbleupon!

stumbleupon.com - 5000 thumbs-ups!

In other news, I made it so that when you click on a location, the map smooth-pans to that location. I’m not sure whether it’ll give folks too much of a sense of vertigo, but initial checks of the logs indicate that people are actually clicking more– i.e., the panning effect appears to make the site more enjoyable.

Also, I’m trying a different google ads layout (along the right-hand edge of the screen) to see whether it’ll make much of a difference. I think that it may be a good deal more annoying than a strip along the bottom, though, so I don’t know whether I’ll stick with it. We’ll see.

Updated algorithm for YouTube edition

October 1st, 2006 by ed_park

earthalbum.com has received a tremendous number of hits for the YouTube edition– in particular, for the Saskatchewan area, due to stumbleupon.com review by Gemma.

However, it hasn’t received a lot of thumbs-ups, most likely because YouTube’s API is terrible. For the Flickr version of earthalbum.com, the pictures are ordered by “interestingness-desc”; i.e., Flickr has some internal algorithm that determines interestingness, and folks who use the API are allowed to sort by this. This is why most of the pictures in the Flickr version are so beautiful, and why the Flickr edition has received well over 4000 thumbs-ups to date.

With YouTube, on the other hand, the “list-by-tag” function returns a number of videos in what appears to be a random order. I’m therefore trying to establish some level of quality ordering by bringing back the top 100 and manually ordering them by a combination of rating_count and rating_avg. We’ll see how it works, but it seems much better so far.

I hope that YouTube changes their API to allow for something akin to “interestingness-desc” at some point. In the meantime, I’ll keep experimenting with algorithms.

earthalbum.com… lots of traffic!

September 27th, 2006 by ed_park

Seems lightning can strike twice. ChaseLightning recommended earthalbum.com, and it’s currently the #1 site on stumbleupon.com with 1145 thumbs-ups and 3 reviews in 10 hours. ChaseLightning, I don’t know if you’ll ever read this, but if you do– thanks! :)

For next steps, I’m thinking about creating different editions, e.g. earth album: USA, earth album: Europe, earth album: Asia, and earth album: the Pacific Islands (if you can find French Polynesia and click on it… beautiful).

Any other comments/abouts on how to make the site better would be very welcome.

buzz.stumbleupon.com - main page

the making of earthalbum.com - a flickr, google maps, Ruby on Rails, and scriptaculous mash-up

September 24th, 2006 by ed_park

I’ve always loved the romance of travel. I’ve traveled to much of the U.S. and Europe, but I’ve always wanted more. I’ve wanted to see Angkor Wat in Cambodia, Macchu Picchu in Peru, and penguins on the ice shelves of Antarctica. I’ve wanted to spend more time wandering the streets of Harajuku in Tokyo, marveling at the pyramids in Egypt, and sunnyng myself on the tropical beaches of French Polynesia.

While I don’t really have the time to go to those places, google maps and flickr have given me the opportunity to visit those places virtually using the best of what Flickr has to offer. Over the past few weeks, my principal hobby project has been “lifespree explorer”, a google maps + flickr mash-up built with Ruby on Rails and scriptaculous. I released the first version of lifespree explorer about a week and half ago via programmableweb.com. Soon, it was given a thumbs-up by someone at stumbleupon.com; in the next week, I received at least 10,000 hits from web stumblers, and was one of the most popular sites (5000+ votes) on stumbleupon for a while. (note: special thanks to all the stumblers who voted for me, and especially those folks that commented on the site!)

The responses were encouraging, so I decided to plow ahead. Next, I tried playing with the YouTube API in order to create a YouTube version of the site– i.e., a google maps + YouTube mash-up. There were no readily available Ruby libraries for it, but I was able to create a library that was good enough for what I wanted it to do pretty quickly; the code to do is listed at the bottom of this blog post.

I also registered earthalbum.com as a new site on westhost. I’d had a hell of a time trying to make the mash-up work with fastcgi– the rewriterule sections start getting ridiculously difficult to debug– so I’m currently running it with a mongrel back-end.

Currently, you can access the original flickr version of the site at www.earthalbum.com, and the YouTube version at www.earthalbum.com/youtube.

####################################################################
#
# This is a *seriously* simple API to for using just the list_by_tag
# function in the the YouTube api-- haven't added much in the way
# of error-checking. You need to have installed xml-simple for this to work.
#
# Usage:
# youtube_requester = Youtube.new [your youtube id]
# r = youtube_requester.list_by_tag "china duck"
# r.each do |video|
#       print video.title + "\n"
#       print video.url + "\n"
#       print video.youtube_id + "\n"
# end
#
# -Ed Park 9/20/2006
#
####################################################################
require 'rubygems'
require 'net/http'
require 'uri'
require 'xmlsimple'

class Youtube
        def initialize(api_key)
                @api_key = api_key
        end

        def list_by_tag(tag = nil, page = 1, per_page = 10)
                path = "/api2_rest?method=youtube.videos.list_by_tag"
                         + "&dev_id=#{ @api_key }&tag=#{ URI.escape tag }"
                         + &page=#{ page }&per_page=#{ per_page }"
                response = Net::HTTP.get("www.youtube.com", path)

                r = XmlSimple.xml_in(response)

                if r["status"] == "ok" && ! r["video_list"][0].nil?
                        return r["video_list"][0]["video"].nil? ?
                                 [] :
                                 r["video_list"][0]["video"].map { |x| x.extend(YoutubeVideo)
}
                end

                return []
        end
end

# Allows us to access most of the youtube hashkeys as methods.
# Note that we don't really want to override the id method, which
# is a ruby-native method, so we instead create a new method: youtube_id.
module YoutubeVideo
        def method_missing(meth, *args)
                if meth.to_s == 'youtube_id'
                        return self["id"][0]
                end
                if ! self[meth.to_s].nil?
                        return self[meth.to_s][0]
                end
                return ""
        end
end

About

September 24th, 2006 by ed_park

earthalbum started out as a hobby project and has begun to take on a life on its own. If you have any comments about it, please feel free to enter them here!