Wednesday, March 4, 2009

World-Wide Developer Events & Groups: Let's Map This Shit!

After my travels around Asia and Australia for the past few months, I've seen that there are local developer groups and events *everywhere* - but it's not always easy to find a full list of all of them in one place. Wouldn't it be nifty if you could just consult a map of the world to see what was happening in your neck of the woods? Well, I think so, cuz I think maps solve everything. :)

So, let's see how big of a list (or how crowded of a map) we can make. If you know of a user group, local event (e.g. BarCamp Sydney), or local events aggregation site/calendar, then please submit it here. Then, check out all the contributions either in map form or spreadsheet form.

As a teaser, I've embedded a screenshot of the map with just some Australia data that I added. Keep reading below if you're curious how I've whipped up this mashup...

The whole system is built using Google Spreadsheets and the Google Maps API. There are two spreadsheets used: the first has rows of places with latitude/longitude coordinates, the second has rows of events/groups with their website and place. Both of them are contributed to using (modified) Google Spreadsheets Forms, which is one of the damn niftiest consumer features ever. The greatest thing about forms is that after you create a form using the spreadsheets UI, you can then copy the HTML, add whatever JavaScript/CSS/HTML you want, and host a new snazzy form on your server - as long as you retain the form input name attributes the same as the original and the form action set to the spreadsheet POST URL, then the form will continue working.

For the places form, I created it in spreadsheets and then added a map + geocoder to it so that I could get the latitude/longitude to store in the spreadsheet. More details on that hack are in this blog post. For the events/groups form, I created it in spreadsheets and then created the place dropdown by pulling in the JSON feed of the other spreadsheet and creating option elements for each row in the feed. More details on the JSON Spreadsheets feed are in this sample.

For the map of everything, I pull in the places spreadsheets feed, create a hash based on the location names, then pull in the events/groups spreadsheets feed, and push each row into an array in the matching location. Then I iterate through all the locations and plot them on the map with the associated stuff in the sidebar. To get the sized/labeled markers that represent the amount of stuff for each location, I use the Google Charts API (yep, it has a marker output). Oh, and finally, I set notification rules for each spreadsheet so that I know when anyone's contributed to them - it excites me! :)

((PLUG)): If you want to learn more about the Google Spreadsheets APIs, attend next week's talk at Google Sydney.

2 comments:

Cory said...

wow that really blows me away. after webstock i am pretty amped to utilize google maps much in the same way but in new zealand and more to do with public transport.

would it be fine to pick ya brain sometime?

Pamela Fox said...

Hey Cory-

Sure, send an email (pamela.fox at gmail). I have to warn you that sometimes my gurus in the forum are faster to respond to questions - but I do eventually reply to everything in my inbox. :)

.