mochi/egeoip — pull request #8 by doubleyou (2012-11-09 11:23:46+00:00)
Title: Canada DMA targeting

See this: http://en.wikipedia.org/wiki/List_of_television_stations_in_North_America_by_media_market

This is an incomplete list, actually. I could find a handful of IPs that don't match any of the listed cities. Moreover, sometimes egeoip:lookup/1 returns just coordinates, without a city name or zip code.

Anyway, that's much better than nothing, allows us to target the majority of the country. In case of non-existing city we just return 0 as a DMA code.