Sunday, October 25, 2009

CSV to GeoRSS converter

A friend of mine was trying to mark on a map the location of 50 people as he read their names and addresses out of a database. The data changes slightly every month and he was doing it with a marker.

I told him I could plot the names on Google maps for him and so I built my first public web app. I've built a lot of web applications, but this is a first in many ways. It's the first time I've used Sinatra, DataMapper, Heroku, and Compass. It's the first time I imagined and created my own layout and styling, and it's my first app that I've tossed out there for people to use and play with. I'm trying to learn to participate more in the Ruby developer community.

The app converts a csv file into a georss feed and then redirects you to google maps with the url of the rss feed as the query string. That causes google maps to fetch the feed and display it's data an a map. The data isn't actually rss feed content, but the georss feed format is a super simple way of passing data to google maps.

Feel free to leave suggestions or check out the code.

5 comments:

Curtis Gibby said...

Jordan,

The blog post title is "CSV to GeoCSS converter" -- you might want to change it to "CSV to GeoRSS converter"

This app looks cool. You may want to have a sample .csv file for people to download and then run through the converter, something that they can look at and then edit to suit their needs.

Jordan Curzon said...

Curtis, Thanks for the title correction. Thanks for the example file suggestion too. I actually wrote this to convert MLS exports (the LDS Church database system) so I didn't think much about examples and all.

DW said...

Is there any way to detach this from google? There are many mapping options out there besides Google Maps and it would nice to just be able to take a csv file and create a straight georss xml file that can be used with any of them.

Ben said...

can't get it to work. assuming the api is outdated now?

Jordan Curzon said...

Ben, People have recently emailed me saying that it is working for them.

DW, you can copy the url that goes into the google maps page and use it directly. It's just a normal georss feed url that I happen to redirect you to google with the url as a parameter.