Exotic Ideas..
Angad's Blog
About this blog
I am Angad Singh. I have served as the Sun Campus Ambassador of JIIT University, Noida (India) from August 2007 to July 2008 and as a Campus Ambassador Tech Lead from July 2008 to July 2009. This was my sun blog. Here I jotted down all my random scribblings, reports on all activities I conducted as CA at my university, my little projects, hacks, geeky stuff and new technology I came across, all the way to things I learnt in my exciting journey with Sun..
About Me
View Angad Singh's profile on LinkedIn
Technorati Authority
View blog authority
Subscribe
Search

10 Recent Entries
Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Links
My..
Blogs that interest me
 

Today's Page Hits: 260

Best Viewed in..

Mozilla Firefox

Locations of visitors to this page
« Firefox 3 Download... | Main | Solaris Network... »
Friday May 30, 2008
Campus Ambassador Map 2.0
This is another something I haven't been able to blog about lately, so finally doing so now.

Previously, I had created a simple google map with locations of few CA's in India to start with and using the "collaborate" feature, many other CA's were able to placemark their locations on the map too.

Recently, Sun created a completely new map of all Sun Campus Ambassadors on the Sun Developer Network site, showing all 500 of the CA's in a long table, mapped by region. But it still wasn't a map showing each CA dotted on to it. It is mapping the regions where we have CA's.

Owing to my recent discovery of 2 great web2.0'ish tools - namely Dapper.net and Yahoo Pipes, and a hackish mindset, I figured I could use the information given on this page, scrape it out somehow, and feed it to a map. That's exactly what I've done now :)

First I'll tell you a bit about the tools I've used:
What I've done On May 19th 2008:
  1. Created a Dapp, to extract the names and city names of all the 500+ CA's from the SDN webpage on which it is shown in plain HTML. My dapp exctracts the table and converts it into an RSS feed here.
  2. Next, I created a feedburner feed from the "Sun CA Location RSS" created in Step 1, to speed things up a bit. If we directly use the dapper feed to show the map, it takes a lot of time, since in that case, whenever someone sees the map, dapper is called to scrape off of that web page, which is a huge overhead, plus dapper has restrictions on the number of hits, etc, so I thought it's much better off to create a "cache" of the dapper feed using our good ol' Feedburner. Here is that feedburner feed.
  3. Now we finally come to the exciting part. Creating the Yahoo Pipe. Open up the yahoo pipe i created and read on (yes it's open source): It first fetches the feedburner feed created in step 2, splits it into 2. Why split into 2? Well, let me explain. The CA list on the SDN student zone webpage has 2 types of records, ones with city names and ones without. I could have stayed with showing only those CA's on the map whose locations are there in that list, but later I went a bit further and also cooked up a way to show those who don't have locations, thus showing all the CA's that are there. Using filters, we make sure one split contains those that have locations and the other contains those that don't. We then loop through each "item", a CA's university name and location in this specific case, and pass the "location identifier" (as I like to call it) to another submodule I created called "Get geodate (coordinates) from city name". The submodule uses the Yahoo Geocoder web service to get the latt-long data from the "location identifier". Location identifier is the city name in split-1 and the CA's university name in split-2. After that, we just rename the XML field names to convert it into a Yahoo Map compatible geoRSS feed. Finally, we use the union operator to merge both the splits into one final feed.


Data Flow: SDN CA list (web page) > Dapper.net (feed) > Feedburner.com (cached feed) > Yahoo Pipes (geoRSS feed) > Map > You website / blog / pipe / another mashup

The end result is a Yahoo Map showing the locations of all the 500+ Sun Campus Ambassadors, each having their own placemark. You may even click on the university name to go to the respective CA's landing page, where you can see his/her blog address, and signup for upcoming events in their university's sun club, speaking of which, mine's here ;)

So now we have a dynamically updating Sun Campus Ambassador map 2.0 showing all the CA's in the world, updating from the official Sun Developer Network Ambassadors Map page, which in turn is, I guess, updating from ambassadorzone.com!. You can very well do anything and everything with it: show it on your blog (get as a badge feature), add it to Google Fusion, My Yahoo, get email alerts about its changes, simply get it as RSS, JSON, PHP or even KML.

I used the google mashup editor to create a google map out of this yahoo pipe. Here's the google mashup map. (you have to zoom in to see all the CA's unlike the Yahoo map which shows them all at once)

I also created a version of the above yahoo pipe which takes input from a CSV file instead of feedburned' dapper feed, for fast loadup (though, remember this one's not dynamic)

All Links at once place:

Posted at 10:52AM May 30, 2008 by Angad Singh in Ambassador  |  Comments[2]  |  del.icio.us digg slashdot technorati Stumble It! Share on Facebook furl reddit Share on Twitter    

Comments:

I tried this out to see what the Canada Campus Ambassador landscape looks like...

Interesting in how it places U.B.C. somewhere in the frozen tundra in the far north of Canada's Nunavut territory... home to only the most hardy Inuit peoples...and polar bears.

UBC is also identified as being in Waterloo, Canada.

UBC is actually in Vancouver, Canada where the tempature is much more moderate, and NEVER hits the -50C that symbol location would lead me to believe :)

Posted by Rob on June 12, 2008 at 04:27 PM IST #

Hey Rob,

At the point of time when I had made this, the state/province column showed the state/province, so the yahoo geocoder service easily provided the lattitude and longitude for the locations. But now, someone has edited the page and added country names as a prefix to every state/province, crippling the yahoo geocoder service ability to return correct coordinates. E.g., It's "India (Noida)" instead of "Noida". That is why the symbol locations are now all pointing to the same place, that is the country's location.

Nonetheless, I had foreseen this and that is why I also backed up that state in a CSV file uploaded to mediacast.sun.com. See the static map which takes its input from the CVS file instead of the dynamic Dapp at: http://pipes.yahoo.com/pipes/pipe.info?_id=302b65971c90577cbf7dc0cfa1228fae

Making this dynamic again is beyond the ability of dapper or yahoo pipes. It would require custom coding.

Posted by Angad Singh on June 12, 2008 at 05:40 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed
Creative Commons License

This work by Angad Singh is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.