Paddington Station. Paddington Station.

London, UK
June 28, 2006
Apple | Cool | Disney | Entertainment | Fitness | Geek | Microsoft | Politics | Seattle Storm | Transit | Travel | UW MBA

« Intel Core Duo Mac Mini: The First 96 Hours | Main | March 9 Confab »

March 6, 2006

Introducing coast2Coaster!

I'd like to start this post with an apology: I know my blogging has been a little light over the past couple weeks, and I've had a few people mention it to me. I'm sorry about that. Part of it has been due to the intensity of stuff going on at work, and the rest of it's because I've had this kick-ass hobby project consuming my nights and weekends. The good news is that, after much coding, re-coding, and testing, I'm thrilled to be able to drop the sheet on it.

It's called coast2Coaster.

What is it? Well, from a geek perspective, it's a mashup between the Roller Coaster Database and Google Maps. From a coaster enthusiast perspective, it's a map of each and every roller coaster in the United States.

(Oh, yeah. It practically made me bounce up and down in my chair when I started coding the thing.)

Now, I've admittedly been jonesing to build a mashup since I attended Web 2.0 back in October. And, like most mashups, this one stemmed from a moment of personal Internet frustration. I got the idea, you see, when I was planning my 2008 motorcycle trip in January. Back then, I was trying to find out where all the good coasters were around the country, and was having a hell of a time - there just wasn't a good, single resource where I could go and see, at a glance, where the parks were. This seemed silly - the data was out there, and the technology was pretty popular. Where was the map?

So, after some futile searching, I thought I'd just build the sucker. And here it is, free for all to enjoy.

A few caveats.

First, this is my first mashup, and I'm sure that some parts of it really suck. I'm not a Javascript guru, and had to learn a lot of this stuff as I was building the thing out. So if the thing blows up your browser or causes your machine to, you know, smoke, or something - I apologize. Please let me know what browser/OS you're running, what happened, and I'll put it in the debug list.

Second, I have a lot of ideas for this application, and this is just V1. I cut a lot of proposed stuff to get the first release out the door, and also because I'm pretty sure the collective ideas of the Internet community will be much better than anything I can come up with on my own. So if there's something you'd like to see, let me know. Assuming my programming kung fu (and free time) are up to it, I'm all ears.

Third, I wasn't able to geographically locate all the coaster parks out there. Of the 255 "active" parks in RCDB, I was only able to get latitude and longitude for 234 of 'em. I'll elaborate on the missing parks in the "how it works" section, below.

Fourth, I know that the data hygiene isn't perfect. I did a lot of geocoding - some manually, some automatically - and I'm reasonably sure that some of my stuff is off. So please don't put your brood in the Family Truckster without checking to make sure that the park is, indeed, where I think it is.

HOW IT WORKS
I know not everyone who reads my blog is a geek, but for all you geeks out there, here's how the system is put together.

At a high level, a Google Maps mashup just takes geocoded data (latitude and longitude) and plots it against a Javascript object. As long as you've got the geocoded data, you're golden.

STEP ONE: Get the data.
The RCDB is an amazing Web site, comprehensive to the extreme. However, one thing it does NOT have is any kind of Web service that can be called to obtain clean data from its systems. So my first order of business was to write a spider, something that would crawl through the RCDB a page at a time and bring back all the raw data to my local machine for processing.

The RCDB pages are reasonably clean HTML, which made it pretty straightforward to break apart tables of data. What I wanted was the name of each park, its address, its URL, and the number of active roller coasters it held. RCDB is a mite too comprehensive, here - it lists coasters that are no longer operating (flagged as such), and parks that are no longer in existence. I needed to screen all this stuff out so I could build a list of just the good stuff.

This took a lot, lot longer than I expected. There was a fair amount of tweaking and coding to make it all come together. As an example: some of the parks have changed their names over time, and RCDB captures this. Thus, you'll see "Bonfante Gardens (2001 to ?)" or something. I wanted to trim this back to just, "Bonfante Gardens." Not a problem, but it's indicative of the kinds of time-sucking detail work that you can get caught up in.

STEP TWO: Geocode.
Once I had the data, I then needed to transform the standard address into latitude and longitude. Fortunately, there's a free service on the Web that'll do this for you - geocoder.us. All you do is feed them the addresss you're interested in, and they spit back the latitude and longitude that corresponds. It's slick.

It's also not perfect. I was able to geocode roughly 2/3rds of the list, but that left 33% remaining. I used a copy of Microsoft Streets & Trips 2006 to look up those remaining addresses. Again, not a perfect solution, but it got me to where I wanted to be.

STEP THREE: Code Your Web Page.
I won't bore you with the laundry list of stuff I learned about JavaScript, Google Maps, browser compatibility, and the rest. Suffice to say that my client-side code went through a few total rewrites (most recently to take advantage of asynchronous JavaScript in order to make it faster). I'd like to call out a big, big thanks to the clearly-written Google Maps documentation AND to Mike Little, who has some free tutorials on his site in the UK.

MISSING DATA
After filtering, RCDB lists 255 parks in the United States with active roller coasters. Sadly, I was only able to locate geocoded information for 234 of them. If anyone has information on any of these, please let me know. The missing parks are:

V2 IDEAS
There were a lot of cool ideas that got cut from this release. Some of those under consideration include:

  • "Zoom to here" - this would add a button to each pop-up balloon for the parks that takes you down to the street level and brings in satellite photography of the park. (Try this manually. It's cool.)
  • An ability to filter the parks shown by the number of coasters they offer.
  • An ability to search for a park or coaster by name.
  • An ability to highlight the biggest, fastest, etc. coasters in the US.
  • Driving directions and/or trip planning features.
  • Thumbnail photography of parks and coasters.

I'm very open to suggestions, here. Let me know what you'd like, and I'll see what I can do!

Finally, I'd like to say a big thank-you to the guys at RCDB, who have done an amazing job of keeping the flame alive for coaster enthusiasts everywhere. This project would not have been possible without them. For my part, I'm just hopeful that coast2Coaster is something that people find valuable, and helps encourage people to get out and ride some cool stuff near where they live - or where they're traveling to.

Enjoy!

Posted by Gavin Shearer at March 6, 2006 1:02 AM. Posted to Geek.

Comments

GREAT IDEA MAN!!!! This mashup you created is too awesome. Props on the idea!

Something really cool would be to add in parks around the world, eventually.

I'm the webmaster of ThrillZing.com. I am currently redoing everything in php to maximaize the dynamic capabilities of the web. I am trying to have a lot of different things.. so maybe you might be interested in becoming a section of the new site.

Let me know,

Bobby Bonitati

Posted by: Bobby Bonitati at March 13, 2006 6:55 AM

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?


« Intel Core Duo Mac Mini: The First 96 Hours | Main | March 9 Confab »