HomeAviationTravelPhotosMinistryResourcesBlogFunFilesXtraFilesResumeEmailTemp
Andy Borgmann's Blog
Where The Producer Gets the Mic
Next: My Feeling Towards Barack Obama's 2009 Inauguration? Disappointmet! Previous: I Finally Cried
Nobody Tell Our Math Teachers...
When Am I Ever Going to Need to Know This Math?I had the greatest middle school math teacher. His name was Mr. Panning. He was a great teacher. He was a great cross country coach. And especially at that point in my life - he was a great role model.

I remember sitting in Geometry my 8th grade year and numerous times hearing students (*cough* myself) saying, "when the heck am I going to need to know this in the real world."

More on that later...

We decided at last week's creative strategy meeting that one thing we wanted to do with the website was to "localize" it to the market we are in. So, for example, if someone from Tucson visits the website, the design reflects the fact we are on KQTH in Tucson. Or if in Fort Wayne, it reflects WOWO. You get the idea.

Pretty unique, huh? Problem is: this is not an easy thing to do.

First, one has to find all 41,700 zip codes and assign a latitude/longitude to each one of them into a database scheme.

Second, one has to then figure out what zipcodes are associated with which radio station (for example WSB in Atlanta has 646 zip codes it reaches). This is not particularly easy due to the fact that every station has a different "reach" even within their own city.

Third, and this is the toughest part, one has to be able to know where you, the web visitor is coming from. The idea is that from your IP address we extract your zipcode (not always reliable). From the zipcode, we extract a lat/lon coordinate.

Fourth, once one has the users lat/lon coordinate then one has to reverse search to find the nearest associated radio market (if there is one).

Crazy I know. But what does this have to do with math?

Taking someone's lat/lon coordinates and figuring out what zipcode that coordinates to (and therefore what radio market) incorporates some crazy math. Mainly using the Great Circle Formula to determine proximity:

Earth Radius (3963.0) * ACOS( SIN( Latitude of User * π/180 ) *
SIN( Latitude of Market Zip Code * π/180 ) +
COS( Latitude of User * π/180 ) *
COS( Latitude of Market Zip Codes * π/180 ) *
COS( (Longitude of Market Zip Code * π/180) -
(Longitude of User * π/180) ) )

Take that formula, incorporate with a MySQL database schema, sort by distance from nearest to furthest, limit your results to 1 (the nearest) and bam! You've figured out figured out the radio market a web visitor is in.

I guess my punk-8th grade self has his answer 12 years later.

There was a lot I learned back then I never knew how I would use.

I think about the only web programming class I have ever taken was in 7th grade. And the only video editing class I ever took was in 8th grade. The only design class I took was Sophomore year of high school. All while I thought I was going to be a doctor or an attorney.

On top of that, my last math class was pre-calculus my Junior year of high school.

10 years later, and with out a single college class in any of those fields, I find those classes were a great foundation.

What do you think you are learning today that you will utilize 10 years down the road?

I know as I get older I have become less teachable. We become "experts." We think we know what we need to know and ignore the rest. But like 8th graders in math class, just because we can't foresee what we need down the road, it never hurts to learn new things.

As my Uncle once told me, "you are either learning or you are dying." It's your choice.
Comments
Andy Borgmann
Friday, January 16, 2009 02:16:54 PM    Quote Selection | Permalink
Gravatar.com P.S. Swing over to http://www.allenhuntshow.com/Admin/Apps/ZIP/ and try it out for yourself. You can try by either putting in your own zip code, or click the "automatically find my zip code." option and see if it works.


CJ Mills
Friday, January 16, 2009 06:18:13 PM    Quote Selection | Permalink
Gravatar.com My. Head. Hurts.

Cool work man - I tried it out and it didn't get my exact zip, but had the proximity right.


The Last Cainanite
Saturday, January 17, 2009 01:17:00 AM    Quote Selection | Permalink
Gravatar.com Definitely an interesting tool for a website but I am wondering what sort of location specific content AHS website will offer anyway. I can't think of anything that would make sense, except of course for ads, which are not really content.

I have a few questions though. You calculate the distance between user zip code and radio station zip code. But in your second point you seem to indicate that your database would not have station coverage distances but a list of covered zip codes, which would better account for non-circular coverage areas, like the one of WOWO (see both daytime and nighttime coverage maps) anyway. Then the great circle formula would be superfluous - you would merely have to compare the user zip code with zip codes associated with a radio station.

I agree with your uncle though. A man learns as long as he lives, and that is even more important today with exponentially increasing knowledge base.


Andy Borgmann
Saturday, January 17, 2009 10:42:22 AM    Quote Selection | Permalink
Gravatar.com
The Last Cainanite said in comment # 3...Definitely an interesting tool for a website but I am wondering what sort of location specific content AHS website will offer anyway.
Mainly design elements (i.e. different background, different headers, etc...). The content will be relatively the same. When we first "pitch" the show, keep in mind we have to pitch it to stations. Stations have their own interests and objectives that sometimes syndicated shows don't share. So the advantage is two fold. 1.) It shows them we are on top of technology like no one else in the business (which is true, especially with some of the new features coming), and 2.) that we are partners in our endeavor and want them to succeed at their goals just as much as we want to succeed at ours.

The Last Cainanite said in comment # 3...I have a few questions though.
It's not a perfect process I freely admit. But it gets the basic idea. You are right using the GCD was taking the "easy" way out to some degree, but I don't have an IT staff, and I am only one guy doing a crap-ton of other jobs so every once and a while I cut a few corners when the added time doesn't bring a significant added benefit.

The Last Cainanite said in comment # 3...I agree with your uncle though.
He's a smart dude. One of Atlanta's premier technology venture capitalist. Great business man. I have learned a lot from the man.

CJ Mills said in comment # 2...My. Head. Hurts.
Well at least you don't need to know this stuff in your line of work to get a raise ;)


AdamElwer
Sunday, January 18, 2009 11:45:14 AM    Quote Selection | Permalink
Gravatar.com Ha The Great Circle Formula!
Well it doesnt take into account the flatening of the earth towards the poles so remember to convert all of that to State Plane Coordinate System. I went to college to be a pastor and spent for years as an engineer... hey life happens :)


Cecily
Wednesday, January 21, 2009 02:05:45 PM    Quote Selection | Permalink
Gravatar.com Kudos for taking the time to do that! But it went WAAAYYY over my head lol!


Join the Discussion and Post A Comment
Name:
Email Address
(mandatory - always private
also will be used for gravatar)
:
Website/Blog (optional):
(Standard HTML Tags allowed - a,b,blockquote,br,code,i,li,ol,ul - abusers will be logged and blocked)

What's Andy Up To?

Description
Andy's blog aims to be like a Scrubs episode, mixed with a Chuck Klosterman column, centered around the topic of faith. It is open, honest, raw, and a little embarrassing. It is a place to discuss religion, politics, ministry, pop culture, and well, just life - especially focused on the time of life we call our 20s!

Andy is the Executive Producer of The Allen Hunt Show; a progressive (in the literal sense), talk radio show based in Atlanta, GA aimed at bringing faith back into the public discussion. Andy enjoys travel, aviation, web design, politics, friends, and faith. He holds that the secret to a full life is loving God and loving people - which he fails at constantly.

Andy grew up in Fort Wayne, IN. He now lives in Alpharetta, GA.

More information about Andy can be found at www.2timothy42.org or Andy's Facebook.

P.S. As has been mentioned on air, Andy is horrible at grammar and spelling. Please excuse any mistakes, trust me, he's sorry.



Email Subscribe

Powered by FeedBurner


Calendar
<<    <    Jan 2009    >    >>
Sun Mon Tue Wed Thu Fri Sat
    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
31
2009-01-31 00:00:00
2009-01-31 23:59:59
31