Skip to content

Commit

Permalink
cloudflare new pops
Browse files Browse the repository at this point in the history
  • Loading branch information
adaptive committed Mar 28, 2024
1 parent cf53d92 commit 3d76dde
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"cody.useContext": "embeddings"
}
15 changes: 12 additions & 3 deletions data/iata-filtered.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const iata = new Map([
["BGI", [13.08, -59.49]],
["BGR", [44.81, -68.82]],
["BGW", [33.28, 44.5]],
["BHY", [21.54, 109.29]],
["BKK", [13.69, 100.75]],
["BLR", [13.2, 77.71]],
["BMA", [59.36, 17.95]],
Expand Down Expand Up @@ -64,27 +65,30 @@ const iata = new Map([
["CGD", [28.92, 111.64]],
["CGH", [-23.63, -46.66]],
["CGK", [-6.13, 106.66]],
["CGO", [34.53, 113.84]],
["CGP", [22.25, 91.82]],
["CGQ", [43.9, 125.22]],
["CGY", [8.61, 124.46]],
["CHA", [35.04, -85.2]],
["CHC", [-43.49, 172.54]],
["CHI", [41.88, -87.77]],
["CHS", [32.88, -80.04]],
["CJR", [38.53, -77.86]],
["CKG", [29.72, 106.63]],
["CLE", [41.41, -81.84]],
["CLT", [35.22, -80.94]],
["CMB", [7.17, 79.89]],
["CMH", [40, -82.88]],
["CMN", [33.37, -7.59]],
["CNF", [-19.63, -43.96]],
["CNN", [56.9, 124.88]],
["CNX", [18.77, 98.97]],
["COK", [10.16, 76.39]],
["COR", [-31.32, -64.21]],
["CPH", [55.63, 12.65]],
["CPM", [33.89, -118.24]],
["CPT", [-33.97, 18.6]],
["CRK", [15.18, 120.55]],
["CSX", [28.19, 113.21]],
["CTU", [30.58, 103.96]],
["CUR", [12.18, -68.96]],
["CVG", [39.06, -84.66]],
Expand All @@ -100,6 +104,7 @@ const iata = new Map([
["DEN", [39.85, -104.67]],
["DFW", [32.9, -97.04]],
["DKR", [14.74, -17.49]],
["DLC", [38.96, 121.54]],
["DLS", [45.62, -121.16]],
["DME", [55.41, 37.9]],
["DMM", [26.47, 49.8]],
Expand Down Expand Up @@ -136,6 +141,7 @@ const iata = new Map([
["GDL", [20.53, -103.3]],
["GEO", [6.5, -58.25]],
["GIG", [-22.81, -43.25]],
["GND", [12, -61.79]],
["GNV", [29.69, -82.28]],
["GOJ", [56.22, 43.79]],
["GOT", [57.67, 12.29]],
Expand All @@ -155,6 +161,7 @@ const iata = new Map([
["HEL", [60.32, 24.97]],
["HET", [40.85, 111.81]],
["HFA", [32.81, 35.04]],
["HFE", [31.99, 116.98]],
["HGH", [30.24, 120.43]],
["HHN", [49.95, 7.26]],
["HHP", [22.29, 114.15]],
Expand Down Expand Up @@ -285,6 +292,7 @@ const iata = new Map([
["OXR", [34.2, -119.21]],
["PAE", [47.91, -122.28]],
["PAO", [37.46, -122.11]],
["PAP", [18.58, -72.29]],
["PAT", [25.59, 85.09]],
["PBC", [19.14, -98.37]],
["PBH", [27.43, 89.42]],
Expand Down Expand Up @@ -351,6 +359,7 @@ const iata = new Map([
["SOD", [-23.48, -47.45]],
["SOF", [42.69, 23.41]],
["SSA", [-12.91, -38.34]],
["STI", [19.4, -70.6]],
["STL", [38.74, -90.37]],
["STP", [44.93, -93.07]],
["STR", [48.69, 9.19]],
Expand All @@ -376,6 +385,7 @@ const iata = new Map([
["TUL", [36.19, -95.89]],
["TUN", [36.85, 10.22]],
["TXL", [52.55, 13.29]],
["TYN", [37.75, 112.63]],
["TYO", [35.55, 139.78]],
["UDI", [-18.88, -48.23]],
["UFA", [54.57, 55.88]],
Expand All @@ -393,7 +403,6 @@ const iata = new Map([
["WAW", [52.17, 20.97]],
["WHU", [31.37, 118.37]],
["WLG", [-41.33, 174.81]],
["WUX", [31.49, 120.42]],
["XAP", [-27.09, -52.63]],
["XNH", [30.94, 46.09]],
["YHZ", [44.88, -63.51]],
Expand All @@ -411,7 +420,7 @@ const iata = new Map([
["ZHY", [37.57, 105.15]],
["ZPM", [49.01, 12.1]],
["ZQZ", [40.74, 114.93]],
["ZRH", [47.45, 8.56]]
["ZRH", [47.45, 8.56]],
]);

export default iata;
18 changes: 14 additions & 4 deletions data/providers/cloudflare.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const cloudflare = {
"BGI", // Bridgetown (Barbados)
"BGR", // Bangor (US)
"BGW", // Baghdad (Iraq)
"BHY", // Beihai (China)
"BKK", // Bangkok (Thailand)
"BLR", // Bangalore (India)
"BNA", // Nashville (US)
Expand Down Expand Up @@ -56,21 +57,24 @@ const cloudflare = {
"CGB", // Cuiaba (Brazil)
"CGD", // Changde (China)
"CGK", // Jakarta (Indonesia)
"CGO", // Zhengzhou (China)
"CGP", // Chittagong (Bangladesh)
"CGQ", // Changchun (China)
"CGY", // Cagayan de Oro (Philippines)
"CHC", // Christchurch (New Zealand)
"CKG", // Chongqing (China)
"CLE", // Cleveland (US)
"CLT", // Charlotte (US)
"CMB", // Colombo (Sri Lanka)
"CMH", // Columbus (US)
"CMN", // Casablanca (Morocco)
"CNF", // Belo Horizonte (Brazil)
"CNN", // Kannur (India)
"CNX", // Chiang Mai (Thailand)
"COK", // Kochi (India)
"COR", // Cordoba (Argentina)
"CPH", // Copenhagen (Denmark)
"CPT", // Cape Town (South Africa)
"CSX", // Changsha (China)
"CUR", // Curacao (Netherlands Antilles)
"CWB", // Curitiba (Brazil)
"CZX", // Changzhou (China)
Expand All @@ -80,6 +84,7 @@ const cloudflare = {
"DEN", // Denver (US)
"DFW", // Dallas (US)
"DKR", // Dakar (Senegal)
"DLC", // Dalian (China)
"DME", // Moscow (Russia)
"DMM", // Dammam (Saudi Arabia)
"DOH", // Doha (Qatar)
Expand Down Expand Up @@ -107,6 +112,7 @@ const cloudflare = {
"GDL", // Guadalajara (Mexico)
"GEO", // Georgetown (Guyana)
"GIG", // Rio de Janeiro (Brazil)
"GND", // Grenada(Granada)
"GOT", // Gothenburg (Sweden)
"GRU", // Sao Paulo (Brazil)
"GUA", // Guatemala City (Guatemala)
Expand All @@ -121,6 +127,7 @@ const cloudflare = {
"HBA", // Hobart (Australia)
"HEL", // Helsinki (Finland)
"HFA", // Haifa (Israel)
"HFE", // Hefei (China)
"HGH", // Hangzhou (China)
"HKG", // Hong Kong (China)
"HNL", // Honolulu (US)
Expand Down Expand Up @@ -151,7 +158,6 @@ const cloudflare = {
"KHH", // Kaohsiung (Taiwan)
"KHI", // Karachi (Pakistan)
"KHN", // Nanchang (China)
"KHV", // Khabarovsk (Russia)
"KIN", // Kingston (Jamaica)
"KIV", // Chisinau (Moldova)
"KIX", // Osaka (Japan)
Expand All @@ -175,6 +181,7 @@ const cloudflare = {
"LIS", // Lisbon (Portugal)
"LLK", // Lankaran (Azerbaijan)
"LOS", // Lagos (Nigeria)
"LPB", // La Paz (Bolivia)
"LUX", // Luxembourg (Luxembourg)
"LYS", // Lyon (France)
"MAA", // Chennai (India)
Expand Down Expand Up @@ -219,6 +226,7 @@ const cloudflare = {
"OSL", // Oslo (Norway)
"OTP", // Bucharest (Romania)
"OUA", // Ouagadougou (Burkina Faso)
"PAP", // Port-au-Prince (Haiti)
"PAT", // Patna (India)
"PBH", // Paro (Bhutan)
"PBM", // Paramaribo (Suriname)
Expand Down Expand Up @@ -257,13 +265,15 @@ const cloudflare = {
"SJK", // Sao Jose dos Campos (Brazil)
"SJO", // San Jose (Costa Rica)
"SJP", // Sao Jose do Rio Preto (Brazil)
"SJU", // San Juan (Puerto Rico)
"SJW", // Shanghai (China)
"SKG", // Thessaloniki (Greece)
"SLC", // Salt Lake City (US)
"SMF", // Sacramento (US)
"SOD", // Sorocaba (Brazil)
"SOF", // Sofia (Bulgaria)
"SSA", // Salvador (Brazil)
"STI", // Santiago (Dominican Republic)
"STL", // St. Louis (US)
"STR", // Stuttgart (Germany)
"SUV", // Suva (Fiji)
Expand All @@ -285,6 +295,7 @@ const cloudflare = {
"TSN", // Tianjin (China)
"TUN", // Tunis (Tunisia)
"TXL", // Berlin (Germany)
"TYN", // Taiyuan (China)
"UDI", // Uberlandia (Brazil)
"UIO", // Quito (Ecuador)
"ULN", // Ulaanbaatar (Mongolia)
Expand All @@ -296,7 +307,6 @@ const cloudflare = {
"VTE", // Vientiane (Laos)
"WAW", // Warsaw (Poland)
"WHU", // Wuhan (China)
"WUX", // Wuxi (China)
"XAP", // Chapeco (Brazil)
"XNH", // Xining (China)
"YHZ", // Halifax (Canada)
Expand All @@ -310,7 +320,7 @@ const cloudflare = {
"ZAG", // Zagreb (Croatia)
"ZDM", // Zadar (Croatia)
"ZGN", // Zhongshan (China)
"ZRH" // Zurich (Switzerland)
"ZRH", // Zurich (Switzerland)
]
};

Expand Down
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion main.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
declare module '@adaptivelink/pops';
declare module "@adaptivelink/pops";
16 changes: 13 additions & 3 deletions notebooks/data.csv
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ cloudflare,BEY,33.83,35.49
cloudflare,BGI,13.08,-59.49
cloudflare,BGR,44.81,-68.82
cloudflare,BGW,33.28,44.5
cloudflare,BHY,21.54,109.29
cloudflare,BKK,13.69,100.75
cloudflare,BLR,13.2,77.71
cloudflare,BNA,36.13,-86.67
Expand Down Expand Up @@ -379,21 +380,24 @@ cloudflare,CFC,-26.79,-50.94
cloudflare,CGB,-15.65,-56.12
cloudflare,CGD,28.92,111.64
cloudflare,CGK,-6.13,106.66
cloudflare,CGO,34.53,113.84
cloudflare,CGP,22.25,91.82
cloudflare,CGQ,43.9,125.22
cloudflare,CGY,8.61,124.46
cloudflare,CHC,-43.49,172.54
cloudflare,CKG,29.72,106.63
cloudflare,CLE,41.41,-81.84
cloudflare,CLT,35.22,-80.94
cloudflare,CMB,7.17,79.89
cloudflare,CMH,40,-82.88
cloudflare,CMN,33.37,-7.59
cloudflare,CNF,-19.63,-43.96
cloudflare,CNN,56.9,124.88
cloudflare,CNX,18.77,98.97
cloudflare,COK,10.16,76.39
cloudflare,COR,-31.32,-64.21
cloudflare,CPH,55.63,12.65
cloudflare,CPT,-33.97,18.6
cloudflare,CSX,28.19,113.21
cloudflare,CUR,12.18,-68.96
cloudflare,CWB,-25.53,-49.18
cloudflare,CZX,31.91,119.78
Expand All @@ -403,6 +407,7 @@ cloudflare,DEL,28.56,77.1
cloudflare,DEN,39.85,-104.67
cloudflare,DFW,32.9,-97.04
cloudflare,DKR,14.74,-17.49
cloudflare,DLC,38.96,121.54
cloudflare,DME,55.41,37.9
cloudflare,DMM,26.47,49.8
cloudflare,DOH,25.27,51.56
Expand Down Expand Up @@ -430,6 +435,7 @@ cloudflare,GBE,-24.56,25.92
cloudflare,GDL,20.53,-103.3
cloudflare,GEO,6.5,-58.25
cloudflare,GIG,-22.81,-43.25
cloudflare,GND,12,-61.79
cloudflare,GOT,57.67,12.29
cloudflare,GRU,-23.43,-46.48
cloudflare,GUA,14.59,-90.53
Expand All @@ -444,6 +450,7 @@ cloudflare,HAN,21.21,105.8
cloudflare,HBA,-42.84,147.51
cloudflare,HEL,60.32,24.97
cloudflare,HFA,32.81,35.04
cloudflare,HFE,31.99,116.98
cloudflare,HGH,30.24,120.43
cloudflare,HKG,22.32,113.94
cloudflare,HNL,21.33,-157.92
Expand Down Expand Up @@ -474,7 +481,6 @@ cloudflare,KGL,-1.96,30.14
cloudflare,KHH,22.57,120.35
cloudflare,KHI,24.9,67.17
cloudflare,KHN,28.86,115.91
cloudflare,KHV,48.52,135.17
cloudflare,KIN,17.94,-76.78
cloudflare,KIV,46.94,28.93
cloudflare,KIX,34.44,135.24
Expand All @@ -498,6 +504,7 @@ cloudflare,LIM,-12.02,-77.11
cloudflare,LIS,38.77,-9.13
cloudflare,LLK,38.75,48.82
cloudflare,LOS,6.58,3.32
cloudflare,LPB,-16.51,-68.18
cloudflare,LUX,49.63,6.21
cloudflare,LYS,45.72,5.08
cloudflare,MAA,12.98,80.16
Expand Down Expand Up @@ -542,6 +549,7 @@ cloudflare,ORN,35.62,-0.61
cloudflare,OSL,60.19,11.1
cloudflare,OTP,44.57,26.08
cloudflare,OUA,12.36,-1.51
cloudflare,PAP,18.58,-72.29
cloudflare,PAT,25.59,85.09
cloudflare,PBH,27.43,89.42
cloudflare,PBM,5.45,-55.19
Expand Down Expand Up @@ -580,13 +588,15 @@ cloudflare,SJC,37.37,-121.93
cloudflare,SJK,-23.18,-46.12
cloudflare,SJO,10,-84.2
cloudflare,SJP,-20.82,-49.42
cloudflare,SJU,18.44,-66
cloudflare,SJW,38.27,114.69
cloudflare,SKG,40.52,22.97
cloudflare,SLC,40.79,-111.98
cloudflare,SMF,38.69,-121.59
cloudflare,SOD,-23.48,-47.45
cloudflare,SOF,42.69,23.41
cloudflare,SSA,-12.91,-38.34
cloudflare,STI,19.4,-70.6
cloudflare,STL,38.74,-90.37
cloudflare,STR,48.69,9.19
cloudflare,SUV,-18.05,178.56
Expand All @@ -608,6 +618,7 @@ cloudflare,TPE,25.08,121.22
cloudflare,TSN,39.12,117.34
cloudflare,TUN,36.85,10.22
cloudflare,TXL,52.55,13.29
cloudflare,TYN,37.75,112.63
cloudflare,UDI,-18.88,-48.23
cloudflare,UIO,-0.12,-78.36
cloudflare,ULN,47.85,106.76
Expand All @@ -619,7 +630,6 @@ cloudflare,VNO,54.64,25.28
cloudflare,VTE,17.98,102.57
cloudflare,WAW,52.17,20.97
cloudflare,WHU,31.37,118.37
cloudflare,WUX,31.49,120.42
cloudflare,XAP,-27.09,-52.63
cloudflare,XNH,30.94,46.09
cloudflare,YHZ,44.88,-63.51
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adaptivelink/pops",
"version": "0.5.8",
"version": "0.5.9",
"description": "Points of Presence geolocation",
"main": "dist/bundle.js",
"types": "main.d.ts",
Expand Down Expand Up @@ -78,7 +78,7 @@
"prebuild": "npx prettier --write '**/*.{js,json}' '!dist/**' --arrow-parens avoid --trailing-comma none",
"iata": "node ./tools/iata-filter.js > ./data/iata-filtered-test.js && mv ./data/iata-filtered-test.js ./data/iata-filtered.js",
"validate": "node ./tools/validator.js",
"test": "node ./test/index.test.js",
"test": "node ./test/index.test.mjs",
"csv": "node ./tools/csv-generator.js > ./notebooks/data.csv",
"spotter-atlatincnet": "node ./tools/spotters/atlanticnet.js",
"spotter-cdn77": "node ./tools/spotters/cdn77.js",
Expand Down

0 comments on commit 3d76dde

Please sign in to comment.