Permalink
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (83 sloc) 2.54 KB
-module(egeoip_ca_dma).
-export([dma_code/1]).
dma_code(City) ->
case dict:find(City, all()) of
{ok, [DMA]} -> DMA;
error -> 0
end.
all() ->
{dict,75,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[[<<"Fredericton">>,12],
[<<"Rouyn-Noranda">>,31],
[<<"Levis">>,7],
[<<"Wingham">>,10],
[<<"Kelowna">>,15],
[<<"Peterborough">>,24]],
[[<<"Brandon">>,8],
[<<"Thunder Bay">>,30],
[<<"Terrace">>,35],
[<<"Laval">>,2],
[<<"Swift Current">>,42],
[<<"Orillia">>,18]],
[[<<"London">>,10],
[<<"Ottawa">>,4],
[<<"Belleville">>,24],
[<<"Carleton">>,32],
[<<"Matane">>,25]],
[[<<"Rivière-du-Loup">>,29]],
[[<<"Toronto">>,1],
[<<"Niagara Falls">>,1],
[<<"St. John's">>,17],
[<<"Kitimat">>,35]],
[[<<"Cambridge">>,9],
[<<"Vancouver-Victoria">>,3],
[<<"Shawinigan">>,20],
[<<"Sault Sainte Marie">>,37]],
[[<<"Halifax">>,11],
[<<"Trois-Rivières">>,20],
[<<"Montreal">>,2],
[<<"Petawawa">>,36],
[<<"Val-d'Or">>,31],
[<<"Prince Rupert">>,35]],
[[<<"Guelph">>,9],
[<<"Kingston">>,23],
[<<"Moncton">>,12],
[<<"Sudbury-Timmins-North Bay">>,16]],
[[<<"Moose Jaw">>,21],
[<<"Lethbridge">>,6],
[<<"Corner Brook">>,17],
[<<"Prince Albert">>,34]],
[[<<"Medicine Hat">>,39],
[<<"Barrie">>,18],
[<<"Saguenay">>,22],
[<<"Dartmouth">>,11],
[<<"Glace Bay">>,26]],
[[<<"Okanagan Valley">>,15],
[<<"Edmonton">>,5],
[<<"St. John">>,12],
[<<"Sydney">>,26],
[<<"Lloydminster">>,40],
[<<"Calgary">>,6],
[<<"Regina">>,21],
[<<"Campbellton">>,25]],
[[<<"Kitchener-Waterloo">>,9],
[<<"Gaspé">>,25],
[<<"Winnipeg">>,8],
[<<"Quebec City">>,7],
[<<"Prince George">>,38],
[<<"Charlottetown">>,28]],
[[<<"Hamilton">>,1],
[<<"Kamloops">>,15],
[<<"Dawson Creek">>,41],
[<<"Kenora">>,43]],
[[<<"Pembroke">>,36],
[<<"Windsor">>,13],
[<<"Red Deer">>,27],
[<<"Rimouski">>,25],
[<<"Bathurst">>,25]],
[[<<"Woodstock">>,10],
[<<"Sherbrooke">>,14],
[<<"Percé">>,25],
[<<"Saskatoon">>,19]],
[[<<"Trenton">>,24],[<<"Chaleur Bay">>,32],[<<"Yorkton">>,33]]}}}.