From f7ec0b669c32f25a755aef43a0bb13f5785ed37c Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Thu, 9 Oct 2014 10:50:16 -0400 Subject: [PATCH 1/9] Added coords for 10075 --- data/zipcodes.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index 98bd569..6f8d757 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -3505,6 +3505,7 @@ "10060","New York","NY","40.780751","-73.977182","-5","1" "10069","New York","NY","40.775477","-73.9905","-5","1" "10072","New York","NY","40.780751","-73.977182","-5","1" +"10075","New York","NY","40.773559","-73.956069","-5","1" "10079","New York","NY","40.780751","-73.977182","-5","1" "10080","New York","NY","40.780751","-73.977182","-5","1" "10081","New York","NY","40.780751","-73.977182","-5","1" From 8fff9d84cbfeaad567343e16bd37261226a62616 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Wed, 27 May 2015 10:09:03 -0400 Subject: [PATCH 2/9] Corrected data for 75205 --- data/zipcodes.csv | 2 +- lib/area/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index 6f8d757..356d7ff 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -33456,7 +33456,7 @@ "75202","Dallas","TX","32.77988","-96.80502","-6","1" "75203","Dallas","TX","32.745831","-96.80672","-6","1" "75204","Dallas","TX","32.800333","-96.78952","-6","1" -"75205","Dallas","TX","32.836094","-96.79524","-6","1" +"75205","Dallas","TX","32.843116","-96.789009","-6","1" "75206","Dallas","TX","32.826128","-96.7712","-6","1" "75207","Dallas","TX","32.78643","-96.81992","-6","1" "75208","Dallas","TX","32.751464","-96.83864","-6","1" diff --git a/lib/area/version.rb b/lib/area/version.rb index 46218fb..ed45a50 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.0" + VERSION = "0.10.1" end From 0abd0e8b7cd4d4695e3991669cbddba0d407cd27 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Thu, 28 Jul 2016 15:11:36 -0400 Subject: [PATCH 3/9] DB Updates --- data/zipcodes.csv | 3 ++- lib/area/version.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index 356d7ff..8ca1c5b 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -13,7 +13,6 @@ "00605","Aguadilla","PR","18.465162","-67.141486","-4","0" "00606","Maricao","PR","18.182151","-66.9588","-4","0" "00607","Aguas Buenas","PR","18.256995","-66.104657","-4","0" - "00609","Aibonito","PR","18.142002","-66.273278","-4","0" "00610","Anasco","PR","18.288319","-67.13604","-4","0" "00611","Angeles","PR","18.279531","-66.80217","-4","0" @@ -3503,6 +3502,7 @@ "10048","New York","NY","40.712086","-74.01227","-5","1" "10055","New York","NY","40.780751","-73.977182","-5","1" "10060","New York","NY","40.780751","-73.977182","-5","1" +"10065","New York","NY","40.760000","-73.960000","-5","1" "10069","New York","NY","40.775477","-73.9905","-5","1" "10072","New York","NY","40.780751","-73.977182","-5","1" "10075","New York","NY","40.773559","-73.956069","-5","1" @@ -3586,6 +3586,7 @@ "10196","New York","NY","40.780751","-73.977182","-5","1" "10197","New York","NY","40.780751","-73.977182","-5","1" "10199","New York","NY","40.750308","-74.00058","-5","1" +"10200","New York","NY","40.770000","-73.95000","-5","1" "10203","New York","NY","40.780751","-73.977182","-5","1" "10211","New York","NY","40.780751","-73.977182","-5","1" "10212","New York","NY","40.780751","-73.977182","-5","1" diff --git a/lib/area/version.rb b/lib/area/version.rb index ed45a50..e681b96 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.1" + VERSION = "0.10.2" end From b4c118d0b5e94b6379e3c8678fa98668628167c0 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Thu, 28 Jul 2016 15:57:00 -0400 Subject: [PATCH 4/9] DB updates --- data/zipcodes.csv | 18 +++++++++++++++++- lib/area/version.rb | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index 8ca1c5b..f480813 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -15281,6 +15281,7 @@ "34611","Spring Hill","FL","28.564167","-82.416515","-5","1" "34613","Brooksville","FL","28.555346","-82.53601","-5","1" "34614","Brooksville","FL","28.632101","-82.52181","-5","1" +"34638","Land O Lakes","FL","28.27","-82.52","-5","1" "34636","Istachatta","FL","28.65503","-82.267706","-5","1" "34639","Land O Lakes","FL","28.233671","-82.45463","-5","1" "34652","New Port Richey","FL","28.237582","-82.72818","-5","1" @@ -27114,6 +27115,7 @@ "60639","Chicago","IL","41.921431","-87.75415","-6","1" "60640","Chicago","IL","41.973181","-87.6665","-6","1" "60641","Chicago","IL","41.946431","-87.74576","-6","1" +"60642","Chicago","IL","41.9","-87.65","-6","1" "60643","Chicago","IL","41.696433","-87.65993","-6","1" "60644","Chicago","IL","41.881331","-87.75671","-6","1" "60645","Chicago","IL","42.008956","-87.69634","-6","1" @@ -33334,6 +33336,7 @@ "75029","Lewisville","TX","33.20743","-97.116282","-6","1" "75030","Rowlett","TX","32.91747","-96.534737","-6","1" "75032","Rockwall","TX","32.867103","-96.44129","-6","1" +"75033","Frisco","TX","33.143792","-96.83938","-6","1" "75034","Frisco","TX","33.143792","-96.83938","-6","1" "75035","Frisco","TX","33.130086","-96.78177","-6","1" "75037","Irving","TX","32.767268","-96.777626","-6","1" @@ -34710,6 +34713,7 @@ "77493","Katy","TX","29.810279","-95.82011","-6","1" "77494","Katy","TX","29.760833","-95.81104","-6","1" "77496","Sugar Land","TX","29.525461","-95.756462","-6","1" +"77498","Sugar Land","TX","29.525461","-95.756462","-6","1" "77497","Stafford","TX","29.525461","-95.756462","-6","1" "77501","Pasadena","TX","29.83399","-95.434241","-6","1" "77502","Pasadena","TX","29.680079","-95.19966","-6","1" @@ -36030,6 +36034,7 @@ "80110","Englewood","CO","39.646847","-104.99076","-7","1" "80111","Englewood","CO","39.610431","-104.88139","-7","1" "80112","Englewood","CO","39.579454","-104.88288","-7","1" +"80113","Englewood","CO","39.64","-104.96","-7","1" "80115","Aurora","CO","39.636562","-104.82093","-7","1" "80116","Franktown","CO","39.355957","-104.7241","-7","1" "80117","Kiowa","CO","39.382543","-104.42847","-7","1" @@ -37621,6 +37626,7 @@ "85079","Phoenix","AZ","33.276539","-112.18717","-7","0" "85080","Phoenix","AZ","33.276539","-112.18717","-7","0" "85082","Phoenix","AZ","33.276539","-112.18717","-7","0" +"85083","Phoenix","AZ","33.73","-112.14","-7","0" "85085","Phoenix","AZ","33.77776","-112.07945","-7","0" "85086","Anthem","AZ","33.831866","-112.06339","-7","0" "85087","New River","AZ","33.921493","-112.09992","-7","0" @@ -37628,6 +37634,7 @@ "85097","Phoenix","AZ","33.276539","-112.18717","-7","0" "85098","Phoenix","AZ","33.276539","-112.18717","-7","0" "85099","Phoenix","AZ","33.276539","-112.18717","-7","0" +"85122","Casa Grande","AZ","32.91","-111.74","-7","0" "85123","Mesa","AZ","33.427135","-111.758483","-7","0" "85200","Mesa","AZ","33.423596","-111.594435","-7","0" "85201","Mesa","AZ","33.432177","-111.84701","-7","0" @@ -37715,6 +37722,7 @@ "85290","Tortilla Flat","AZ","33.276539","-112.18717","-7","0" "85291","Valley Farms","AZ","33.013502","-111.42979","-7","0" "85292","Winkelman","AZ","32.945838","-110.72198","-7","0" +"85295","Gilbert","AZ","33.3","-111.74","-7","0" "85296","Gilbert","AZ","33.319722","-111.76078","-7","0" "85297","Gilbert","AZ","33.272322","-111.714171","-7","0" "85299","Gilbert","AZ","33.276539","-112.18717","-7","0" @@ -37798,6 +37806,7 @@ "85385","Peoria","AZ","33.276539","-112.18717","-7","0" "85387","Surprise","AZ","33.276539","-112.18717","-7","0" "85390","Wickenburg","AZ","33.961122","-112.76952","-7","0" +"85392","Avondale","AZ","33.47","-112.29","-7","0" "85395","Peoria","AZ","33.580089","-112.246311","-7","0" "85439","San Luis","AZ","32.491745","-114.784135","-7","0" "85501","Globe","AZ","33.53457","-110.75681","-7","0" @@ -38716,6 +38725,8 @@ "89170","Las Vegas","NV","35.927901","-114.972061","-8","1" "89173","Las Vegas","NV","35.927901","-114.972061","-8","1" "89177","Las Vegas","NV","35.927901","-114.972061","-8","1" +"89179","Las Vegas","NV","35.927901","-114.972061","-8","1" +"89179","Las Vegas","NV","35.927901","-114.972061","-8","1" "89180","Las Vegas","NV","35.927901","-114.972061","-8","1" "89185","Las Vegas","NV","35.927901","-114.972061","-8","1" "89191","Nellis AFB","NV","36.370315","-115.23128","-8","1" @@ -39446,6 +39457,8 @@ "92007","Cardiff By The Sea","CA","33.026742","-117.27816","-8","1" "92008","Carlsbad","CA","33.158137","-117.32646","-8","1" "92009","Carlsbad","CA","33.097841","-117.26744","-8","1" +"92010","Carlsbad","CA","33.016928","-116.846046","-8","1" +"92011","Carlsbad","CA","33.016928","-116.846046","-8","1" "92013","Carlsbad","CA","33.016928","-116.846046","-8","1" "92014","Del Mar","CA","32.961812","-117.25967","-8","1" "92018","Carlsbad","CA","33.016928","-116.846046","-8","1" @@ -39716,7 +39729,8 @@ "92391","Twin Peaks","CA","34.839964","-115.967051","-8","1" "92392","Victorville","CA","34.489466","-117.35321","-8","1" "92393","Victorville","CA","34.839964","-115.967051","-8","1" -"92394","Victorville","CA","34.55965","-117.35773","-8","1" +"92394","Victorville","CA","34.55965","-117.35773","-8","1 +"92395","Victorville","CA","34.55965","-117.35773","-8","1" "92396","Winchester","CA","33.714421","-117.069361","-8","1" "92397","Wrightwood","CA","34.35876","-117.62752","-8","1" "92398","Yermo","CA","34.909491","-116.84058","-8","1" @@ -39811,6 +39825,7 @@ "92614","Irvine","CA","33.680408","-117.82592","-8","1" "92615","Huntington Beach","CA","33.640302","-117.769442","-8","1" "92616","Irvine","CA","33.640302","-117.769442","-8","1" +"92617","Irvine","CA","33.63","-117.83","-8","1" "92618","Irvine","CA","33.659639","-117.73948","-8","1" "92619","Irvine","CA","33.66985","-117.765939","-8","1" "92620","Irvine","CA","33.714889","-117.7633","-8","1" @@ -40475,6 +40490,7 @@ "94155","San Francisco","CA","37.784827","-122.727802","-8","1" "94156","San Francisco","CA","37.784827","-122.727802","-8","1" "94157","San Francisco","CA","37.784827","-122.727802","-8","1" +"94158","San Francisco","CA","37.76","-122.39","-8","1" "94159","San Francisco","CA","37.784827","-122.727802","-8","1" "94160","San Francisco","CA","37.784827","-122.727802","-8","1" "94161","San Francisco","CA","37.784827","-122.727802","-8","1" diff --git a/lib/area/version.rb b/lib/area/version.rb index e681b96..5a20324 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.2" + VERSION = "0.10.3" end From 050049b94f7e29a23790b65032f4711ff67cedca Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Thu, 28 Jul 2016 16:05:07 -0400 Subject: [PATCH 5/9] Data --- data/zipcodes.csv | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index f480813..940534f 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -29,7 +29,6 @@ "00625","Caguas","PR","18.232109","-66.039087","-4","0" "00626","Caguas","PR","18.235003","-66.037318","-4","0" "00627","Camuy","PR","18.435246","-66.85644","-4","0" - "00631","Castaner","PR","18.186739","-66.85174","-4","0" "00633","Cayey","PR","18.194527","-66.183467","-4","0" "00634","Cayey","PR","18.111528","-66.177083","-4","0" @@ -40,7 +39,6 @@ "00639","Cidra","PR","18.176094","-66.158728","-4","0" "00640","Coamo","PR","18.077197","-66.359104","-4","0" "00641","Utuado","PR","18.268896","-66.70519","-4","0" - "00643","Corozal","PR","18.341254","-66.315194","-4","0" "00644","Coto Laurel","PR","18.049577","-66.55218","-4","0" "00645","Culebra","PR","18.308508","-65.304732","-4","0" @@ -65,8 +63,6 @@ "00669","Lares","PR","18.288418","-66.87503","-4","0" "00670","Las Marias","PR","18.241343","-66.97604","-4","0" "00671","Las Piedras","PR","18.1789","-65.869939","-4","0" - - "00674","Manati","PR","18.426137","-66.48697","-4","0" "00676","Moca","PR","18.37956","-67.08424","-4","0" "00677","Rincon","PR","18.336121","-67.23675","-4","0" @@ -83,13 +79,10 @@ "00693","Vega Baja","PR","18.440667","-66.3921","-4","0" "00694","Vega Baja","PR","18.443109","-66.398302","-4","0" "00698","Yauco","PR","18.06547","-66.85587","-4","0" - "00703","Aguas Buenas","PR","18.246205","-66.12827","-4","0" "00704","Aguirre","PR","17.970112","-66.22291","-4","0" "00705","Aibonito","PR","18.12942","-66.26541","-4","0" "00707","Maunabo","PR","18.014505","-65.91018","-4","0" - - "00714","Arroyo","PR","17.987288","-66.05552","-4","0" "00715","Mercedita","PR","18.003492","-66.55868","-4","0" "00716","Ponce","PR","17.999066","-66.59965","-4","0" @@ -99,7 +92,6 @@ "00720","Orocovis","PR","18.217827","-66.42265","-4","0" "00721","Palmer","PR","18.364161","-65.778288","-4","0" "00723","Patillas","PR","18.023196","-66.0131","-4","0" - "00725","Caguas","PR","18.233927","-66.04502","-4","0" "00726","Caguas","PR","18.212965","-66.058033","-4","0" "00728","Ponce","PR","18.013353","-66.65218","-4","0" @@ -117,18 +109,14 @@ "00740","Puerto Real","PR","18.331711","-65.62761","-4","0" "00741","Punta Santiago","PR","18.160755","-65.75765","-4","0" "00742","Roosevelt Roads","PR","18.264872","-65.594769","-4","0" - "00744","Rio Blanco","PR","18.206329","-65.743058","-4","0" "00745","Rio Grande","PR","18.366213","-65.82277","-4","0" "00747","Lluveras","PR","18.069474","-66.952589","-4","0" "00748","Fajardo","PR","18.326732","-65.652484","-4","0" "00751","Salinas","PR","17.993803","-66.26534","-4","0" "00752","San Antonio","PR","18.493745","-67.097726","-4","0" - "00754","San Lorenzo","PR","18.15633","-65.96831","-4","0" - "00757","Santa Isabel","PR","17.98631","-66.39457","-4","0" - "00761","Utuado","PR","18.265445","-66.702364","-4","0" "00762","Vega Alta","PR","18.420218","-66.324284","-4","0" "00763","Monserrate","PR","18.452175","-66.399836","-4","0" @@ -39729,7 +39717,7 @@ "92391","Twin Peaks","CA","34.839964","-115.967051","-8","1" "92392","Victorville","CA","34.489466","-117.35321","-8","1" "92393","Victorville","CA","34.839964","-115.967051","-8","1" -"92394","Victorville","CA","34.55965","-117.35773","-8","1 +"92394","Victorville","CA","34.55965","-117.35773","-8","1" "92395","Victorville","CA","34.55965","-117.35773","-8","1" "92396","Winchester","CA","33.714421","-117.069361","-8","1" "92397","Wrightwood","CA","34.35876","-117.62752","-8","1" From a903c00a19e12da3eeac03f7b90a25457f98a9b6 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Thu, 28 Jul 2016 16:09:49 -0400 Subject: [PATCH 6/9] Bump Version --- lib/area/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/area/version.rb b/lib/area/version.rb index 5a20324..cadfc0b 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.3" + VERSION = "0.10.4" end From a9f08e9e1891bbba48ac80b61b8406f9250de24c Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Fri, 23 Sep 2016 13:33:59 -0400 Subject: [PATCH 7/9] Adding 46062 --- data/zipcodes.csv | 2 ++ lib/area/version.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index 940534f..ebcba8b 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -2487,6 +2487,7 @@ "06457","Middletown","CT","41.553672","-72.6632","-5","1" "06459","Middletown","CT","41.556463","-72.658179","-5","1" "06460","Milford","CT","41.21953","-73.0554","-5","1" +"06461","Milford","CT","41.21953","-73.0554","-5","1" "06467","Milldale","CT","41.565697","-72.903746","-5","1" "06468","Monroe","CT","41.336046","-73.22241","-5","1" "06469","Moodus","CT","41.506499","-72.44479","-5","1" @@ -20176,6 +20177,7 @@ "46058","Mulberry","IN","40.349135","-86.66424","-5","0" "46060","Noblesville","IN","40.050109","-85.99815","-5","0" "46061","Noblesville","IN","40.072462","-86.052285","-5","0" +"46062","Noblesville","IN","40.072462","-86.052285","-5","0" "46063","Orestes","IN","40.27046","-85.72871","-5","0" "46064","Pendleton","IN","39.997694","-85.75075","-5","0" "46065","Rossville","IN","40.427919","-86.61059","-5","0" diff --git a/lib/area/version.rb b/lib/area/version.rb index cadfc0b..714c7ab 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.4" + VERSION = "0.10.6" end From 477541e097d86bd6154deef8a16424921cbc96f5 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Fri, 6 Jan 2017 10:52:11 -0500 Subject: [PATCH 8/9] NY/NJ --- data/zipcodes.csv | 2 +- lib/area/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/zipcodes.csv b/data/zipcodes.csv index ebcba8b..5d0ef74 100644 --- a/data/zipcodes.csv +++ b/data/zipcodes.csv @@ -3445,7 +3445,7 @@ "10001","New York","NY","40.750742","-73.99653","-5","1" "10002","New York","NY","40.71704","-73.987","-5","1" "10003","New York","NY","40.732509","-73.98935","-5","1" -"10004","New York","NJ","40.699226","-74.04118","-5","1" +"10004","New York","NY","40.699226","-74.04118","-5","1" "10005","New York","NY","40.706019","-74.00858","-5","1" "10006","New York","NY","40.707904","-74.01342","-5","1" "10007","New York","NY","40.714754","-74.00721","-5","1" diff --git a/lib/area/version.rb b/lib/area/version.rb index 714c7ab..2c11238 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.6" + VERSION = "0.10.7" end From dbecd0eaaa503f22fe0ec0f7b255bdad309fd526 Mon Sep 17 00:00:00 2001 From: Chris Korhonen Date: Fri, 3 Feb 2017 15:41:23 -0500 Subject: [PATCH 9/9] Pulling in ankane's commits for faster load time --- lib/area.rb | 21 +++++---------------- lib/area/version.rb | 2 +- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/lib/area.rb b/lib/area.rb index 4059419..5451294 100644 --- a/lib/area.rb +++ b/lib/area.rb @@ -10,30 +10,20 @@ require 'area/string' module Area - - zip_path = File.open(File.join(File.dirname(__FILE__), '..', 'data', 'zipcodes.csv')) - area_path = File.open(File.join(File.dirname(__FILE__), '..', 'data', 'areacodes.csv')) - - # there is probably a better way to do this... - if RUBY_VERSION.to_f >= 1.9 - @area_codes = CSV.read(area_path) - @zip_codes = CSV.read(zip_path) - else - @area_codes = FasterCSV.parse(area_path) - @zip_codes = FasterCSV.parse(zip_path) - end + ZIP_PATH = File.join(File.dirname(__FILE__), '..', 'data', 'zipcodes.csv') + AREA_PATH = File.join(File.dirname(__FILE__), '..', 'data', 'areacodes.csv') def self.area_codes - @area_codes + @area_codes ||= RUBY_VERSION.to_f >= 1.9 ? CSV.read(AREA_PATH) : FasterCSV.parse(AREA_PATH) end def self.zip_codes - @zip_codes + @zip_codes ||= RUBY_VERSION.to_f >= 1.9 ? CSV.read(ZIP_PATH) : FasterCSV.parse(ZIP_PATH) end def self.regions regions = [] - @area_codes.map{|row| regions << row.last.upcase } + area_codes.map{|row| regions << row.last.upcase } return regions end @@ -77,5 +67,4 @@ def self.zip_or_territory?(state) end end - end diff --git a/lib/area/version.rb b/lib/area/version.rb index 2c11238..f7b836b 100644 --- a/lib/area/version.rb +++ b/lib/area/version.rb @@ -1,3 +1,3 @@ module Area - VERSION = "0.10.7" + VERSION = "0.10.8" end