adwords_location 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a07d9ade4c72aef5c7e48a4ea85fd460fe1be206
4
- data.tar.gz: d6983e9933b3537669d4c5c96b0e5d50e23512c3
3
+ metadata.gz: 0eb8b04ad347d9410c700dcf2699547bf973650b
4
+ data.tar.gz: ac36930ca07f87019ac485b2d036aa0d3a93dd52
5
5
  SHA512:
6
- metadata.gz: f94f0bc590548e8640e8b87fa59864046acea6e8da7e8460965a16223467e0298c3662fa8a883ccc841052866f849916d9712689ee49e5c24bcf0ea68515727e
7
- data.tar.gz: 43dda2ec4700a84903e5302f94e5fb613c400bd8c14eecd32728da88cf5a1234ee10b83e526aa84f677d8daffb0d8be2acdf555aefaa976535b4023b0d03cc8a
6
+ metadata.gz: f7be6a9dfec9b0c085ee085aae2176c59478c58cfe8f7533fc496a7168c1b875311f5fad0a05433e633823bb69847db483a8af7c64733ab440f52ca4dab48bd1
7
+ data.tar.gz: 608b3c558541cbc8f26e0d0cdba2dd205501ffd77321caa07049ee3652883eac87f685103d033703f84b0926250a3d50e5b73ee5cf04320bb8ee41cac748e1ac
@@ -1 +1,4 @@
1
- require_relative 'adwords_location/location'
1
+ require 'adwords_location/location'
2
+ require 'adwords_location/postal_code'
3
+ require 'adwords_location/city_2_dma'
4
+ require 'adwords_location/db'
@@ -0,0 +1,53 @@
1
+ require 'csv'
2
+
3
+ module AdWords
4
+
5
+ City2DMA = Struct.new(:city, :criteria_id, :state, :dma_region, :dma_region_code) do
6
+
7
+ def ==(other)
8
+ self.criteria_id == other.criteria_id && self.dma_region_code == other.dma_region_code
9
+ end
10
+
11
+ def description
12
+ "#{dma_region},#{state}"
13
+ end
14
+
15
+ def self.all
16
+ data.drop(1).map do |row|
17
+ AdWords::City2DMA.new(row[0], row[1].to_i, row[2], row[3], row[4].to_i)
18
+ end
19
+ end
20
+
21
+ private
22
+
23
+ def self.data
24
+ adwords_dma_file = 'adwords_api_cities_dma_regions_2014-07-23.csv'
25
+ @data ||= CSV.read(File.join(File.dirname(__FILE__), '..', 'data', adwords_dma_file))
26
+ end
27
+
28
+ end
29
+
30
+ class City2DMADb
31
+
32
+ def initialize
33
+ @city_to_dma_records = {}
34
+ cities = City2DMA.all
35
+ cities.each do |r|
36
+ @city_to_dma_records[r.criteria_id] ||= []
37
+ @city_to_dma_records[r.criteria_id] << r unless @city_to_dma_records[r.criteria_id].include? r
38
+ end
39
+ @city_to_dma_records.freeze
40
+ end
41
+
42
+ def size
43
+ @city_to_dma_records.size
44
+ end
45
+
46
+ def find_dmas_city_id(criteria_id)
47
+ @city_to_dma_records[criteria_id.to_i] || []
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+
@@ -0,0 +1,48 @@
1
+ require_relative 'location'
2
+ require_relative 'city_2_dma'
3
+ require_relative 'postal_code'
4
+
5
+ module AdWords
6
+
7
+ class Db
8
+
9
+ def initialize
10
+ @location_db = LocationDb.new
11
+ @postal_code_db = PostalCodeDb.new
12
+ end
13
+
14
+ def zipcode_state_country
15
+ data = {}
16
+ @location_db.all_postal_code_records.each do |id, record|
17
+ path = @location_db.path id
18
+ data[record.postal_code] = path
19
+ end
20
+ data
21
+ end
22
+
23
+ def zipcode_city_dma
24
+ city_data = {}
25
+ dma_data = {}
26
+ other = {}
27
+ @location_db.all_postal_code_records.each do |id, record|
28
+ @postal_code_db.cities_by_postal_code(record.postal_code).each do |city_cname|
29
+ city_record = @location_db.find_by_canonical_name city_cname
30
+ if city_record.nil?
31
+ other[record.postal_code] = []
32
+ else
33
+ dma_records = @location_db.dmas_by_city(city_record.criteria_id);
34
+ if dma_records.size > 0
35
+ dma_records.each do |d|
36
+ dma_data[record.postal_code] = [city_record.criteria_id, d.criteria_id]
37
+ end
38
+ else
39
+ city_data[record.postal_code] = [city_record.criteria_id]
40
+ end
41
+ end
42
+ end
43
+ end
44
+ [city_data, dma_data, other]
45
+ end
46
+
47
+ end
48
+ end
@@ -1,75 +1,58 @@
1
1
  require 'csv'
2
+ require_relative 'city_2_dma'
2
3
 
3
4
  module AdWords
4
5
 
5
6
  Location = Struct.new(:criteria_id, :name, :canonical_name, :parent_id, :country_code, :target_type, :status) do
6
7
 
8
+ POSTAL_CODE = 'Postal Code'
9
+ US = 'US'
10
+
7
11
  def description
8
12
  "#{canonical_name} (#{target_type})"
9
13
  end
10
14
 
11
- def self.all
12
- data.drop(1).map do |row|
13
- AdWords::Location.new(row[0].to_i, row[1], row[2], row[3].to_i, row[4], row[5], row[6])
14
- end
15
+ def postal_code
16
+ raise "Call postal_code the the record targeting type is: #{target_type}" unless target_type == POSTAL_CODE
17
+ name.rjust(5,'0')
15
18
  end
16
19
 
17
- private
18
-
19
- def self.data
20
- adwords_location_file = 'adwords_api_location_criteria_2014-05-21.csv'
21
- @data ||= CSV.read(File.join(File.dirname(__FILE__), '..', 'data', adwords_location_file))
20
+ def us_postal_code?
21
+ target_type == POSTAL_CODE and country_code == US
22
22
  end
23
-
24
- end
25
-
26
- City2DMA = Struct.new(:city, :criteria_id, :state, :dma_region, :dma_region_code) do
27
23
 
28
- def ==(other)
29
- self.criteria_id == other.criteria_id && self.dma_region_code == other.dma_region_code
30
- end
31
-
32
- def description
33
- "#{dma_region}, #{state}"
34
- end
35
-
36
- def self.all
24
+ def self.all
37
25
  data.drop(1).map do |row|
38
- AdWords::City2DMA.new(row[0], row[1].to_i, row[2], row[3], row[4].to_i)
26
+ AdWords::Location.new(row[0].to_i, row[1], row[2], row[3].to_i, row[4], row[5], row[6])
39
27
  end
40
28
  end
41
29
 
42
30
  private
43
31
 
44
32
  def self.data
45
- adwords_dma_file = 'adwords_api_cities_dma_regions_2014-05-21.csv'
46
- @data ||= CSV.read(File.join(File.dirname(__FILE__), '..', 'data', adwords_dma_file))
33
+ adwords_location_file = 'adwords_api_location_criteria_2014-07-23.csv'
34
+ @data ||= CSV.read(File.join(File.dirname(__FILE__), '..', 'data', adwords_location_file))
47
35
  end
48
-
49
36
  end
50
37
 
51
38
  class LocationDb
52
39
 
53
- attr_reader :location_records, :location_records_by_name, :city_to_dma_records
54
-
55
40
  def initialize
56
41
  @location_records = {}
57
42
  @location_records_by_name = {}
43
+ @location_records_by_canonical_name = {}
44
+
58
45
  records = Location.all
59
46
  records.each do |r|
60
47
  @location_records[r.criteria_id] = r
61
48
  @location_records_by_name[r.name] = r
49
+ @location_records_by_canonical_name[r.canonical_name] = r
62
50
  end
63
51
  @location_records.freeze
64
52
  @location_records_by_name.freeze
53
+ @location_records_by_canonical_name.freeze
65
54
 
66
- @city_to_dma_records = {}
67
- cities = City2DMA.all
68
- cities.each do |r|
69
- @city_to_dma_records[r.criteria_id] ||= []
70
- @city_to_dma_records[r.criteria_id] << r unless @city_to_dma_records[r.criteria_id].include? r
71
- end
72
- @city_to_dma_records.freeze
55
+ @city_2_dma = City2DMADb.new
73
56
  end
74
57
 
75
58
  def criteria_ids
@@ -84,6 +67,20 @@ module AdWords
84
67
  @location_records_by_name[name]
85
68
  end
86
69
 
70
+ def find_by_canonical_name(cname)
71
+ @location_records_by_canonical_name[cname]
72
+ end
73
+
74
+ def all_postal_code_records
75
+ @location_records.select do |id, record|
76
+ record.us_postal_code?
77
+ end
78
+ end
79
+
80
+ def all_postal_codes
81
+ @postal_code ||= get_call_postal_codes
82
+ end
83
+
87
84
  def path(criteria_id)
88
85
  path = []
89
86
  location = find criteria_id
@@ -93,28 +90,24 @@ module AdWords
93
90
  end
94
91
  path
95
92
  end
96
-
97
- def city_dmas(criteria_id)
98
- @city_to_dma_records[criteria_id.to_i]
99
- end
100
93
 
101
- def lookup_table
102
- ltable = {}
103
- criteria_ids.map do |id|
104
- path = path(id)
105
- city_dmas = (city_dmas(id) || [])
106
- dma_criteria_ids = city_dmas.map { |dma| find_by_name(dma.dma_region)[:criteria_id]}
107
- ltable[id] = path + dma_criteria_ids
94
+ def dmas_by_city(criteria_id)
95
+ dmas = @city_2_dma.find_dmas_city_id criteria_id
96
+ dmas.map do |dma|
97
+ find_by_name dma.dma_region
108
98
  end
109
- ltable
110
99
  end
111
100
 
112
- def output_lookup_table
113
- lookup_table.each do |id, values|
114
- puts values.join(',')
101
+ private
102
+
103
+ def get_call_postal_codes
104
+ codes = []
105
+ @location_records.each do |id, r|
106
+ codes << r.postal_code if r.us_postal_code?
115
107
  end
108
+ codes
116
109
  end
117
-
110
+
118
111
  end
119
112
 
120
113
  end
@@ -0,0 +1,71 @@
1
+ require 'csv'
2
+
3
+ module AdWords
4
+
5
+ PostalCode = Struct.new(:country_code, :postal_code, :city, :state, :state_code) do
6
+
7
+ def canonical_name
8
+ "#{postal_code},#{state_canonical_name}"
9
+ end
10
+
11
+ def city_canonical_name
12
+ "#{city},#{state_canonical_name}"
13
+ end
14
+
15
+ def state_canonical_name
16
+ "#{state},United States"
17
+ end
18
+
19
+ def self.all
20
+ data.drop(1).map do |row|
21
+ AdWords::PostalCode.new(row[0], row[1].rjust(5, '0'), row[2], row[3], row[4])
22
+ end
23
+ end
24
+
25
+ def self.data
26
+ postal_code_file = 'postal_code.csv'
27
+ @data ||= CSV.read(File.join(File.dirname(__FILE__), '..', 'data', 'postal_code', 'US', postal_code_file))
28
+ end
29
+
30
+ end
31
+
32
+ class PostalCodeDb
33
+
34
+ def initialize
35
+ @postal_code_records = {}
36
+ PostalCode.all.each do |r|
37
+ @postal_code_records[r.postal_code] ||= []
38
+ @postal_code_records[r.postal_code] << r
39
+ end
40
+ @postal_code_records.freeze
41
+ end
42
+
43
+ def size
44
+ @postal_code_records.size
45
+ end
46
+
47
+ def find_records_by_postal_code(postal_code)
48
+ @postal_code_records[postal_code]
49
+ end
50
+
51
+ def include?(postal_code)
52
+ @postal_code_records.include? postal_code
53
+ end
54
+
55
+ def cities_by_postal_code(postal_code)
56
+ if include? postal_code then
57
+ @postal_code_records[postal_code].map do |record|
58
+ record.city_canonical_name
59
+ end
60
+ else
61
+ []
62
+ end
63
+ end
64
+
65
+ def all_postal_codes
66
+ @postal_code_records.keys
67
+ end
68
+
69
+ end
70
+
71
+ end
@@ -12,7 +12,7 @@ Delta Junction,1012882,Alaska,"Fairbanks, AK",745
12
12
  Dillingham,1012883,Alaska,"Anchorage, AK",743
13
13
  Eagle River,1012884,Alaska,"Anchorage, AK",743
14
14
  Eielson AFB,1012885,Alaska,"Fairbanks, AK",745
15
- Elmendorf AFB,1012886,Alaska,"Anchorage, AK",743
15
+ Elmendorf Air Force Base,1012886,Alaska,"Anchorage, AK",743
16
16
  Fairbanks,1012887,Alaska,"Fairbanks, AK",745
17
17
  Galena,1012888,Alaska,"Fairbanks, AK",745
18
18
  Glennallen,1012890,Alaska,"Anchorage, AK",743
@@ -1196,6 +1196,7 @@ Mount Baldy,1014039,California,"Los Angeles, CA",803
1196
1196
  Mount Hamilton,1014040,California,"San Francisco-Oakland-San Jose, CA",807
1197
1197
  Mount Laguna,1014041,California,"San Diego, CA",825
1198
1198
  Mount Shasta,1014042,California,"Medford-Klamath Falls, OR",813
1199
+ Mount Wilson,1014043,California,"Los Angeles, CA",803
1199
1200
  Mountain View,1014044,California,"San Francisco-Oakland-San Jose, CA",807
1200
1201
  Murrieta,1014045,California,"Los Angeles, CA",803
1201
1202
  Napa,1014046,California,"San Francisco-Oakland-San Jose, CA",807
@@ -1330,6 +1331,7 @@ Redwood Valley,1014180,California,"San Francisco-Oakland-San Jose, CA",807
1330
1331
  Reedley,1014181,California,"Fresno-Visalia, CA",866
1331
1332
  Represa,1014182,California,"Sacramento-Stockton-Modesto, CA",862
1332
1333
  Rescue,1014183,California,"Sacramento-Stockton-Modesto, CA",862
1334
+ Reseda,1014184,California,"Los Angeles, CA",803
1333
1335
  Rialto,1014185,California,"Los Angeles, CA",803
1334
1336
  Richgrove,1014186,California,"Fresno-Visalia, CA",866
1335
1337
  Richmond,1014187,California,"San Francisco-Oakland-San Jose, CA",807
@@ -1348,9 +1350,11 @@ Rocklin,1014199,California,"Sacramento-Stockton-Modesto, CA",862
1348
1350
  Rodeo,1014200,California,"San Francisco-Oakland-San Jose, CA",807
1349
1351
  Rohnert Park,1014201,California,"San Francisco-Oakland-San Jose, CA",807
1350
1352
  Rosamond,1014202,California,"Los Angeles, CA",803
1353
+ Rosemead,1014203,California,"Los Angeles, CA",803
1351
1354
  Roseville,1014204,California,"Sacramento-Stockton-Modesto, CA",862
1352
1355
  Ross,1014205,California,"San Francisco-Oakland-San Jose, CA",807
1353
1356
  Rough and Ready,1014206,California,"Sacramento-Stockton-Modesto, CA",862
1357
+ Rowland Heights,1014207,California,"Los Angeles, CA",803
1354
1358
  Sacramento,1014208,California,"Sacramento-Stockton-Modesto, CA",862
1355
1359
  Salida,1014209,California,"Sacramento-Stockton-Modesto, CA",862
1356
1360
  Salinas,1014210,California,"Monterey-Salinas, CA",828
@@ -1360,34 +1364,45 @@ San Ardo,1014213,California,"Monterey-Salinas, CA",828
1360
1364
  San Bernardino,1014214,California,"Los Angeles, CA",803
1361
1365
  San Bruno,1014215,California,"San Francisco-Oakland-San Jose, CA",807
1362
1366
  San Carlos,1014216,California,"San Francisco-Oakland-San Jose, CA",807
1367
+ San Clemente,1014217,California,"Los Angeles, CA",803
1363
1368
  San Diego,1014218,California,"San Diego, CA",825
1369
+ San Dimas,1014219,California,"Los Angeles, CA",803
1370
+ San Fernando,1014220,California,"Los Angeles, CA",803
1364
1371
  San Francisco,1014221,California,"San Francisco-Oakland-San Jose, CA",807
1372
+ San Gabriel,1014222,California,"Los Angeles, CA",803
1365
1373
  San Gregorio,1014223,California,"San Francisco-Oakland-San Jose, CA",807
1366
1374
  San Jacinto,1014224,California,"Los Angeles, CA",803
1367
1375
  San Joaquin,1014225,California,"Fresno-Visalia, CA",866
1368
1376
  San Jose,1014226,California,"San Francisco-Oakland-San Jose, CA",807
1369
1377
  San Juan Bautista,1014227,California,"Monterey-Salinas, CA",828
1378
+ San Juan Capistrano,1014228,California,"Los Angeles, CA",803
1370
1379
  San Leandro,1014229,California,"San Francisco-Oakland-San Jose, CA",807
1371
1380
  San Lorenzo,1014230,California,"San Francisco-Oakland-San Jose, CA",807
1372
1381
  San Lucas,1014231,California,"Monterey-Salinas, CA",828
1373
1382
  San Luis Obispo,1014232,California,"Santa Barbara-San Luis Obispo, CA",855
1374
1383
  San Luis Rey,1014233,California,"San Diego, CA",825
1375
1384
  San Marcos,1014234,California,"San Diego, CA",825
1385
+ San Marino,1014235,California,"Los Angeles, CA",803
1376
1386
  San Martin,1014236,California,"San Francisco-Oakland-San Jose, CA",807
1377
1387
  San Mateo,1014237,California,"San Francisco-Oakland-San Jose, CA",807
1378
1388
  San Miguel,1014238,California,"Santa Barbara-San Luis Obispo, CA",855
1379
1389
  San Pablo,1014239,California,"San Francisco-Oakland-San Jose, CA",807
1390
+ San Pedro,1014240,California,"Los Angeles, CA",803
1380
1391
  San Quentin,1014241,California,"San Francisco-Oakland-San Jose, CA",807
1381
1392
  San Rafael,1014242,California,"San Francisco-Oakland-San Jose, CA",807
1382
1393
  San Ramon,1014243,California,"San Francisco-Oakland-San Jose, CA",807
1383
1394
  San Simeon,1014244,California,"Santa Barbara-San Luis Obispo, CA",855
1384
1395
  San Ysidro,1014245,California,"San Diego, CA",825
1385
1396
  Sanger,1014246,California,"Fresno-Visalia, CA",866
1397
+ Santa Ana,1014247,California,"Los Angeles, CA",803
1386
1398
  Santa Barbara,1014248,California,"Santa Barbara-San Luis Obispo, CA",855
1387
1399
  Santa Clara,1014249,California,"San Francisco-Oakland-San Jose, CA",807
1400
+ Santa Clarita,1014250,California,"Los Angeles, CA",803
1388
1401
  Santa Cruz,1014251,California,"Monterey-Salinas, CA",828
1402
+ Santa Fe Springs,1014252,California,"Los Angeles, CA",803
1389
1403
  Santa Margarita,1014253,California,"Santa Barbara-San Luis Obispo, CA",855
1390
1404
  Santa Maria,1014254,California,"Santa Barbara-San Luis Obispo, CA",855
1405
+ Santa Monica,1014255,California,"Los Angeles, CA",803
1391
1406
  Santa Paula,1014256,California,"Los Angeles, CA",803
1392
1407
  Santa Rosa,1014257,California,"San Francisco-Oakland-San Jose, CA",807
1393
1408
  Santa Ynez,1014258,California,"Santa Barbara-San Luis Obispo, CA",855
@@ -1395,6 +1410,7 @@ Santee,1014259,California,"San Diego, CA",825
1395
1410
  Saratoga,1014260,California,"San Francisco-Oakland-San Jose, CA",807
1396
1411
  Sausalito,1014261,California,"San Francisco-Oakland-San Jose, CA",807
1397
1412
  Scotts Valley,1014262,California,"Monterey-Salinas, CA",828
1413
+ Seal Beach,1014263,California,"Los Angeles, CA",803
1398
1414
  Seaside,1014264,California,"Monterey-Salinas, CA",828
1399
1415
  Sebastopol,1014265,California,"San Francisco-Oakland-San Jose, CA",807
1400
1416
  Selma,1014266,California,"Fresno-Visalia, CA",866
@@ -1404,9 +1420,12 @@ Shandon,1014269,California,"Santa Barbara-San Luis Obispo, CA",855
1404
1420
  Shasta,1014270,California,"Chico-Redding, CA",868
1405
1421
  Shasta Lake,1014271,California,"Chico-Redding, CA",868
1406
1422
  Sheep Ranch,1014272,California,"Sacramento-Stockton-Modesto, CA",862
1423
+ Sherman Oaks,1014273,California,"Los Angeles, CA",803
1407
1424
  Shingle Springs,1014274,California,"Sacramento-Stockton-Modesto, CA",862
1408
1425
  Shoshone,1014275,California,"Los Angeles, CA",803
1426
+ Sierra Madre,1014276,California,"Los Angeles, CA",803
1409
1427
  Sierraville,1014277,California,"Sacramento-Stockton-Modesto, CA",862
1428
+ Silverado,1014278,California,"Los Angeles, CA",803
1410
1429
  Simi Valley,1014279,California,"Los Angeles, CA",803
1411
1430
  Sloughhouse,1014280,California,"Sacramento-Stockton-Modesto, CA",862
1412
1431
  Smartsville,1014281,California,"Sacramento-Stockton-Modesto, CA",862
@@ -1419,7 +1438,10 @@ Somis,1014287,California,"Los Angeles, CA",803
1419
1438
  Sonoma,1014288,California,"San Francisco-Oakland-San Jose, CA",807
1420
1439
  Sonora,1014289,California,"Sacramento-Stockton-Modesto, CA",862
1421
1440
  Soquel,1014290,California,"Monterey-Salinas, CA",828
1441
+ South El Monte,1014291,California,"Los Angeles, CA",803
1442
+ South Gate,1014292,California,"Los Angeles, CA",803
1422
1443
  South Lake Tahoe,1014293,California,"Reno, NV",811
1444
+ South Pasadena,1014294,California,"Los Angeles, CA",803
1423
1445
  South San Francisco,1014295,California,"San Francisco-Oakland-San Jose, CA",807
1424
1446
  Spreckels,1014296,California,"Monterey-Salinas, CA",828
1425
1447
  Spring Valley,1014297,California,"San Diego, CA",825
@@ -1427,6 +1449,8 @@ Springville,1014298,California,"Fresno-Visalia, CA",866
1427
1449
  Squaw Valley,1014299,California,"Fresno-Visalia, CA",866
1428
1450
  Saint Helena,1014300,California,"San Francisco-Oakland-San Jose, CA",807
1429
1451
  Stanford,1014301,California,"San Francisco-Oakland-San Jose, CA",807
1452
+ Stanton,1014302,California,"Los Angeles, CA",803
1453
+ Stevenson Ranch,1014303,California,"Los Angeles, CA",803
1430
1454
  Stevinson,1014304,California,"Fresno-Visalia, CA",866
1431
1455
  Stinson Beach,1014305,California,"San Francisco-Oakland-San Jose, CA",807
1432
1456
  Stockton,1014306,California,"Sacramento-Stockton-Modesto, CA",862
@@ -1435,8 +1459,10 @@ Strathmore,1014308,California,"Fresno-Visalia, CA",866
1435
1459
  Suisun City,1014310,California,"Sacramento-Stockton-Modesto, CA",862
1436
1460
  Sultana,1014311,California,"Fresno-Visalia, CA",866
1437
1461
  Sun City,1014312,California,"Los Angeles, CA",803
1462
+ Sun Valley,1014313,California,"Los Angeles, CA",803
1438
1463
  Sunnyvale,1014315,California,"San Francisco-Oakland-San Jose, CA",807
1439
1464
  Sunol,1014316,California,"San Francisco-Oakland-San Jose, CA",807
1465
+ Sunset Beach,1014317,California,"Los Angeles, CA",803
1440
1466
  Susanville,1014318,California,"Reno, NV",811
1441
1467
  Sutter,1014319,California,"Sacramento-Stockton-Modesto, CA",862
1442
1468
  Sutter Creek,1014320,California,"Sacramento-Stockton-Modesto, CA",862
@@ -1445,6 +1471,7 @@ Tahoe City,1014323,California,"Sacramento-Stockton-Modesto, CA",862
1445
1471
  Tahoe Vista,1014324,California,"Sacramento-Stockton-Modesto, CA",862
1446
1472
  Tehachapi,1014326,California,"Bakersfield, CA",800
1447
1473
  Temecula,1014327,California,"Los Angeles, CA",803
1474
+ Temple City,1014328,California,"Los Angeles, CA",803
1448
1475
  Templeton,1014329,California,"Santa Barbara-San Luis Obispo, CA",855
1449
1476
  Thermal,1014330,California,"Palm Springs, CA",804
1450
1477
  Thornton,1014331,California,"Sacramento-Stockton-Modesto, CA",862
@@ -1454,33 +1481,44 @@ Three Rivers,1014334,California,"Fresno-Visalia, CA",866
1454
1481
  Tipton,1014335,California,"Fresno-Visalia, CA",866
1455
1482
  Tollhouse,1014336,California,"Fresno-Visalia, CA",866
1456
1483
  Tomales,1014337,California,"San Francisco-Oakland-San Jose, CA",807
1484
+ Topanga,1014338,California,"Los Angeles, CA",803
1485
+ Torrance,1014339,California,"Los Angeles, CA",803
1486
+ Trabuco Canyon,1014340,California,"Los Angeles, CA",803
1457
1487
  Tracy,1014341,California,"Sacramento-Stockton-Modesto, CA",862
1458
1488
  Tranquillity,1014342,California,"Fresno-Visalia, CA",866
1459
1489
  Traver,1014343,California,"Fresno-Visalia, CA",866
1460
1490
  Travis Air Force Base,1014344,California,"Sacramento-Stockton-Modesto, CA",862
1461
1491
  Trona,1014345,California,"Los Angeles, CA",803
1462
1492
  Truckee,1014346,California,"Sacramento-Stockton-Modesto, CA",862
1493
+ Tujunga,1014347,California,"Los Angeles, CA",803
1463
1494
  Tulare,1014348,California,"Fresno-Visalia, CA",866
1464
1495
  Tulelake,1014349,California,"Medford-Klamath Falls, OR",813
1465
1496
  Tupman,1014350,California,"Bakersfield, CA",800
1466
1497
  Turlock,1014351,California,"Sacramento-Stockton-Modesto, CA",862
1498
+ Tustin,1014352,California,"Los Angeles, CA",803
1467
1499
  Twain Harte,1014353,California,"Sacramento-Stockton-Modesto, CA",862
1468
1500
  Twentynine Palms,1014354,California,"Los Angeles, CA",803
1469
1501
  Twin Peaks,1014355,California,"Los Angeles, CA",803
1470
1502
  Ukiah,1014356,California,"San Francisco-Oakland-San Jose, CA",807
1471
1503
  Union City,1014357,California,"San Francisco-Oakland-San Jose, CA",807
1504
+ Universal City,1014358,California,"Los Angeles, CA",803
1472
1505
  Upland,1014359,California,"Los Angeles, CA",803
1473
1506
  Upper Lake,1014360,California,"San Francisco-Oakland-San Jose, CA",807
1474
1507
  Vacaville,1014361,California,"Sacramento-Stockton-Modesto, CA",862
1508
+ Valencia,1014362,California,"Los Angeles, CA",803
1475
1509
  Vallejo,1014363,California,"San Francisco-Oakland-San Jose, CA",807
1476
1510
  Valley Center,1014364,California,"San Diego, CA",825
1477
1511
  Valley Springs,1014365,California,"Sacramento-Stockton-Modesto, CA",862
1512
+ Van Nuys,1014367,California,"Los Angeles, CA",803
1513
+ Venice,1014368,California,"Los Angeles, CA",803
1478
1514
  Ventura,1014369,California,"Los Angeles, CA",803
1479
1515
  Victorville,1014370,California,"Los Angeles, CA",803
1480
1516
  Vidal,1014371,California,"Los Angeles, CA",803
1517
+ Villa Park,1014372,California,"Los Angeles, CA",803
1481
1518
  Visalia,1014373,California,"Fresno-Visalia, CA",866
1482
1519
  Vista,1014374,California,"San Diego, CA",825
1483
1520
  Wallace,1014375,California,"Sacramento-Stockton-Modesto, CA",862
1521
+ Walnut,1014376,California,"Los Angeles, CA",803
1484
1522
  Walnut Creek,1014377,California,"San Francisco-Oakland-San Jose, CA",807
1485
1523
  Warner Springs,1014378,California,"San Diego, CA",825
1486
1524
  Wasco,1014379,California,"Bakersfield, CA",800
@@ -1492,18 +1530,23 @@ Weaverville,1014384,California,"Chico-Redding, CA",868
1492
1530
  Weed,1014385,California,"Medford-Klamath Falls, OR",813
1493
1531
  Weldon,1014386,California,"Bakersfield, CA",800
1494
1532
  Weott,1014387,California,"Eureka, CA",802
1533
+ West Covina,1014388,California,"Los Angeles, CA",803
1534
+ West Hollywood,1014390,California,"Los Angeles, CA",803
1495
1535
  West Sacramento,1014391,California,"Sacramento-Stockton-Modesto, CA",862
1496
1536
  Westlake Village,1014392,California,"Los Angeles, CA",803
1497
1537
  Westley,1014393,California,"Sacramento-Stockton-Modesto, CA",862
1538
+ Westminster,1014394,California,"Los Angeles, CA",803
1498
1539
  Westmorland,1014395,California,"Yuma, AZ-El Centro, CA",771
1499
1540
  Westwood,1014396,California,"Reno, NV",811
1500
1541
  Wheatland,1014397,California,"Sacramento-Stockton-Modesto, CA",862
1501
1542
  Whitethorn,1014398,California,"Eureka, CA",802
1543
+ Whittier,1014399,California,"Los Angeles, CA",803
1502
1544
  Wildomar,1014400,California,"Los Angeles, CA",803
1503
1545
  Williams,1014401,California,"Sacramento-Stockton-Modesto, CA",862
1504
1546
  Willits,1014402,California,"San Francisco-Oakland-San Jose, CA",807
1505
1547
  Willow Creek,1014403,California,"Eureka, CA",802
1506
1548
  Willows,1014404,California,"Chico-Redding, CA",868
1549
+ Wilmington,1014405,California,"Los Angeles, CA",803
1507
1550
  Wilton,1014406,California,"Sacramento-Stockton-Modesto, CA",862
1508
1551
  Winchester,1014407,California,"Los Angeles, CA",803
1509
1552
  Windsor,1014408,California,"San Francisco-Oakland-San Jose, CA",807
@@ -1513,9 +1556,11 @@ Woodacre,1014412,California,"San Francisco-Oakland-San Jose, CA",807
1513
1556
  Woodbridge,1014413,California,"Sacramento-Stockton-Modesto, CA",862
1514
1557
  Woodlake,1014414,California,"Fresno-Visalia, CA",866
1515
1558
  Woodland,1014415,California,"Sacramento-Stockton-Modesto, CA",862
1559
+ Woodland Hills,1014416,California,"Los Angeles, CA",803
1516
1560
  Wrightwood,1014417,California,"Los Angeles, CA",803
1517
1561
  Yermo,1014418,California,"Los Angeles, CA",803
1518
1562
  Yolo,1014419,California,"Sacramento-Stockton-Modesto, CA",862
1563
+ Yorba Linda,1014420,California,"Los Angeles, CA",803
1519
1564
  Yosemite Valley,1014421,California,"Fresno-Visalia, CA",866
1520
1565
  Yountville,1014422,California,"San Francisco-Oakland-San Jose, CA",807
1521
1566
  Yreka,1014423,California,"Medford-Klamath Falls, OR",813
@@ -1525,6 +1570,7 @@ Yucca Valley,1014426,California,"Los Angeles, CA",803
1525
1570
  New Pine Creek,1024525,California,"Medford-Klamath Falls, OR",813
1526
1571
  Alta Sierra,9051507,California,"Sacramento-Stockton-Modesto, CA",862
1527
1572
  Arden-Arcade,9051519,California,"Sacramento-Stockton-Modesto, CA",862
1573
+ Avocado Heights,9051533,California,"Los Angeles, CA",803
1528
1574
  Bay Point,9051556,California,"San Francisco-Oakland-San Jose, CA",807
1529
1575
  Baywood-Los Osos,9051561,California,"Santa Barbara-San Luis Obispo, CA",855
1530
1576
  Blackhawk,9051601,California,"San Francisco-Oakland-San Jose, CA",807
@@ -1532,12 +1578,18 @@ Bonita,9051618,California,"San Diego, CA",825
1532
1578
  Cameron Park,9051682,California,"Sacramento-Stockton-Modesto, CA",862
1533
1579
  Camp Pendleton South,9051684,California,"San Diego, CA",825
1534
1580
  Canyon Lake,9051689,California,"Los Angeles, CA",803
1581
+ Commerce,9051759,California,"Los Angeles, CA",803
1535
1582
  Cotati,9051775,California,"San Francisco-Oakland-San Jose, CA",807
1583
+ Coto de Caza,9051776,California,"Los Angeles, CA",803
1536
1584
  Del Monte Forest,9051815,California,"Monterey-Salinas, CA",828
1537
1585
  Discovery Bay,9051835,California,"San Francisco-Oakland-San Jose, CA",807
1586
+ East La Mirada,9051870,California,"Los Angeles, CA",803
1587
+ East Los Angeles,9051873,California,"Los Angeles, CA",803
1538
1588
  East Palo Alto,9051877,California,"San Francisco-Oakland-San Jose, CA",807
1539
1589
  Eastvale,9051887,California,"Los Angeles, CA",803
1540
1590
  Edwards AFB,9051895,California,"Los Angeles, CA",803
1591
+ El Camino Village,9051898,California,"Los Angeles, CA",803
1592
+ Florence-Graham,9051954,California,"Los Angeles, CA",803
1541
1593
  Florin,9051956,California,"Sacramento-Stockton-Modesto, CA",862
1542
1594
  Foothill Farms,9051959,California,"Sacramento-Stockton-Modesto, CA",862
1543
1595
  Foster City,9051977,California,"San Francisco-Oakland-San Jose, CA",807
@@ -1546,18 +1598,22 @@ Gold River,9052035,California,"Sacramento-Stockton-Modesto, CA",862
1546
1598
  Granite Bay,9052048,California,"Sacramento-Stockton-Modesto, CA",862
1547
1599
  Graton,9052052,California,"San Francisco-Oakland-San Jose, CA",807
1548
1600
  Happy Valley,9052104,California,"Chico-Redding, CA",868
1601
+ Hawaiian Gardens,9052114,California,"Los Angeles, CA",803
1549
1602
  Hidden Meadows,9052127,California,"San Diego, CA",825
1550
1603
  Hillsborough,9052136,California,"San Francisco-Oakland-San Jose, CA",807
1551
1604
  Idyllwild-Pine Cove,9052177,California,"Los Angeles, CA",803
1605
+ Irwindale,9052191,California,"Los Angeles, CA",803
1552
1606
  Isla Vista,9052192,California,"Santa Barbara-San Luis Obispo, CA",855
1553
1607
  Janesville,9052196,California,"Reno, NV",811
1554
1608
  La Riviera,9052251,California,"Sacramento-Stockton-Modesto, CA",862
1609
+ Laguna Woods,9052259,California,"Los Angeles, CA",803
1555
1610
  Lake of the Pines,9052270,California,"Sacramento-Stockton-Modesto, CA",862
1556
1611
  Linda,9052326,California,"Sacramento-Stockton-Modesto, CA",862
1557
1612
  Live Oak,9052336,California,"Monterey-Salinas, CA",828
1558
1613
  Los Altos Hills,9052350,California,"San Francisco-Oakland-San Jose, CA",807
1559
1614
  Lucas Valley-Marinwood,9052358,California,"San Francisco-Oakland-San Jose, CA",807
1560
1615
  Montecito,9052467,California,"Santa Barbara-San Luis Obispo, CA",855
1616
+ North Tustin,9052561,California,"Los Angeles, CA",803
1561
1617
  Oildale,9052592,California,"Bakersfield, CA",800
1562
1618
  Olivehurst,9052597,California,"Sacramento-Stockton-Modesto, CA",862
1563
1619
  Orange Cove,9052601,California,"Fresno-Visalia, CA",866
@@ -1569,11 +1625,17 @@ Rancho Calaveras,9052727,California,"Sacramento-Stockton-Modesto, CA",862
1569
1625
  Rancho Murieta,9052728,California,"Sacramento-Stockton-Modesto, CA",862
1570
1626
  Rancho San Diego,9052729,California,"San Diego, CA",825
1571
1627
  Rosemont,9052771,California,"Sacramento-Stockton-Modesto, CA",862
1628
+ Rossmoor,9052775,California,"Los Angeles, CA",803
1629
+ Signal Hill,9052850,California,"Los Angeles, CA",803
1630
+ South Whittier,9052888,California,"Los Angeles, CA",803
1572
1631
  Tamalpais-Homestead Valley,9052956,California,"San Francisco-Oakland-San Jose, CA",807
1573
1632
  Valle Vista,9053039,California,"Los Angeles, CA",803
1574
1633
  Vandenberg Air Force Base,9053046,California,"Santa Barbara-San Luis Obispo, CA",855
1575
1634
  Vineyard,9053056,California,"Sacramento-Stockton-Modesto, CA",862
1635
+ West Carson,9053107,California,"Los Angeles, CA",803
1576
1636
  West Point,9053123,California,"Sacramento-Stockton-Modesto, CA",862
1637
+ West Rancho Dominguez,9053124,California,"Los Angeles, CA",803
1638
+ Willowbrook,9053170,California,"Los Angeles, CA",803
1577
1639
  Woodcrest,9053199,California,"Los Angeles, CA",803
1578
1640
  Woodside,9053208,California,"San Francisco-Oakland-San Jose, CA",807
1579
1641
  Yosemite Lakes,9053226,California,"Fresno-Visalia, CA",866
@@ -1785,7 +1847,7 @@ Strasburg,1014636,Colorado,"Denver, CO",751
1785
1847
  Telluride,1014638,Colorado,"Denver, CO",751
1786
1848
  Towaoc,1014639,Colorado,"Albuquerque-Santa Fe, NM",790
1787
1849
  Trinidad,1014640,Colorado,"Colorado Springs-Pueblo, CO",752
1788
- Air Force Academy,1014641,Colorado,"Colorado Springs-Pueblo, CO",752
1850
+ U.S. Air Force Academy,1014641,Colorado,"Colorado Springs-Pueblo, CO",752
1789
1851
  Vail,1014642,Colorado,"Denver, CO",751
1790
1852
  Victor,1014643,Colorado,"Colorado Springs-Pueblo, CO",752
1791
1853
  Vilas,1014644,Colorado,"Colorado Springs-Pueblo, CO",752
@@ -2367,7 +2429,7 @@ Plymouth,1015173,Florida,"Orlando-Daytona Beach, FL",534
2367
2429
  Polk City,1015174,Florida,"Tampa-St Petersburg (Sarasota), FL",539
2368
2430
  Pomona Park,1015175,Florida,"Jacksonville, FL",561
2369
2431
  Pompano Beach,1015176,Florida,"Miami-Ft. Lauderdale, FL",528
2370
- Ponte Vedra,1015177,Florida,"Jacksonville, FL",561
2432
+ Ponte Vedra Beach,1015177,Florida,"Jacksonville, FL",561
2371
2433
  Port Charlotte,1015178,Florida,"Ft. Myers-Naples, FL",571
2372
2434
  Port Orange,1015179,Florida,"Orlando-Daytona Beach, FL",534
2373
2435
  Port Richey,1015180,Florida,"Tampa-St Petersburg (Sarasota), FL",539
@@ -2479,7 +2541,7 @@ Feather Sound,9051940,Florida,"Tampa-St Petersburg (Sarasota), FL",539
2479
2541
  Ferry Pass,9051944,Florida,"Mobile, AL-Pensacola, FL",686
2480
2542
  Florida City,9051955,Florida,"Miami-Ft. Lauderdale, FL",528
2481
2543
  Forest City,9051961,Florida,"Orlando-Daytona Beach, FL",534
2482
- Fountainebleau,9051979,Florida,"Miami-Ft. Lauderdale, FL",528
2544
+ Fontainebleau,9051979,Florida,"Miami-Ft. Lauderdale, FL",528
2483
2545
  Four Corners,9051981,Florida,"Orlando-Daytona Beach, FL",534
2484
2546
  Fruit Cove,9051999,Florida,"Jacksonville, FL",561
2485
2547
  Fruitville,9052001,Florida,"Tampa-St Petersburg (Sarasota), FL",539
@@ -7380,7 +7442,7 @@ Grosse Pointe Park,9052074,Michigan,"Detroit, MI",505
7380
7442
  Grosse Pointe Woods,9052075,Michigan,"Detroit, MI",505
7381
7443
  Huron Charter Township,9052175,Michigan,"Detroit, MI",505
7382
7444
  Independence Township,9052179,Michigan,"Detroit, MI",505
7383
- Kalamazoo,9052214,Michigan,"Grand Rapids-Kalamazoo, MI",563
7445
+ Oshtemo,9052214,Michigan,"Grand Rapids-Kalamazoo, MI",563
7384
7446
  Kentwood,9052226,Michigan,"Grand Rapids-Kalamazoo, MI",563
7385
7447
  Lawton,9052306,Michigan,"Grand Rapids-Kalamazoo, MI",563
7386
7448
  Leoni Township,9052315,Michigan,"Lansing, MI",551