Friday, May 22, 2009

Hoose-Johnson of TGN

Hoose-Johnson Blog: What I did at Work Today, Vol. I: "For those of you who don't know, I work at The Generations Network. The main premise of our company is connecting families across distance and time.

Recently I was asked to do a new task that required a lot of math and programming skills. Luckily I was able to get on the Internet and find most of the code and data I needed. I was asked to create a list of adjacent counties for all U.S. counties. My first inclination was to just have someone look at a map and write them down. But then I realized there were thousands of them and using a program to do it would be faster.

The first thing I did was download all of the county boundaries from the U.S. government website. Being a government website, the data was in a really goofy format, but luckily I was able to convert it into a useful format that would let me calculate the adjacent counties. I used an open source polygon math library called GPC and I was able to create this map:



I then wrote some magical code that compared every county polygon to every other county polygon and came up with almost 10,000 adjacent county pairs. I also did the North America countries, U.S. and Canada states as well as the United Kingdom counties and Europe countries.

Soon we will use this data on the ancestry.com website to help rank search results for people that are in nearby counties / states / countries, and hopefully more people will find the ancestor(s) they are looking for!"

0 Comments:

Post a Comment

<< Home