souvik0306 commited on
Commit
a7db64a
·
0 Parent(s):

initial commit

Browse files
Files changed (11) hide show
  1. aircraft.csv +23 -0
  2. airport.csv +0 -0
  3. countrycurrency.csv +250 -0
  4. currency.py +19 -0
  5. currencyrates.csv +245 -0
  6. dataset_prep.py +41 -0
  7. flight_distance.py +124 -0
  8. main.py +28 -0
  9. optimizer.py +95 -0
  10. ui.py +90 -0
  11. weather.py +90 -0
aircraft.csv ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Aircraft,Range_NauticalMiles,Range_km,Fuel_Consumption_kg/hr,Cruising Speed (kts),Speed_kmh,MaxFlightTime_hr,Max_Fuel_Capacity_kg
2
+ Boeing 737-800,2935,5435.62,2530,455,842.66,6.45,16318.50
3
+ Airbus A321-100,3000,5556,2885,493,913.04,6.09,17569.65
4
+ Airbus A321-231,3200,5926.4,2740,493,913.04,6.49,17782.60
5
+ Airbus A320,3300,6111.6,2430,468,866.74,7.05,17131.50
6
+ Boeing 767-200,3900,7222.8,4500,470,870.44,8.3,37350.00
7
+ Boeing 757-200,3915,7250.58,3320,470,870.44,8.33,27655.60
8
+ Boeing 767-300,4020,7445.04,4800,470,870.44,8.55,41040.00
9
+ Boeing 777-200,5240,9704.48,6080,490,907.48,10.69,64995.20
10
+ Boeing 767-300ER,5980,11074.96,4940,490,907.48,12.2,60268.00
11
+ Airbus A330-300,6350,11760.2,5700,490,907.48,12.96,73872.00
12
+ Airbus A330-200,7250,13427,5590,490,907.48,14.8,82732.00
13
+ Boeing 747-400,7260,13445.52,10230,488,903.78,14.88,152222.40
14
+ Airbus A340-300,7300,13519.6,6500,488,903.78,14.96,97240.00
15
+ Boeing 787-8,7355,13621.46,4900,447,827.84,16.45,80605.00
16
+ Boeing 777-300ER,7370,13649.24,7500,447,827.84,16.49,123675.00
17
+ Boeing 787-9,7530,13945.56,5600,447,827.84,16.85,94360.00
18
+ Boeing 777-200ER,7725,14306.7,6630,470,870.44,16.44,108997.20
19
+ Boeing 747-8,7730,14315.96,9600,470,870.44,16.45,157920.00
20
+ Airbus A380,8000,14816,11000,470,870.44,17.02,187220.00
21
+ Airbus A350-900,8100,15001.2,5800,470,870.44,17.23,99934.00
22
+ Boeing 777-200LR,8555,15843.86,6800,488,903.78,17.53,119204.00
23
+ Airbus A340-500,9000,16668,8000,488,903.78,18.44,147520.00
airport.csv ADDED
The diff for this file is too large to render. See raw diff
 
countrycurrency.csv ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name,name_fr,ISO3166-1-Alpha-2,ISO3166-1-Alpha-3,ISO3166-1-numeric,ITU,MARC,WMO,DS,Dial,FIFA,FIPS,GAUL,IOC,Currency_code,currency_country_name,currency_minor_unit,currency_name,currency_numeric_code,is_independent
2
+ Afghanistan,Afghanistan,AF,AFG,4,AFG,af,AF,AFG,93,AFG,AF,1,AFG,AFN,AFGHANISTAN,2,Afghani,971,Yes
3
+ Albania,Albanie,AL,ALB,8,ALB,aa,AB,AL,355,ALB,AL,3,ALB,ALL,ALBANIA,2,Lek,8,Yes
4
+ Algeria,Algérie,DZ,DZA,12,ALG,ae,AL,DZ,213,ALG,AG,4,ALG,DZD,ALGERIA,2,Algerian Dinar,12,Yes
5
+ American Samoa,Samoa Américaines,AS,ASM,16,SMA,as, ,USA,1-684,ASA,AQ,5,ASA,USD,AMERICAN SAMOA,2,US Dollar,840,Territory of US
6
+ Andorra,Andorre,AD,AND,20,AND,an, ,AND,376,AND,AN,7,AND,EUR,ANDORRA,2,Euro,978,Yes
7
+ Angola,Angola,AO,AGO,24,AGL,ao,AN, ,244,ANG,AO,8,ANG,AOA,ANGOLA,2,Kwanza,973,Yes
8
+ Anguilla,Anguilla,AI,AIA,660,AIA,am, , ,1-264,AIA,AV,9,AIA,XCD,ANGUILLA,2,East Caribbean Dollar,951,Territory of GB
9
+ Antarctica,Antarctique,AQ,ATA,10, ,ay,AA, ,672,ROS,AY,10, ,,ANTARCTICA,,No universal currency,,International
10
+ Antigua and Barbuda,Antigua-Et-Barbuda,AG,ATG,28,ATG,aq,AT, ,1-268,ATG,AC,11,ANT,XCD,ANTIGUA AND BARBUDA,2,East Caribbean Dollar,951,Yes
11
+ Argentina,Argentine,AR,ARG,32,ARG,ag,AG,RA,54,ARG,AR,12,ARG,ARS,ARGENTINA,2,Argentine Peso,32,Yes
12
+ Armenia,Arménie,AM,ARM,51,ARM,ai,AY,AM,374,ARM,AM,13,ARM,AMD,ARMENIA,2,Armenian Dram,51,Yes
13
+ Aruba,Aruba,AW,ABW,533,ABW,aw,NU, ,297,ARU,AA,14,ARU,AWG,ARUBA,2,Aruban Florin,533,Part of NL
14
+ Australia,Australie,AU,AUS,36,AUS,at,AU,AUS,61,AUS,AS,17,AUS,AUD,AUSTRALIA,2,Australian Dollar,36,Yes
15
+ Austria,Autriche,AT,AUT,40,AUT,au,OS,A,43,AUT,AU,18,AUT,EUR,AUSTRIA,2,Euro,978,Yes
16
+ Azerbaijan,Azerbaïdjan,AZ,AZE,31,AZE,aj,AJ,AZ,994,AZE,AJ,19,AZE,AZN,AZERBAIJAN,2,Azerbaijanian Manat,944,Yes
17
+ Bahamas,Bahamas,BS,BHS,44,BAH,bf,BA,BS,1-242,BAH,BF,20,BAH,BSD,BAHAMAS,2,Bahamian Dollar,44,Yes
18
+ Bahrain,Bahreïn,BH,BHR,48,BHR,ba,BN,BRN,973,BHR,BA,21,BRN,BHD,BAHRAIN,3,Bahraini Dinar,48,Yes
19
+ Bangladesh,Bangladesh,BD,BGD,50,BGD,bg,BW,BD,880,BAN,BG,23,BAN,BDT,BANGLADESH,2,Taka,50,Yes
20
+ Barbados,Barbade,BB,BRB,52,BRB,bb,BR,BDS,1-246,BRB,BB,24,BAR,BBD,BARBADOS,2,Barbados Dollar,52,Yes
21
+ Belarus,Bélarus,BY,BLR,112,BLR,bw,BY,BY,375,BLR,BO,26,BLR,BYR,BELARUS,0,Belarussian Ruble,974,Yes
22
+ Belgium,Belgique,BE,BEL,56,BEL,be,BX,B,32,BEL,BE,27,BEL,EUR,BELGIUM,2,Euro,978,Yes
23
+ Belize,Belize,BZ,BLZ,84,BLZ,bh,BH,BZ,501,BLZ,BH,28,BIZ,BZD,BELIZE,2,Belize Dollar,84,Yes
24
+ Benin,Bénin,BJ,BEN,204,BEN,dm,BJ,DY,229,BEN,BN,29,BEN,XOF,BENIN,0,CFA Franc BCEAO,952,Yes
25
+ Bermuda,Bermudes,BM,BMU,60,BER,bm,BE, ,1-441,BER,BD,30,BER,BMD,BERMUDA,2,Bermudian Dollar,60,Territory of GB
26
+ Bhutan,Bhoutan,BT,BTN,64,BTN,bt, , ,975,BHU,BT,31,BHU,INR,BHUTAN,2,Indian Rupee,356,Yes
27
+ Bolivia,"Bolivie, l'État Plurinational de",BO,BOL,68,BOL,bo,BO,BOL,591,BOL,BL,33,BOL,BOB,"BOLIVIA, PLURINATIONAL STATE OF",2,Boliviano,68,Yes
28
+ "Bonaire, Sint Eustatius and Saba","Bonaire, Saint-Eustache et Saba",BQ,BES,535,ATN,ca,NU,NA,599,ANT,NL,176,AHO,USD,"BONAIRE, SINT EUSTATIUS AND SABA",2,US Dollar,840,Part of NL
29
+ Bosnia and Herzegovina,Bosnie-Herzégovine,BA,BIH,70,BIH,bn,BG,BIH,387,BIH,BK,34,BIH,BAM,BOSNIA AND HERZEGOVINA,2,Convertible Mark,977,Yes
30
+ Botswana,Botswana,BW,BWA,72,BOT,bs,BC,BW,267,BOT,BC,35,BOT,BWP,BOTSWANA,2,Pula,72,Yes
31
+ Bouvet Island,"Bouvet, Île",BV,BVT,74, ,bv,BV, ,47,,BV,36, ,NOK,BOUVET ISLAND,2,Norwegian Krone,578,Territory of NO
32
+ Brazil,Brésil,BR,BRA,76,B,bl,BZ,BR,55,BRA,BR,37,BRA,BRL,BRAZIL,2,Brazilian Real,986,Yes
33
+ British Indian Ocean Territory,"Océan Indien, Territoire Britannique de l'",IO,IOT,86,BIO,bi, , ,246,,IO,38, ,USD,BRITISH INDIAN OCEAN TERRITORY,2,US Dollar,840,Territory of GB
34
+ Brunei,Brunei Darussalam,BN,BRN,96,BRU,bx,BD,BRU,673,BRU,BX,40,BRU,BND,BRUNEI DARUSSALAM,2,Brunei Dollar,96,Yes
35
+ Bulgaria,Bulgarie,BG,BGR,100,BUL,bu,BU,BG,359,BUL,BU,41,BUL,BGN,BULGARIA,2,Bulgarian Lev,975,Yes
36
+ Burkina Faso,Burkina Faso,BF,BFA,854,BFA,uv,HV,BF,226,BFA,UV,42,BUR,XOF,BURKINA FASO,0,CFA Franc BCEAO,952,Yes
37
+ Burundi,Burundi,BI,BDI,108,BDI,bd,BI,RU,257,BDI,BY,43,BDI,BIF,BURUNDI,0,Burundi Franc,108,Yes
38
+ Cambodia,Cambodge,KH,KHM,116,CBG,cb,KP,K,855,CAM,CB,44,CAM,KHR,CAMBODIA,2,Riel,116,Yes
39
+ Cameroon,Cameroun,CM,CMR,120,CME,cm,CM,CAM,237,CMR,CM,45,CMR,XAF,CAMEROON,0,CFA Franc BEAC,950,Yes
40
+ Canada,Canada,CA,CAN,124,CAN,xxc,CN,CDN,1,CAN,CA,46,CAN,CAD,CANADA,2,Canadian Dollar,124,Yes
41
+ Cape Verde,Cap-Vert,CV,CPV,132,CPV,cv,CV, ,238,CPV,CV,47,CPV,CVE,CABO VERDE,2,Cabo Verde Escudo,132,Yes
42
+ Cayman Islands,"Caïmans, Îles",KY,CYM,136,CYM,cj,GC, ,1-345,CAY,CJ,48,CAY,KYD,CAYMAN ISLANDS,2,Cayman Islands Dollar,136,Territory of GB
43
+ Central African Republic,"Centrafricaine, République",CF,CAF,140,CAF,cx,CE,RCA,236,CTA,CT,49,CAF,XAF,CENTRAL AFRICAN REPUBLIC,0,CFA Franc BEAC,950,Yes
44
+ Chad,Tchad,TD,TCD,148,TCD,cd,CD,TCH,235,CHA,CD,50,CHA,XAF,CHAD,0,CFA Franc BEAC,950,Yes
45
+ Chile,Chili,CL,CHL,152,CHL,cl,CH,RCH,56,CHI,CI,51,CHI,CLP,CHILE,0,Chilean Peso,152,Yes
46
+ China,Chine,CN,CHN,156,CHN,cc,CI, ,86,CHN,CH,53,CHN,CNY,CHINA,2,Yuan Renminbi,156,Yes
47
+ Christmas Island,"Christmas, Île",CX,CXR,162,CHR,xa,KI,AUS,61,CXR,KT,54, ,AUD,CHRISTMAS ISLAND,2,Australian Dollar,36,Territory of AU
48
+ Cocos (Keeling) Islands,"Cocos (Keeling), Îles",CC,CCK,166,ICO,xb,KK,AUS,61,CCK,CK,56, ,AUD,COCOS (KEELING) ISLANDS,2,Australian Dollar,36,Territory of AU
49
+ Colombia,Colombie,CO,COL,170,CLM,ck,CO,CO,57,COL,CO,57,COL,COP,COLOMBIA,2,Colombian Peso,170,Yes
50
+ Comoros,Comores,KM,COM,174,COM,cq,IC, ,269,COM,CN,58,COM,KMF,COMOROS,0,Comoro Franc,174,Yes
51
+ Congo,Congo,CG,COG,178,COG,cf,CG,RCB,242,CGO,CF,59,CGO,XAF,CONGO,0,CFA Franc BEAC,950,Yes
52
+ "Congo, the Democratic Republic of the","Congo, la République Démocratique du",CD,COD,180,COD,cg,ZR,ZRE,243,COD,CG,68,COD,,,,,,Yes
53
+ Cook Islands,"Cook, Îles",CK,COK,184,CKH,cw,KU,NZ,682,COK,CW,60,COK,NZD,COOK ISLANDS,2,New Zealand Dollar,554,Associated with NZ
54
+ Costa Rica,Costa Rica,CR,CRI,188,CTR,cr,CS,CR,506,CRC,CS,61,CRC,CRC,COSTA RICA,2,Costa Rican Colon,188,Yes
55
+ Croatia,Croatie,HR,HRV,191,HRV,ci,RH,HR,385,CRO,HR,62,CRO,HRK,CROATIA,2,Croatian Kuna,191,Yes
56
+ Cuba,Cuba,CU,CUB,192,CUB,cu,CU,C,53,CUB,CU,63,CUB,CUP,CUBA,2,Cuban Peso,192,Yes
57
+ Curacao,Curaçao,CW,CUW,531,,co,,,599,,UC,,,ANG,CURAÇAO,2,Netherlands Antillean Guilder,532,Part of NL
58
+ Cyprus,Chypre,CY,CYP,196,CYP,cy,CY,CY,357,CYP,CY,64,CYP,EUR,CYPRUS,2,Euro,978,Yes
59
+ Czech Republic,"Tchèque, République",CZ,CZE,203,CZE,xr,CZ,CZ,420,CZE,EZ,65,CZE,CZK,CZECH REPUBLIC,2,Czech Koruna,203,Yes
60
+ Cote d'Ivoire,Cote d'Ivoire,CI,CIV,384,CTI,iv,IV,CI,225,CIV,IV,66,CIV,XOF,CÔTE D'IVOIRE,0,CFA Franc BCEAO,952,Yes
61
+ Denmark,Danemark,DK,DNK,208,DNK,dk,DN,DK,45,DEN,DA,69,DEN,DKK,DENMARK,2,Danish Krone,208,Yes
62
+ Djibouti,Djibouti,DJ,DJI,262,DJI,ft,DJ, ,253,DJI,DJ,70,DJI,DJF,DJIBOUTI,0,Djibouti Franc,262,Yes
63
+ Dominica,Dominique,DM,DMA,212,DMA,dq,DO,WD,1-767,DMA,DO,71,DMA,XCD,DOMINICA,2,East Caribbean Dollar,951,Yes
64
+ Dominican Republic,"Dominicaine, République",DO,DOM,214,DOM,dr,DR,DOM,"1-809,1-829,1-849",DOM,DR,72,DOM,DOP,DOMINICAN REPUBLIC,2,Dominican Peso,214,Yes
65
+ Ecuador,Équateur,EC,ECU,218,EQA,ec,EQ,EC,593,ECU,EC,73,ECU,USD,ECUADOR,2,US Dollar,840,Yes
66
+ Egypt,Égypte,EG,EGY,818,EGY,ua,EG,ET,20,EGY,EG,40765,EGY,EGP,EGYPT,2,Egyptian Pound,818,Yes
67
+ El Salvador,El Salvador,SV,SLV,222,SLV,es,ES,ES,503,SLV,ES,75,ESA,USD,EL SALVADOR,2,US Dollar,840,Yes
68
+ Equatorial Guinea,Guinée Équatoriale,GQ,GNQ,226,GNE,eg,GQ, ,240,EQG,EK,76,GEQ,XAF,EQUATORIAL GUINEA,0,CFA Franc BEAC,950,Yes
69
+ Eritrea,Érythrée,ER,ERI,232,ERI,ea, , ,291,ERI,ER,77,ERI,ERN,ERITREA,2,Nakfa,232,Yes
70
+ Estonia,Estonie,EE,EST,233,EST,er,EO,EST,372,EST,EN,78,EST,EUR,ESTONIA,2,Euro,978,Yes
71
+ Ethiopia,Éthiopie,ET,ETH,231,ETH,et,ET,ETH,251,ETH,ET,79,ETH,ETB,ETHIOPIA,2,Ethiopian Birr,230,Yes
72
+ Falkland Islands,"Falkland, Îles (Malvinas)",FK,FLK,238,FLK,fk,FK, ,500,FLK,FK,81,FLK,FKP,FALKLAND ISLANDS (MALVINAS),2,Falkland Islands Pound,238,Territory of GB
73
+ Faroe Islands,"Féroé, Îles",FO,FRO,234,FRO,fa,FA,FO,298,FRO,FO,82,FAR,DKK,FAROE ISLANDS,2,Danish Krone,208,Part of DK
74
+ Fiji,Fidji,FJ,FJI,242,FJI,fj,FJ,FJI,679,FIJ,FJ,83,FIJ,FJD,FIJI,2,Fiji Dollar,242,Yes
75
+ Finland,Finlande,FI,FIN,246,FIN,fi,FI,FIN,358,FIN,FI,84,FIN,EUR,FINLAND,2,Euro,978,Yes
76
+ France,France,FR,FRA,250,F,fr,FR,F,33,FRA,FR,85,FRA,EUR,FRANCE,2,Euro,978,Yes
77
+ French Guiana,Guyane Française,GF,GUF,254,GUF,fg,FG,F,594,GUF,FG,86,FGU,EUR,FRENCH GUIANA,2,Euro,978,Part of FR
78
+ French Polynesia,Polynésie Française,PF,PYF,258,OCE,fp,PF,F,689,TAH,FP,87,FPO,XPF,FRENCH POLYNESIA,0,CFP Franc,953,Territory of FR
79
+ French Southern Territories,Terres Australes Françaises,TF,ATF,260, ,fs, ,F,262,,FS,88, ,EUR,FRENCH SOUTHERN TERRITORIES,2,Euro,978,Territory of FR
80
+ Gabon,Gabon,GA,GAB,266,GAB,go,GO,G,241,GAB,GB,89,GAB,XAF,GABON,0,CFA Franc BEAC,950,Yes
81
+ Gambia,Gambie,GM,GMB,270,GMB,gm,GB,WAG,220,GAM,GA,90,GAM,GMD,GAMBIA,2,Dalasi,270,Yes
82
+ Georgia,Géorgie,GE,GEO,268,GEO,gs,GG,GE,995,GEO,GG,92,GEO,GEL,GEORGIA,2,Lari,981,Yes
83
+ Germany,Allemagne,DE,DEU,276,D,gw,DL,D,49,GER,GM,93,GER,EUR,GERMANY,2,Euro,978,Yes
84
+ Ghana,Ghana,GH,GHA,288,GHA,gh,GH,GH,233,GHA,GH,94,GHA,GHS,GHANA,2,Ghana Cedi,936,Yes
85
+ Gibraltar,Gibraltar,GI,GIB,292,GIB,gi,GI,GBZ,350,GBZ,GI,95,GIB,GIP,GIBRALTAR,2,Gibraltar Pound,292,Territory of GB
86
+ Greece,Grèce,GR,GRC,300,GRC,gr,GR,GR,30,GRE,GR,97,GRE,EUR,GREECE,2,Euro,978,Yes
87
+ Greenland,Groenland,GL,GRL,304,GRL,gl,GL,DK,299,GRL,GL,98,GRL,DKK,GREENLAND,2,Danish Krone,208,Part of DK
88
+ Grenada,Grenade,GD,GRD,308,GRD,gd,GD,WG,1-473,GRN,GJ,99,GRN,XCD,GRENADA,2,East Caribbean Dollar,951,Yes
89
+ Guadeloupe,Guadeloupe,GP,GLP,312,GDL,gp,MF,F,590,GLP,GP,100,GUD,EUR,GUADELOUPE,2,Euro,978,Part of FR
90
+ Guam,Guam,GU,GUM,316,GUM,gu,GM,USA,1-671,GUM,GQ,101,GUM,USD,GUAM,2,US Dollar,840,Territory of US
91
+ Guatemala,Guatemala,GT,GTM,320,GTM,gt,GU,GCA,502,GUA,GT,103,GUA,GTQ,GUATEMALA,2,Quetzal,320,Yes
92
+ Guernsey,Guernesey,GG,GGY,831, ,uik, ,GBG,44,GBG,GK,104, ,GBP,GUERNSEY,2,Pound Sterling,826,Crown dependency of GB
93
+ Guinea,Guinée,GN,GIN,324,GUI,gv,GN,RG,224,GUI,GV,106,GUI,GNF,GUINEA,0,Guinea Franc,324,Yes
94
+ Guinea-Bissau,Guinée-Bissau,GW,GNB,624,GNB,pg,GW, ,245,GNB,PU,105,GBS,XOF,GUINEA-BISSAU,0,CFA Franc BCEAO,952,Yes
95
+ Guyana,Guyana,GY,GUY,328,GUY,gy,GY,GUY,592,GUY,GY,107,GUY,GYD,GUYANA,2,Guyana Dollar,328,Yes
96
+ Haiti,Haïti,HT,HTI,332,HTI,ht,HA,RH,509,HAI,HA,108,HAI,USD,HAITI,2,US Dollar,840,Yes
97
+ Heard Island and McDonald Mcdonald Islands,"Heard-Et-Îles Macdonald, Île",HM,HMD,334, ,hm, ,AUS,672,,HM,109, ,AUD,HEARD ISLAND AND McDONALD ISLANDS,2,Australian Dollar,36,Territory of AU
98
+ Holy See (Vatican City State),Saint-Siège (État de la Cité du Vatican),VA,VAT,336,CVA,vc, ,V,39-06,VAT,VT,110, ,EUR,HOLY SEE (VATICAN CITY STATE),2,Euro,978,Yes
99
+ Honduras,Honduras,HN,HND,340,HND,ho,HO, ,504,HON,HO,111,HON,HNL,HONDURAS,2,Lempira,340,Yes
100
+ Hong Kong,Hong Kong,HK,HKG,344,HKG, ,HK,HK,852,HKG,HK,33364,HKG,HKD,HONG KONG,2,Hong Kong Dollar,344,Part of CN
101
+ Hungary,Hongrie,HU,HUN,348,HNG,hu,HU,H,36,HUN,HU,113,HUN,HUF,HUNGARY,2,Forint,348,Yes
102
+ Iceland,Islande,IS,ISL,352,ISL,ic,IL,IS,354,ISL,IC,114,ISL,ISK,ICELAND,0,Iceland Krona,352,Yes
103
+ India,Inde,IN,IND,356,IND,ii,IN,IND,91,IND,IN,115,IND,INR,INDIA,2,Indian Rupee,356,Yes
104
+ Indonesia,Indonésie,ID,IDN,360,INS,io,ID,RI,62,IDN,ID,116,INA,IDR,INDONESIA,2,Rupiah,360,Yes
105
+ Iran,"Iran, République Islamique d'",IR,IRN,364,IRN,ir,IR,IR,98,IRN,IR,117,IRI,IRR,"IRAN, ISLAMIC REPUBLIC OF",2,Iranian Rial,364,Yes
106
+ Iraq,Iraq,IQ,IRQ,368,IRQ,iq,IQ,IRQ,964,IRQ,IZ,118,IRQ,IQD,IRAQ,3,Iraqi Dinar,368,Yes
107
+ Ireland,Irlande,IE,IRL,372,IRL,ie,IE,IRL,353,IRL,EI,119,IRL,EUR,IRELAND,2,Euro,978,Yes
108
+ Isle of Man,Île de Man,IM,IMN,833, ,uik, ,GBM,44,GBM,IM,120, ,GBP,ISLE OF MAN,2,Pound Sterling,826,Crown dependency of GB
109
+ Israel,Israël,IL,ISR,376,ISR,is,IS,IL,972,ISR,IS,121,ISR,ILS,ISRAEL,2,New Israeli Sheqel,376,Yes
110
+ Italy,Italie,IT,ITA,380,I,it,IY,I,39,ITA,IT,122,ITA,EUR,ITALY,2,Euro,978,Yes
111
+ Jamaica,Jamaïque,JM,JAM,388,JMC,jm,JM,JA,1-876,JAM,JM,123,JAM,JMD,JAMAICA,2,Jamaican Dollar,388,Yes
112
+ Japan,Japon,JP,JPN,392,J,ja,JP,J,81,JPN,JA,126,JPN,JPY,JAPAN,0,Yen,392,Yes
113
+ Jersey,Jersey,JE,JEY,832, ,uik, ,GBJ,44,GBJ,JE,128, ,GBP,JERSEY,2,Pound Sterling,826,Crown dependency of GB
114
+ Jordan,Jordanie,JO,JOR,400,JOR,jo,JD,HKJ,962,JOR,JO,130,JOR,JOD,JORDAN,3,Jordanian Dinar,400,Yes
115
+ Kazakhstan,Kazakhstan,KZ,KAZ,398,KAZ,kz,KZ,KZ,7,KAZ,KZ,132,KAZ,KZT,KAZAKHSTAN,2,Tenge,398,Yes
116
+ Kenya,Kenya,KE,KEN,404,KEN,ke,KN,EAK,254,KEN,KE,133,KEN,KES,KENYA,2,Kenyan Shilling,404,Yes
117
+ Kiribati,Kiribati,KI,KIR,296,KIR,gb,KB, ,686,KIR,KR,135,KIR,AUD,KIRIBATI,2,Australian Dollar,36,Yes
118
+ North Korea,"Corée, République Populaire Démocratique de",KP,PRK,408,KRE,kn,KR, ,850,PRK,KN,67,PRK,KPW,"KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF",2,North Korean Won,408,Yes
119
+ South Korea,"Corée, République de",KR,KOR,410,KOR,ko,KO,ROK,82,KOR,KS,202,KOR,KRW,"KOREA, REPUBLIC OF",0,Won,410,Yes
120
+ Kuwait,Koweït,KW,KWT,414,KWT,ku,KW,KWT,965,KUW,KU,137,KUW,KWD,KUWAIT,3,Kuwaiti Dinar,414,Yes
121
+ Kyrgyzstan,Kirghizistan,KG,KGZ,417,KGZ,kg,KG,KS,996,KGZ,KG,138,KGZ,KGS,KYRGYZSTAN,2,Som,417,Yes
122
+ Laos,Laos,LA,LAO,418,LAO,ls,LA,LAO,856,LAO,LA,139,LAO,LAK,LAO PEOPLE’S DEMOCRATIC REPUBLIC,2,Kip,418,Yes
123
+ Latvia,Lettonie,LV,LVA,428,LVA,lv,LV,LV,371,LVA,LG,140,LAT,EUR,LATVIA,2,Euro,978,Yes
124
+ Lebanon,Liban,LB,LBN,422,LBN,le,LB,RL,961,LIB,LE,141,LIB,LBP,LEBANON,2,Lebanese Pound,422,Yes
125
+ Lesotho,Lesotho,LS,LSO,426,LSO,lo,LS,LS,266,LES,LT,142,LES,ZAR,LESOTHO,2,Rand,710,Yes
126
+ Liberia,Libéria,LR,LBR,430,LBR,lb,LI,LB,231,LBR,LI,144,LBR,LRD,LIBERIA,2,Liberian Dollar,430,Yes
127
+ Libya,Libye,LY,LBY,434,LBY,ly,LY,LAR,218,LBY,LY,145,LBA,LYD,LIBYA,3,Libyan Dinar,434,Yes
128
+ Liechtenstein,Liechtenstein,LI,LIE,438,LIE,lh, ,FL,423,LIE,LS,146,LIE,CHF,LIECHTENSTEIN,2,Swiss Franc,756,Yes
129
+ Lithuania,Lituanie,LT,LTU,440,LTU,li,LT,LT,370,LTU,LH,147,LTU,EUR,LITHUANIA,2,Euro,978,Yes
130
+ Luxembourg,Luxembourg,LU,LUX,442,LUX,lu,BX,L,352,LUX,LU,148,LUX,EUR,LUXEMBOURG,2,Euro,978,Yes
131
+ Macau,Macau,MO,MAC,446,MAC, ,MU, ,853,MAC,MC,149,MAC,MOP,MACAO,2,Pataca,446,Part of CN
132
+ Macedonia,"Macédoine, l'Ex-république Yougoslave de",MK,MKD,807,MKD,xn,MJ,MK,389,MKD,MK,241,MKD,MKD,"MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF",2,Denar,807,Yes
133
+ Madagascar,Madagascar,MG,MDG,450,MDG,mg,MG,RM,261,MAD,MA,150,MAD,MGA,MADAGASCAR,2,Malagasy Ariary,969,Yes
134
+ Malawi,Malawi,MW,MWI,454,MWI,mw,MW,MW,265,MWI,MI,152,MAW,MWK,MALAWI,2,Kwacha,454,Yes
135
+ Malaysia,Malaisie,MY,MYS,458,MLA,my,MS,MAL,60,MAS,MY,153,MAS,MYR,MALAYSIA,2,Malaysian Ringgit,458,Yes
136
+ Maldives,Maldives,MV,MDV,462,MLD,xc,MV, ,960,MDV,MV,154,MDV,MVR,MALDIVES,2,Rufiyaa,462,Yes
137
+ Mali,Mali,ML,MLI,466,MLI,ml,MI,RMM,223,MLI,ML,155,MLI,XOF,MALI,0,CFA Franc BCEAO,952,Yes
138
+ Malta,Malte,MT,MLT,470,MLT,mm,ML,M,356,MLT,MT,156,MLT,EUR,MALTA,2,Euro,978,Yes
139
+ Marshall Islands,"Marshall, Îles",MH,MHL,584,MHL,xe,MH, ,692,MHL,RM,157,MSH,USD,MARSHALL ISLANDS,2,US Dollar,840,Yes
140
+ Martinique,Martinique,MQ,MTQ,474,MRT,mq,MR,F,596,MTQ,MB,158,MRT,EUR,MARTINIQUE,2,Euro,978,Part of FR
141
+ Mauritania,Mauritanie,MR,MRT,478,MTN,mu,MT,RIM,222,MTN,MR,159,MTN,MRO,MAURITANIA,2,Ouguiya,478,Yes
142
+ Mauritius,Maurice,MU,MUS,480,MAU,mf,MA,MS,230,MRI,MP,160,MRI,MUR,MAURITIUS,2,Mauritius Rupee,480,Yes
143
+ Mayotte,Mayotte,YT,MYT,175,MYT,ot, , ,262,MYT,MF,161,MAY,EUR,MAYOTTE,2,Euro,978,Part of FR
144
+ Mexico,Mexique,MX,MEX,484,MEX,mx,MX,MEX,52,MEX,MX,162,MEX,MXN,MEXICO,2,Mexican Peso,484,Yes
145
+ Micronesia,"Micronésie, États Fédérés de",FM,FSM,583,FSM,fm, , ,691,FSM,FM,163,FSM,USD,"MICRONESIA, FEDERATED STATES OF",2,US Dollar,840,Yes
146
+ Moldova,"Moldova, République de",MD,MDA,498,MDA,mv,RM,MD,373,MDA,MD,165,MDA,MDL,"MOLDOVA, REPUBLIC OF",2,Moldovan Leu,498,Yes
147
+ Monaco,Monaco,MC,MCO,492,MCO,mc, ,MC,377,MON,MN,166,MON,EUR,MONACO,2,Euro,978,Yes
148
+ Mongolia,Mongolie,MN,MNG,496,MNG,mp,MO,MGL,976,MNG,MG,167,MGL,MNT,MONGOLIA,2,Tugrik,496,Yes
149
+ Montenegro,Monténégro,ME,MNE,499,MNE,mo, ,MNE,382,MNE,MJ,2647,MGO,EUR,MONTENEGRO,2,Euro,978,Yes
150
+ Montserrat,Montserrat,MS,MSR,500,MSR,mj, , ,1-664,MSR,MH,168,MNT,XCD,MONTSERRAT,2,East Caribbean Dollar,951,Territory of GB
151
+ Morocco,Maroc,MA,MAR,504,MRC,mr,MC,MA,212,MAR,MO,169,MAR,MAD,MOROCCO,2,Moroccan Dirham,504,Yes
152
+ Mozambique,Mozambique,MZ,MOZ,508,MOZ,mz,MZ,MOC,258,MOZ,MZ,170,MOZ,MZN,MOZAMBIQUE,2,Mozambique Metical,943,Yes
153
+ Myanmar,Myanmar,MM,MMR,104,MYA,br,BM,BUR,95,MYA,BM,171,MYA,MMK,MYANMAR,2,Kyat,104,Yes
154
+ Namibia,Namibie,NA,NAM,516,NMB,sx,NM,NAM,264,NAM,WA,172,NAM,ZAR,NAMIBIA,2,Rand,710,Yes
155
+ Nauru,Nauru,NR,NRU,520,NRU,nu,NW,NAU,674,NRU,NR,173,NRU,AUD,NAURU,2,Australian Dollar,36,Yes
156
+ Nepal,Népal,NP,NPL,524,NPL,np,NP,NEP,977,NEP,NP,175,NEP,NPR,NEPAL,2,Nepalese Rupee,524,Yes
157
+ Netherlands,Pays-Bas,NL,NLD,528,HOL,ne,NL,NL,31,NED,NL,177,NED,EUR,NETHERLANDS,2,Euro,978,Yes
158
+ New Caledonia,Nouvelle-Calédonie,NC,NCL,540,NCL,nl,NC,F,687,NCL,NC,178,NCD,XPF,NEW CALEDONIA,0,CFP Franc,953,Territory of FR
159
+ New Zealand,Nouvelle-Zélande,NZ,NZL,554,NZL,nz,NZ,NZ,64,NZL,NZ,179,NZL,NZD,NEW ZEALAND,2,New Zealand Dollar,554,Yes
160
+ Nicaragua,Nicaragua,NI,NIC,558,NCG,nq,NK,NIC,505,NCA,NU,180,NCA,NIO,NICARAGUA,2,Cordoba Oro,558,Yes
161
+ Niger,Niger,NE,NER,562,NGR,ng,NR,RN,227,NIG,NG,181,NIG,XOF,NIGER,0,CFA Franc BCEAO,952,Yes
162
+ Nigeria,Nigéria,NG,NGA,566,NIG,nr,NI,NGR,234,NGA,NI,182,NGR,NGN,NIGERIA,2,Naira,566,Yes
163
+ Niue,Niué,NU,NIU,570,NIU,xh, ,NZ,683,NIU,NE,183,NIU,NZD,NIUE,2,New Zealand Dollar,554,Associated with NZ
164
+ Norfolk Island,"Norfolk, Île",NF,NFK,574,NFK,nx,NF,AUS,672,NFK,NF,184,NFI,AUD,NORFOLK ISLAND,2,Australian Dollar,36,Territory of AU
165
+ Northern Mariana Islands,"Mariannes du Nord, Îles",MP,MNP,580,MRA,nw,MY,USA,1-670,NMI,CQ,185,NMA,USD,NORTHERN MARIANA ISLANDS,2,US Dollar,840,Commonwealth of US
166
+ Norway,Norvège,NO,NOR,578,NOR,no,NO,N,47,NOR,NO,186,NOR,NOK,NORWAY,2,Norwegian Krone,578,Yes
167
+ Oman,Oman,OM,OMN,512,OMA,mk,OM, ,968,OMA,MU,187,OMA,OMR,OMAN,3,Rial Omani,512,Yes
168
+ Pakistan,Pakistan,PK,PAK,586,PAK,pk,PK,PK,92,PAK,PK,188,PAK,PKR,PAKISTAN,2,Pakistan Rupee,586,Yes
169
+ Palau,Palaos,PW,PLW,585,PLW,pw, , ,680,PLW,PS,189,PLW,USD,PALAU,2,US Dollar,840,Yes
170
+ Palestine,"Palestine, État de",PS,PSE,275, ,"gz,wj", , ,970,PLE,"GZ,WE","91,267",PLE,ILS,"PALESTINE, STATE OF",,No universal currency,,In contention
171
+ Panama,Panama,PA,PAN,591,PNR,pn,PM,PA,507,PAN,PM,191,PAN,USD,PANAMA,2,US Dollar,840,Yes
172
+ Papua New Guinea,Papouasie-Nouvelle-Guinée,PG,PNG,598,PNG,pp,NG,PNG,675,PNG,PP,192,PNG,PGK,PAPUA NEW GUINEA,2,Kina,598,Yes
173
+ Paraguay,Paraguay,PY,PRY,600,PRG,py,PY,PY,595,PAR,PA,194,PAR,PYG,PARAGUAY,0,Guarani,600,Yes
174
+ Peru,Pérou,PE,PER,604,PRU,pe,PR,PE,51,PER,PE,195,PER,PEN,PERU,2,Nuevo Sol,604,Yes
175
+ Philippines,Philippines,PH,PHL,608,PHL,ph,PH,RP,63,PHI,RP,196,PHI,PHP,PHILIPPINES,2,Philippine Peso,608,Yes
176
+ Pitcairn,Pitcairn,PN,PCN,612,PTC,pc,PT, ,870,PCN,PC,197, ,NZD,PITCAIRN,2,New Zealand Dollar,554,Territory of GB
177
+ Poland,Pologne,PL,POL,616,POL,pl,PL,PL,48,POL,PL,198,POL,PLN,POLAND,2,Zloty,985,Yes
178
+ Portugal,Portugal,PT,PRT,620,POR,po,PO,P,351,POR,PO,199,POR,EUR,PORTUGAL,2,Euro,978,Yes
179
+ Puerto Rico,Porto Rico,PR,PRI,630,PTR,pr,PU,USA,1,PUR,RQ,200,PUR,USD,PUERTO RICO,2,US Dollar,840,Commonwealth of US
180
+ Qatar,Qatar,QA,QAT,634,QAT,qa,QT,Q,974,QAT,QA,201,QAT,QAR,QATAR,2,Qatari Rial,634,Yes
181
+ Romania,Roumanie,RO,ROU,642,ROU,rm,RO,RO,40,ROU,RO,203,ROU,RON,ROMANIA,2,New Romanian Leu,946,Yes
182
+ Russia,"Russie, Fédération de",RU,RUS,643,RUS,ru,RS,RUS,7,RUS,RS,204,RUS,RUB,RUSSIAN FEDERATION,2,Russian Ruble,643,Yes
183
+ Rwanda,Rwanda,RW,RWA,646,RRW,rw,RW,RWA,250,RWA,RW,205,RWA,RWF,RWANDA,0,Rwanda Franc,646,Yes
184
+ Reunion,Reunion,RE,REU,638,REU,re,RE,F,262,REU,RE,206,REU,EUR,RÉUNION,2,Euro,978,Part of FR
185
+ Saint Barthélemy,Saint-Barthélemy,BL,BLM,652, ,sc, , ,590, ,TB,, ,EUR,SAINT BARTHÉLEMY,2,Euro,978,Part of FR
186
+ "Saint Helena, Ascension and Tristan da Cunha","Sainte-Hélène, Ascension et Tristan da Cunha",SH,SHN,654,SHN,xj,HE, ,290 n,SHN,SH,207,HEL,SHP,"SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA",2,Saint Helena Pound,654,Territory of GB
187
+ Saint Kitts and Nevis,Saint-Kitts-Et-Nevis,KN,KNA,659,KNA,xd,AT, ,1-869,SKN,SC,208,SKN,XCD,SAINT KITTS AND NEVIS,2,East Caribbean Dollar,951,Yes
188
+ Saint Lucia,Sainte-Lucie,LC,LCA,662,LCA,xk,LC,WL,1-758,LCA,ST,209,LCA,XCD,SAINT LUCIA,2,East Caribbean Dollar,951,Yes
189
+ Saint Martin (French part),Saint-Martin(partie Française),MF,MAF,663, ,st, , ,590, ,RN,, ,EUR,SAINT MARTIN (FRENCH PART),2,Euro,978,Part of FR
190
+ Saint Pierre and Miquelon,Saint-Pierre-Et-Miquelon,PM,SPM,666,SPM,xl,FP,F,508,SPM,SB,210,SPM,EUR,SAINT PIERRE AND MIQUELON,2,Euro,978,Part of FR
191
+ Saint Vincent and the Grenadines,Saint-Vincent-Et-Les Grenadines,VC,VCT,670,VCT,xm,VG,WV,1-784,VIN,VC,211,VIN,XCD,SAINT VINCENT AND THE GRENADINES,2,East Caribbean Dollar,951,Yes
192
+ Samoa,Samoa,WS,WSM,882,SMO,ws,ZM,WS,685,SAM,WS,212,SAM,WST,SAMOA,2,Tala,882,Yes
193
+ San Marino,Saint-Marin,SM,SMR,674,SMR,sm, ,RSM,378,SMR,SM,213,SMR,EUR,SAN MARINO,2,Euro,978,Yes
194
+ Sao Tome and Principe,Sao Tomé-Et-Principe,ST,STP,678,STP,sf,TP, ,239,STP,TP,214,STP,STD,SAO TOME AND PRINCIPE,2,Dobra,678,Yes
195
+ Saudi Arabia,Arabie Saoudite,SA,SAU,682,ARS,su,SD,SA,966,KSA,SA,215,KSA,SAR,SAUDI ARABIA,2,Saudi Riyal,682,Yes
196
+ Senegal,Sénégal,SN,SEN,686,SEN,sg,SG,SN,221,SEN,SG,217,SEN,XOF,SENEGAL,0,CFA Franc BCEAO,952,Yes
197
+ Serbia,Serbie,RS,SRB,688,SRB,rb,YG,SRB,381 p,SRB,"RI,KV",2648,SRB,RSD,SERBIA,2,Serbian Dinar,941,Yes
198
+ Seychelles,Seychelles,SC,SYC,690,SEY,se,SC,SY,248,SEY,SE,220,SEY,SCR,SEYCHELLES,2,Seychelles Rupee,690,Yes
199
+ Sierra Leone,Sierra Leone,SL,SLE,694,SRL,sl,SL,WAL,232,SLE,SL,221,SLE,SLL,SIERRA LEONE,2,Leone,694,Yes
200
+ Singapore,Singapour,SG,SGP,702,SNG,si,SR,SGP,65,SIN,SN,222,SIN,SGD,SINGAPORE,2,Singapore Dollar,702,Yes
201
+ Sint Maarten,Saint-Martin (Partie Néerlandaise),SX,SXM,534,,sn,,,1-721,,NN,,,ANG,SINT MAARTEN (DUTCH PART),2,Netherlands Antillean Guilder,532,Part of NL
202
+ Slovakia,Slovaquie,SK,SVK,703,SVK,xo,SQ,SK,421,SVK,LO,223,SVK,EUR,SLOVAKIA,2,Euro,978,Yes
203
+ Slovenia,Slovénie,SI,SVN,705,SVN,xv,LJ,SLO,386,SVN,SI,224,SLO,EUR,SLOVENIA,2,Euro,978,Yes
204
+ Solomon Islands,"Salomon, Îles",SB,SLB,90,SLM,bp,SO, ,677,SOL,BP,225,SOL,SBD,SOLOMON ISLANDS,2,Solomon Islands Dollar,90,Yes
205
+ Somalia,Somalie,SO,SOM,706,SOM,so,SI,SO,252,SOM,SO,226,SOM,SOS,SOMALIA,2,Somali Shilling,706,Yes
206
+ South Africa,Afrique du Sud,ZA,ZAF,710,AFS,sa,ZA,ZA,27,RSA,SF,227,RSA,ZAR,SOUTH AFRICA,2,Rand,710,Yes
207
+ South Georgia and the South Sandwich Islands,Géorgie du Sud-Et-Les Îles Sandwich du Sud,GS,SGS,239, ,xs, , ,500,,SX,228, ,,SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS,,No universal currency,,Territory of GB
208
+ South Sudan,Soudan du Sud,SS,SSD,728,SSD,sd,,,211,,OD,,,SSP,SOUTH SUDAN,2,South Sudanese Pound,728,Yes
209
+ Spain,Espagne,ES,ESP,724,E,sp,SP,E,34,ESP,SP,229,ESP,EUR,SPAIN,2,Euro,978,Yes
210
+ Sri Lanka,Sri Lanka,LK,LKA,144,CLN,ce,SB,CL,94,SRI,CE,231,SRI,LKR,SRI LANKA,2,Sri Lanka Rupee,144,Yes
211
+ Sudan,Soudan,SD,SDN,729,SDN,sj,SU,SUD,249,SUD,SU,40764,SUD,SDG,SUDAN,2,Sudanese Pound,938,Yes
212
+ Suriname,Suriname,SR,SUR,740,SUR,sr,SM,SME,597,SUR,NS,233,SUR,SRD,SURINAME,2,Surinam Dollar,968,Yes
213
+ Svalbard and Jan Mayen,Svalbard et Île Jan Mayen,SJ,SJM,744,NOR, ,SZ, ,47,,"SV,JN",234, ,NOK,SVALBARD AND JAN MAYEN,2,Norwegian Krone,578,Territory of NO
214
+ Swaziland,Swaziland,SZ,SWZ,748,SWZ,sq,SV,SD,268,SWZ,WZ,235,SWZ,SZL,SWAZILAND,2,Lilangeni,748,Yes
215
+ Sweden,Suède,SE,SWE,752,S,sw,SN,S,46,SWE,SW,236,SWE,SEK,SWEDEN,2,Swedish Krona,752,Yes
216
+ Switzerland,Suisse,CH,CHE,756,SUI,sz,SW,CH,41,SUI,SZ,237,SUI,CHF,SWITZERLAND,2,Swiss Franc,756,Yes
217
+ Syria,"Syrienne, République Arabe",SY,SYR,760,SYR,sy,SY,SYR,963,SYR,SY,238,SYR,SYP,SYRIAN ARAB REPUBLIC,2,Syrian Pound,760,Yes
218
+ Taiwan,"Taïwan, Province de Chine",TW,TWN,158, ,ch, ,RC,886,TPE,TW,925,TPE,TWD,"TAIWAN, PROVINCE OF CHINA",2,New Taiwan Dollar,901,Yes
219
+ Tajikistan,Tadjikistan,TJ,TJK,762,TJK,ta,TA,TJ,992,TJK,TI,239,TJK,TJS,TAJIKISTAN,2,Somoni,972,Yes
220
+ Tanzania,"Tanzanie, République-Unie de",TZ,TZA,834,TZA,tz,TN,EAT,255,TAN,TZ,257,TAN,TZS,"TANZANIA, UNITED REPUBLIC OF",2,Tanzanian Shilling,834,Yes
221
+ Thailand,Thaïlande,TH,THA,764,THA,th,TH,T,66,THA,TH,240,THA,THB,THAILAND,2,Baht,764,Yes
222
+ Timor-Leste,Timor-Leste,TL,TLS,626,TLS,em,TM, ,670,TLS,TT,242,TLS,USD,TIMOR-LESTE,2,US Dollar,840,Yes
223
+ Togo,Togo,TG,TGO,768,TGO,tg,TG,TG,228,TOG,TO,243,TOG,XOF,TOGO,0,CFA Franc BCEAO,952,Yes
224
+ Tokelau,Tokelau,TK,TKL,772,TKL,tl,TK,NZ,690,TKL,TL,244, ,NZD,TOKELAU,2,New Zealand Dollar,554,Territory of NZ
225
+ Tonga,Tonga,TO,TON,776,TON,to,TO, ,676,TGA,TN,245,TGA,TOP,TONGA,2,Pa’anga,776,Yes
226
+ Trinidad and Tobago,Trinité-Et-Tobago,TT,TTO,780,TRD,tr,TD,TT,1-868,TRI,TD,246,TTO,TTD,TRINIDAD AND TOBAGO,2,Trinidad and Tobago Dollar,780,Yes
227
+ Tunisia,Tunisie,TN,TUN,788,TUN,ti,TS,TN,216,TUN,TS,248,TUN,TND,TUNISIA,3,Tunisian Dinar,788,Yes
228
+ Turkey,Turquie,TR,TUR,792,TUR,tu,TU,TR,90,TUR,TU,249,TUR,TRY,TURKEY,2,Turkish Lira,949,Yes
229
+ Turkmenistan,Turkménistan,TM,TKM,795,TKM,tk,TR,TM,993,TKM,TX,250,TKM,TMT,TURKMENISTAN,2,Turkmenistan New Manat,934,Yes
230
+ Turks and Caicos Islands,"Turks-Et-Caïcos, Îles",TC,TCA,796,TCA,tc,TI, ,1-649,TCA,TK,251,TKS,USD,TURKS AND CAICOS ISLANDS,2,US Dollar,840,Territory of GB
231
+ Tuvalu,Tuvalu,TV,TUV,798,TUV,tv,TV, ,688,TUV,TV,252,TUV,AUD,TUVALU,2,Australian Dollar,36,Yes
232
+ Uganda,Ouganda,UG,UGA,800,UGA,ug,UG,EAU,256,UGA,UG,253,UGA,UGX,UGANDA,0,Uganda Shilling,800,Yes
233
+ Ukraine,Ukraine,UA,UKR,804,UKR,un,UR,UA,380,UKR,UP,254,UKR,UAH,UKRAINE,2,Hryvnia,980,Yes
234
+ United Arab Emirates,Émirats Arabes Unis,AE,ARE,784,UAE,ts,ER, ,971,UAE,AE,255,UAE,AED,UNITED ARAB EMIRATES,2,UAE Dirham,784,Yes
235
+ United Kingdom,Royaume-Uni,GB,GBR,826,G,xxk,UK,GB,44,"ENG,NIR,SCO,WAL",UK,256,GBR,GBP,UNITED KINGDOM,2,Pound Sterling,826,Yes
236
+ United States,États-Unis,US,USA,840,USA,xxu,US,USA,1,USA,US,259,USA,USD,UNITED STATES,2,US Dollar,840,Yes
237
+ United States Minor Outlying Islands,Îles Mineures Éloignées des États-Unis,UM,UMI,581, ,"ji,xf,wk,uc,up", ,USA, ,,"FQ,HQ,DQ,JQ,KQ,MQ,BQ,LQ,WQ",, ,USD,UNITED STATES MINOR OUTLYING ISLANDS,2,US Dollar,840,Territories of US
238
+ Uruguay,Uruguay,UY,URY,858,URG,uy,UY,ROU,598,URU,UY,260,URU,UYU,URUGUAY,2,Peso Uruguayo,858,Yes
239
+ Uzbekistan,Ouzbékistan,UZ,UZB,860,UZB,uz,UZ,UZ,998,UZB,UZ,261,UZB,UZS,UZBEKISTAN,2,Uzbekistan Sum,860,Yes
240
+ Vanuatu,Vanuatu,VU,VUT,548,VUT,nn,NV, ,678,VAN,NH,262,VAN,VUV,VANUATU,0,Vatu,548,Yes
241
+ Venezuela,"Venezuela, République Bolivarienne du",VE,VEN,862,VEN,ve,VN,YV,58,VEN,VE,263,VEN,VEF,"VENEZUELA, BOLIVARIAN REPUBLIC OF",2,Bolivar,937,Yes
242
+ Vietnam,Viet Nam,VN,VNM,704,VTN,vm,VS,VN,84,VIE,VM,264,VIE,VND,VIET NAM,0,Dong,704,Yes
243
+ "Virgin Islands, British",Îles Vierges Britanniques,VG,VGB,92,VRG,vb,VI,BVI,1-284,VGB,VI,39,IVB,USD,VIRGIN ISLANDS (BRITISH),2,US Dollar,840,Territory of GB
244
+ "Virgin Islands, U.S.",Îles Vierges des États-Unis,VI,VIR,850,VIR,vi,VI,USA,1-340,VIR,VQ,258,ISV,USD,VIRGIN ISLANDS (U.S.),2,US Dollar,840,Territory of US
245
+ Wallis and Futuna,Wallis et Futuna,WF,WLF,876,WAL,wf,FW,F,681,WLF,WF,266,WAF,XPF,WALLIS AND FUTUNA,0,CFP Franc,953,Territory of FR
246
+ Western Sahara,Sahara Occidental,EH,ESH,732,AOE,ss, , ,212,SAH,WI,268, ,MAD,WESTERN SAHARA,2,Moroccan Dirham,504,In contention
247
+ Yemen,Yémen,YE,YEM,887,YEM,ye,YE,YAR,967,YEM,YM,269,YEM,YER,YEMEN,2,Yemeni Rial,886,Yes
248
+ Zambia,Zambie,ZM,ZMB,894,ZMB,za,ZB,Z,260,ZAM,ZA,270,ZAM,ZMW,ZAMBIA,2,Zambian Kwacha,967,Yes
249
+ Zimbabwe,Zimbabwe,ZW,ZWE,716,ZWE,rh,ZW,ZW,263,ZIM,ZI,271,ZIM,ZWD,ZIMBABWE,2,Zimbabwe Dollar,932,Yes
250
+ Åland Islands,"Åland, Îles",AX,ALA,248, , , ,FIN,358,ALD, ,1242, ,EUR,ÅLAND ISLANDS,2,Euro,978,Part of FI
currency.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+
3
+ # Load the CSV files
4
+ csv1_file = 'currencyrates.csv' # Replace with the path to your CSV1 file
5
+ csv2_file = 'countrycurrency.csv' # Replace with the path to your CSV2 file
6
+
7
+ # Read the CSVs into DataFrames
8
+ df1 = pd.read_csv(csv1_file) # This CSV contains just currency codes
9
+ df2 = pd.read_csv(csv2_file) # This CSV contains currency codes and country names
10
+
11
+ # Merge df1 with df2 on the currency code
12
+ # Assuming the column name for currency codes in both CSVs is 'CurrencyCode'
13
+ # If the column names are different, replace 'CurrencyCode' with the correct column names
14
+ df_merged = pd.merge(df1, df2[['Currency_code', 'currency_country_name']], on='Currency_code', how='left')
15
+
16
+ # Save the updated DataFrame back to csv1
17
+ df_merged.to_csv(csv1_file, index=False)
18
+
19
+ print("Country names have been successfully added to csv1.")
currencyrates.csv ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Currency_name,Currency_code,CUR_USD,USD_CUR,currency_country_name
2
+ Afghanistan Afghani,AFN,0.01644,61.0517,AFGHANISTAN
3
+ Albanian Lek,ALL,0.007237,143.208,ALBANIA
4
+ Algerian Dinar,DZD,0.009789,103.169,ALGERIA
5
+ Angolan Kwanza,AOA,0.008944,112.947,ANGOLA
6
+ Argentine Peso,ARS,0.1081,9.2657,ARGENTINA
7
+ Armenian Dram,AMD,0.001981,505.005,ARMENIA
8
+ Aruban Florin,AWG,0.5331,1.8973,ARUBA
9
+ Australian Dollar,AUD,0.7253,1.3791,AUSTRALIA
10
+ Australian Dollar,AUD,0.7253,1.3791,CHRISTMAS ISLAND
11
+ Australian Dollar,AUD,0.7253,1.3791,COCOS (KEELING) ISLANDS
12
+ Australian Dollar,AUD,0.7253,1.3791,HEARD ISLAND AND McDONALD ISLANDS
13
+ Australian Dollar,AUD,0.7253,1.3791,KIRIBATI
14
+ Australian Dollar,AUD,0.7253,1.3791,NAURU
15
+ Australian Dollar,AUD,0.7253,1.3791,NORFOLK ISLAND
16
+ Australian Dollar,AUD,0.7253,1.3791,TUVALU
17
+ Azerbaijan New Manat,AZN,0.905,1.1062,AZERBAIJAN
18
+ Bahamian Dollar,BSD,0.958,1.058,BAHAMAS
19
+ Bahraini Dinar,BHD,2.5409,0.4011,BAHRAIN
20
+ Bangladeshi Taka,BDT,0.01241,84.1862,BANGLADESH
21
+ Barbados Dollar,BBD,0.474424,2.10814,BARBADOS
22
+ Belarusian Ruble,BYR,6.29E-05,16013.2,BELARUS
23
+ Belize Dollar,BZD,0.4858,2.1592,BELIZE
24
+ Bermudian Dollar,BMD,0.9488,1.0541,BERMUDA
25
+ Bolivian Boliviano,BOB,0.1408,7.5058,"BOLIVIA, PLURINATIONAL STATE OF"
26
+ Bosnian Mark,BAM,0.5114,1.9562,BOSNIA AND HERZEGOVINA
27
+ Botswana Pula,BWP,0.09489,10.8603,BOTSWANA
28
+ Brazilian Real,BRL,0.2932,3.4191,BRAZIL
29
+ British Pound,GBP,1.4029,0.713,GUERNSEY
30
+ British Pound,GBP,1.4029,0.713,ISLE OF MAN
31
+ British Pound,GBP,1.4029,0.713,JERSEY
32
+ British Pound,GBP,1.4029,0.713,UNITED KINGDOM
33
+ Brunei Dollar,BND,0.6924,1.4946,BRUNEI DARUSSALAM
34
+ Bulgarian Lev,BGN,0.5117,1.9551,BULGARIA
35
+ Burundi Franc,BIF,0.0006146,1684.06,BURUNDI
36
+ Cambodian Riel,KHR,0.0002388,4343.82,CAMBODIA
37
+ Canadian Dollar,CAD,0.7423,1.3477,CANADA
38
+ Cape Verde Escudo,CVE,0.009069,110.265,CABO VERDE
39
+ Cayman Islands Dollar,KYD,1.1553,0.9058,CAYMAN ISLANDS
40
+ CFA Franc BCEAO,XOF,0.001524,655.957,BENIN
41
+ CFA Franc BCEAO,XOF,0.001524,655.957,BURKINA FASO
42
+ CFA Franc BCEAO,XOF,0.001524,655.957,CÔTE D'IVOIRE
43
+ CFA Franc BCEAO,XOF,0.001524,655.957,GUINEA-BISSAU
44
+ CFA Franc BCEAO,XOF,0.001524,655.957,MALI
45
+ CFA Franc BCEAO,XOF,0.001524,655.957,NIGER
46
+ CFA Franc BCEAO,XOF,0.001524,655.957,SENEGAL
47
+ CFA Franc BCEAO,XOF,0.001524,655.957,TOGO
48
+ CFA Franc BEAC,XAF,0.001524,655.957,CAMEROON
49
+ CFA Franc BEAC,XAF,0.001524,655.957,CENTRAL AFRICAN REPUBLIC
50
+ CFA Franc BEAC,XAF,0.001524,655.957,CHAD
51
+ CFA Franc BEAC,XAF,0.001524,655.957,CONGO
52
+ CFA Franc BEAC,XAF,0.001524,655.957,EQUATORIAL GUINEA
53
+ CFA Franc BEAC,XAF,0.001524,655.957,GABON
54
+ CFP Franc,XPF,0.00838,119.332,FRENCH POLYNESIA
55
+ CFP Franc,XPF,0.00838,119.332,NEW CALEDONIA
56
+ CFP Franc,XPF,0.00838,119.332,WALLIS AND FUTUNA
57
+ Chilean Peso,CLP,0.001484,674.679,CHILE
58
+ Chinese Yuan Renminbi,CNY,0.1545,6.4987,CHINA
59
+ Colombian Peso,COP,0.0003621,2839.72,COLOMBIA
60
+ Comoros Franc,KMF,0.002033,491.968,COMOROS
61
+ Costa Rican Colon,CRC,0.001799,583.9,COSTA RICA
62
+ Croatian Kuna,HRK,0.131,7.6413,CROATIA
63
+ Cuban Peso,CUP,0.0427,24.3997,CUBA
64
+ Czech Koruna,CZK,0.03667,27.311,CZECH REPUBLIC
65
+ Danish Krone,DKK,0.134,7.4614,DENMARK
66
+ Danish Krone,DKK,0.134,7.4614,FAROE ISLANDS
67
+ Danish Krone,DKK,0.134,7.4614,GREENLAND
68
+ Djibouti Franc,DJF,0.005339,187.329,DJIBOUTI
69
+ Dominican R. Peso,DOP,0.02141,47.8846,DOMINICAN REPUBLIC
70
+ East Caribbean Dollar,XCD,0.353,2.8638,ANGUILLA
71
+ East Caribbean Dollar,XCD,0.353,2.8638,ANTIGUA AND BARBUDA
72
+ East Caribbean Dollar,XCD,0.353,2.8638,DOMINICA
73
+ East Caribbean Dollar,XCD,0.353,2.8638,GRENADA
74
+ East Caribbean Dollar,XCD,0.353,2.8638,MONTSERRAT
75
+ East Caribbean Dollar,XCD,0.353,2.8638,SAINT KITTS AND NEVIS
76
+ East Caribbean Dollar,XCD,0.353,2.8638,SAINT LUCIA
77
+ East Caribbean Dollar,XCD,0.353,2.8638,SAINT VINCENT AND THE GRENADINES
78
+ Egyptian Pound,EGP,0.1249,8.0604,EGYPT
79
+ Ethiopian Birr,ETB,0.04695,21.8025,ETHIOPIA
80
+ Euro,EUR,1,1,ÅLAND ISLANDS
81
+ Euro,EUR,1,1,ANDORRA
82
+ Euro,EUR,1,1,AUSTRIA
83
+ Euro,EUR,1,1,BELGIUM
84
+ Euro,EUR,1,1,CYPRUS
85
+ Euro,EUR,1,1,ESTONIA
86
+ Euro,EUR,1,1,FINLAND
87
+ Euro,EUR,1,1,FRANCE
88
+ Euro,EUR,1,1,FRENCH GUIANA
89
+ Euro,EUR,1,1,FRENCH SOUTHERN TERRITORIES
90
+ Euro,EUR,1,1,GERMANY
91
+ Euro,EUR,1,1,GREECE
92
+ Euro,EUR,1,1,GUADELOUPE
93
+ Euro,EUR,1,1,HOLY SEE (VATICAN CITY STATE)
94
+ Euro,EUR,1,1,IRELAND
95
+ Euro,EUR,1,1,ITALY
96
+ Euro,EUR,1,1,LATVIA
97
+ Euro,EUR,1,1,LITHUANIA
98
+ Euro,EUR,1,1,LUXEMBOURG
99
+ Euro,EUR,1,1,MALTA
100
+ Euro,EUR,1,1,MARTINIQUE
101
+ Euro,EUR,1,1,MAYOTTE
102
+ Euro,EUR,1,1,MONACO
103
+ Euro,EUR,1,1,MONTENEGRO
104
+ Euro,EUR,1,1,NETHERLANDS
105
+ Euro,EUR,1,1,PORTUGAL
106
+ Euro,EUR,1,1,RÉUNION
107
+ Euro,EUR,1,1,SAINT BARTHÉLEMY
108
+ Euro,EUR,1,1,SAINT MARTIN (FRENCH PART)
109
+ Euro,EUR,1,1,SAINT PIERRE AND MIQUELON
110
+ Euro,EUR,1,1,SAN MARINO
111
+ Euro,EUR,1,1,SLOVAKIA
112
+ Euro,EUR,1,1,SLOVENIA
113
+ Euro,EUR,1,1,SPAIN
114
+ Falkland Islands Pound,FKP,1.4029,0.7131,FALKLAND ISLANDS (MALVINAS)
115
+ Fiji Dollar,FJD,0.4613,2.1908,FIJI
116
+ Gambian Dalasi,GMD,0.02227,45.9603,GAMBIA
117
+ Georgian Lari,GEL,0.4356,2.296,GEORGIA
118
+ Ghanaian New Cedi,GHS,0.2618,3.8628,GHANA
119
+ Gibraltar Pound,GIP,1.4029,0.7131,GIBRALTAR
120
+ Guatemalan Quetzal,GTQ,0.1273,8.2545,GUATEMALA
121
+ Guinea Franc,GNF,0.000134,7748.67,GUINEA
122
+ Guyanese Dollar,GYD,0.004809,228.029,GUYANA
123
+ Honduran Lempira,HNL,0.04445,23.5007,HONDURAS
124
+ Hong Kong Dollar,HKD,0.1222,8.1862,HONG KONG
125
+ Hungarian Forint,HUF,0.003285,305.102,HUNGARY
126
+ Iceland Krona,ISK,0.006803,147.707,ICELAND
127
+ Indian Rupee,INR,0.01511,66.2901,BHUTAN
128
+ Indian Rupee,INR,0.01511,66.2901,INDIA
129
+ Indonesian Rupiah,IDR,7.18E-05,13979.7,INDONESIA
130
+ Iranian Rial,IRR,3.39E-05,29561.4,"IRAN, ISLAMIC REPUBLIC OF"
131
+ Iraqi Dinar,IQD,0.0008299,1263.69,IRAQ
132
+ Israeli New Shekel,ILS,0.2359,4.2483,ISRAEL
133
+ Israeli New Shekel,ILS,0.2359,4.2483,"PALESTINE, STATE OF"
134
+ Jamaican Dollar,JMD,0.008333,123.637,JAMAICA
135
+ Japanese Yen,JPY,0.007822,127.877,JAPAN
136
+ Jordanian Dinar,JOD,1.3442,0.7493,JORDAN
137
+ Kazakhstan Tenge,KZT,0.005179,199.139,KAZAKHSTAN
138
+ Kenyan Shilling,KES,0.01051,98.8745,KENYA
139
+ Kuwaiti Dinar,KWD,3.168,0.3167,KUWAIT
140
+ Kyrgyzstanian Som,KGS,0.01542,64.9065,KYRGYZSTAN
141
+ Lao Kip,LAK,0.0001189,8778.98,LAO PEOPLE’S DEMOCRATIC REPUBLIC
142
+ Lebanese Pound,LBP,0.0006292,1595.86,LEBANON
143
+ Liberian Dollar,LRD,0.0113,89.596,LIBERIA
144
+ Libyan Dinar,LYD,0.7078,1.479,LIBYA
145
+ Macau Pataca,MOP,0.1209,8.6726,MACAO
146
+ Macedonian Denar,MKD,0.01635,61.9922,"MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF"
147
+ Malagasy Ariary,MGA,0.000319,3235.59,MADAGASCAR
148
+ Malawi Kwacha,MWK,0.002171,473.279,MALAWI
149
+ Malaysian Ringgit,MYR,0.2566,3.9024,MALAYSIA
150
+ Maldive Rufiyaa,MVR,0.06342,16.3416,MALDIVES
151
+ Mauritanian Ouguiya,MRO,0.003141,329.671,MAURITANIA
152
+ Mauritius Rupee,MUR,0.02724,39.6754,MAURITIUS
153
+ Mexican Peso,MXN,0.06138,16.3045,MEXICO
154
+ Moldovan Leu,MDL,0.05251,19.6469,"MOLDOVA, REPUBLIC OF"
155
+ Mongolian Tugrik,MNT,0.000479,2093.38,MONGOLIA
156
+ Moroccan Dirham,MAD,0.09493,10.7714,MOROCCO
157
+ Moroccan Dirham,MAD,0.09493,10.7714,WESTERN SAHARA
158
+ Mozambique New Metical,MZN,0.02807,35.9438,MOZAMBIQUE
159
+ Myanmar Kyat,MMK,0.0009329,1116.22,MYANMAR
160
+ Nepalese Rupee,NPR,0.00953,108.36,NEPAL
161
+ New Zealand Dollar,NZD,0.6989,1.4315,COOK ISLANDS
162
+ New Zealand Dollar,NZD,0.6989,1.4315,NEW ZEALAND
163
+ New Zealand Dollar,NZD,0.6989,1.4315,NIUE
164
+ New Zealand Dollar,NZD,0.6989,1.4315,PITCAIRN
165
+ New Zealand Dollar,NZD,0.6989,1.4315,TOKELAU
166
+ Nicaraguan Cordoba Oro,NIO,0.03618,28.6473,NICARAGUA
167
+ Nigerian Naira,NGN,0.00479,212.909,NIGERIA
168
+ NL Antillian Guilder,ANG,0.5331,1.9184,CURAÇAO
169
+ NL Antillian Guilder,ANG,0.5331,1.9184,SINT MAARTEN (DUTCH PART)
170
+ North Korean Won,KPW,0.007029,142.299,"KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF"
171
+ Norwegian Kroner,NOK,0.1155,8.6683,BOUVET ISLAND
172
+ Norwegian Kroner,NOK,0.1155,8.6683,NORWAY
173
+ Norwegian Kroner,NOK,0.1155,8.6683,SVALBARD AND JAN MAYEN
174
+ Omani Rial,OMR,2.4741,0.4073,OMAN
175
+ Pakistan Rupee,PKR,0.009403,108.73,PAKISTAN
176
+ Papua New Guinea Kina,PGK,0.3675,2.8817,PAPUA NEW GUINEA
177
+ Paraguay Guarani,PYG,0.0002021,5209.08,PARAGUAY
178
+ Peruvian Nuevo Sol,PEN,0.3112,3.3397,PERU
179
+ Philippine Peso,PHP,0.02139,46.8576,PHILIPPINES
180
+ Polish Zloty,PLN,0.2417,4.1434,POLAND
181
+ Qatari Rial,QAR,0.2609,3.8415,QATAR
182
+ Romanian New Lei,RON,0.226,4.4321,ROMANIA
183
+ Russian Rouble,RUB,0.01524,65.6681,RUSSIAN FEDERATION
184
+ Rwandan Franc,RWF,0.001361,763.914,RWANDA
185
+ Samoan Tala,WST,0.4182,2.4878,SAMOA
186
+ Sao Tome/Principe Dobra,STD,4.13E-05,24746,SAO TOME AND PRINCIPE
187
+ Saudi Riyal,SAR,0.2531,3.9548,SAUDI ARABIA
188
+ Serbian Dinar,RSD,0.008374,120.891,SERBIA
189
+ Seychelles Rupee,SCR,0.07449,15.4017,SEYCHELLES
190
+ Sierra Leone Leone,SLL,0.0002186,4680.07,SIERRA LEONE
191
+ Singapore Dollar,SGD,0.6825,1.4661,SINGAPORE
192
+ Solomon Islands Dollar,SBD,0.1228,8.2029,SOLOMON ISLANDS
193
+ Somali Shilling,SOS,0.001394,768.736,SOMALIA
194
+ South African Rand,ZAR,0.07638,13.1101,LESOTHO
195
+ South African Rand,ZAR,0.07638,13.1101,NAMIBIA
196
+ South African Rand,ZAR,0.07638,13.1101,SOUTH AFRICA
197
+ South-Korean Won,KRW,0.0008381,1196.31,"KOREA, REPUBLIC OF"
198
+ Sri Lanka Rupee,LKR,0.00729,144.213,SRI LANKA
199
+ St. Helena Pound,SHP,1.5274,0.6552,"SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA"
200
+ Sudanese Pound,SDG,0.1595,6.3695,SUDAN
201
+ Suriname Dollar,SRD,0.2929,3.4679,SURINAME
202
+ Swaziland Lilangeni,SZL,0.076377,13.11007,SWAZILAND
203
+ Swedish Krona,SEK,0.1093,9.1541,SWEDEN
204
+ Swiss Franc,CHF,0.9436,1.0603,LIECHTENSTEIN
205
+ Swiss Franc,CHF,0.9436,1.0603,SWITZERLAND
206
+ Syrian Pound,SYP,0.004509,222.145,SYRIAN ARAB REPUBLIC
207
+ Taiwan Dollar,TWD,0.02993,33.4332,"TAIWAN, PROVINCE OF CHINA"
208
+ Tajikistani Somoni,TJS,0.1738,5.7572,TAJIKISTAN
209
+ Tanzanian Shilling,TZS,0.0005245,2007.08,"TANZANIA, UNITED REPUBLIC OF"
210
+ Thai Baht,THB,0.02887,34.7487,THAILAND
211
+ Tonga Pa'anga,TOP,0.456,2.1986,TONGA
212
+ Trinidad/Tobago Dollar,TTD,0.1525,6.8575,TRINIDAD AND TOBAGO
213
+ Tunisian Dinar,TND,0.4833,2.0802,TUNISIA
214
+ Turkish Lira,TRY,0.3614,2.7706,TURKEY
215
+ Turkmenistan New Manat,TMT,0.3329,3.0041,TURKMENISTAN
216
+ Uganda Shilling,UGX,0.0003286,3133.83,UGANDA
217
+ Ukraine Hryvnia,UAH,0.04404,23.3123,UKRAINE
218
+ Uruguayan Peso,UYU,0.0385,27.1777,URUGUAY
219
+ US Dollar,USD,0.9488,1.0541,AMERICAN SAMOA
220
+ US Dollar,USD,0.9488,1.0541,"BONAIRE, SINT EUSTATIUS AND SABA"
221
+ US Dollar,USD,0.9488,1.0541,BRITISH INDIAN OCEAN TERRITORY
222
+ US Dollar,USD,0.9488,1.0541,ECUADOR
223
+ US Dollar,USD,0.9488,1.0541,EL SALVADOR
224
+ US Dollar,USD,0.9488,1.0541,GUAM
225
+ US Dollar,USD,0.9488,1.0541,HAITI
226
+ US Dollar,USD,0.9488,1.0541,MARSHALL ISLANDS
227
+ US Dollar,USD,0.9488,1.0541,"MICRONESIA, FEDERATED STATES OF"
228
+ US Dollar,USD,0.9488,1.0541,NORTHERN MARIANA ISLANDS
229
+ US Dollar,USD,0.9488,1.0541,PALAU
230
+ US Dollar,USD,0.9488,1.0541,PANAMA
231
+ US Dollar,USD,0.9488,1.0541,PUERTO RICO
232
+ US Dollar,USD,0.9488,1.0541,TIMOR-LESTE
233
+ US Dollar,USD,0.9488,1.0541,TURKS AND CAICOS ISLANDS
234
+ US Dollar,USD,0.9488,1.0541,UNITED STATES
235
+ US Dollar,USD,0.9488,1.0541,UNITED STATES MINOR OUTLYING ISLANDS
236
+ US Dollar,USD,0.9488,1.0541,VIRGIN ISLANDS (BRITISH)
237
+ US Dollar,USD,0.9488,1.0541,VIRGIN ISLANDS (U.S.)
238
+ Utd. Arab Emir. Dirham,AED,0.2584,3.8722,UNITED ARAB EMIRATES
239
+ Uzbekistan Som,UZS,0.0003895,2619.36,UZBEKISTAN
240
+ Vanuatu Vatu,VUV,0.009028,112.891,VANUATU
241
+ Venezuelan Bolivar Fuerte,VEF,0.1509,6.6512,"VENEZUELA, BOLIVARIAN REPUBLIC OF"
242
+ Vietnamese Dong,VND,4.48E-05,22968.5,VIET NAM
243
+ Yemeni Rial,YER,0.004416,226.994,YEMEN
244
+ Zambian Kwacha,ZMW,0.1298,7.8035,ZAMBIA
245
+ Zimbabwe Dollar,ZWD,0.002542,396.647,ZIMBABWE
dataset_prep.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+
3
+ # Read the CSV file
4
+ csv_file = 'aircraft.csv' # Replace with your actual file name
5
+ df = pd.read_csv(csv_file)
6
+
7
+ # Function to convert nautical miles to kilometers
8
+ def nautical_miles_to_km(nautical_miles):
9
+ return nautical_miles * 1.852
10
+
11
+ # Assuming the column with nautical miles is named 'NauticalMiles'
12
+ # Replace 'NauticalMiles' with the actual column name if it's different
13
+ # df['Kilometers'] = df['NauticalMiles'].apply(nautical_miles_to_km)
14
+
15
+ # Function to convert speed from knots to km/h
16
+ def knots_to_kmh(knots):
17
+ return knots * 1.852
18
+
19
+ # Function to calculate maximum flight time (hours)
20
+ def calculate_max_flight_time(range_km, speed_kmh):
21
+ if speed_kmh == 0: # Avoid division by zero
22
+ return None
23
+ return range_km / speed_kmh
24
+
25
+ def max_fuel_capacity(fuel_rate, max_flight_time):
26
+ if max_flight_time == 0: # Avoid division by zero
27
+ return None
28
+ return fuel_rate*max_flight_time
29
+
30
+ # Convert cruising speed from knots to km/h and add as a new column
31
+ # df['Speed_kmh'] = df['Cruising Speed (kts)'].apply(knots_to_kmh)
32
+
33
+ # Calculate maximum flight time and add as a new column
34
+ # Assuming 'Kilometers' represents the range
35
+ # df['MaxFlightTime_hr'] = df.apply(lambda row: calculate_max_flight_time(row['Range_km'], row['Speed_kmh']), axis=1)
36
+
37
+ df['Max_Fuel_Capacity'] = df.apply(lambda row: max_fuel_capacity(row['Fuel_Consumption_kg/hr'],row['MaxFlightTime_hr']),axis=1)
38
+ # Save the updated DataFrame back to the same CSV file
39
+ df.to_csv(csv_file, index=False)
40
+
41
+ print("Conversion complete. Speed (km/h) and Max Flight Time (hr) columns added to the CSV.")
flight_distance.py ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from math import *
3
+
4
+ def get_aircraft_details(aircraft_type):
5
+ # Load the CSV file
6
+ csv_file = 'aircraft.csv' # Replace with the actual path if needed
7
+ df = pd.read_csv(csv_file)
8
+
9
+ # Check if the aircraft type exists in the DataFrame
10
+ if aircraft_type not in df['Aircraft'].values:
11
+ return f"Aircraft type '{aircraft_type}' not found in the dataset."
12
+
13
+ # Fetch the relevant details for the given aircraft type
14
+ aircraft_details = df[df['Aircraft'] == aircraft_type][[
15
+ 'Range_km',
16
+ 'Fuel_Consumption_kg/hr',
17
+ 'Cruising Speed (kts)',
18
+ 'Speed_kmh',
19
+ 'MaxFlightTime_hr',
20
+ 'Max_Fuel_Capacity_kg'
21
+ ]]
22
+
23
+ # Convert the result to a dictionary for easier reading
24
+ details_dict = aircraft_details.to_dict(orient='records')[0]
25
+
26
+ return details_dict
27
+
28
+ def get_airport_lat_long(identifiers):
29
+ """
30
+ Fetch latitude and longitude for a list of airport names or IATA codes.
31
+
32
+ :param identifiers: List of airport names or IATA codes (minimum of 2)
33
+ :return: Dictionary with airport identifiers as keys and (latitude, longitude) tuples as values
34
+ """
35
+ if len(identifiers) < 2:
36
+ return "Please provide at least two airport identifiers."
37
+
38
+ # Load the CSV file
39
+ csv_file = 'airport.csv' # Replace with the actual path if needed
40
+ df = pd.read_csv(csv_file)
41
+
42
+ # Efficiently filter rows where the 'Name' or 'IATA' matches any of the provided identifiers
43
+ df_filtered = df[df['Airport_Name'].isin(identifiers) | df['IATA'].isin(identifiers)]
44
+
45
+ # Extract relevant information and store in a dictionary
46
+ lat_long_dict = {}
47
+ for _, row in df_filtered.iterrows():
48
+ identifier = row['IATA'] if row['IATA'] in identifiers else row['Name']
49
+ lat_long_dict[identifier] = (row['Lat'], row['Long'])
50
+
51
+ # Check if all identifiers were found
52
+ not_found = [id for id in identifiers if id not in lat_long_dict]
53
+ if not_found:
54
+ return f"These identifiers were not found: {', '.join(not_found)}"
55
+
56
+ return lat_long_dict
57
+
58
+ def haversine_distance(lat1, lon1, lat2, lon2):
59
+ """
60
+ Calculate the Haversine distance between two points on the Earth.
61
+ """
62
+ R = 6371.0 # Radius of Earth in kilometers
63
+
64
+ # Convert latitude and longitude from degrees to radians
65
+ lat1, lon1, lat2, lon2 = map(radians, [lat1, lon1, lat2, lon2])
66
+
67
+ # Haversine formula
68
+ dlat = lat2 - lat1
69
+ dlon = lon2 - lon1
70
+ a = sin(dlat / 2)**2 + cos(lat1) * cos(lat2) * sin(dlon / 2)**2
71
+ c = 2 * asin(sqrt(a))
72
+ distance = round(R * c,2)
73
+ return distance
74
+
75
+ def calculate_distances(airport_identifiers):
76
+ """
77
+ Calculate the distance between multiple airports.
78
+ :param airport_identifiers: List of airport names or IATA codes
79
+ :return: Dictionary with airport pairs as keys and their distances in kilometers as values
80
+ """
81
+ lat_long_dict = get_airport_lat_long(airport_identifiers)
82
+ if isinstance(lat_long_dict, str): # Check if there was an error fetching airport data
83
+ return lat_long_dict
84
+
85
+ # Calculate the distance for each combination of airports
86
+ distances = {}
87
+ identifiers = list(lat_long_dict.keys())
88
+ for i in range(len(identifiers)):
89
+ for j in range(i + 1, len(identifiers)):
90
+ airport1 = identifiers[i]
91
+ airport2 = identifiers[j]
92
+ lat1, lon1 = lat_long_dict[airport1]
93
+ lat2, lon2 = lat_long_dict[airport2]
94
+ distance = haversine_distance(lat1, lon1, lat2, lon2)
95
+ distances[(airport1, airport2)] = distance
96
+
97
+ return distances
98
+
99
+ # Example usage:
100
+ # aircraft_type = input("Enter the aircraft type: ")
101
+ # aircraft_specs = get_aircraft_details(aircraft_type)
102
+ # print(aircraft_specs)
103
+
104
+ # fuel_burn_rate = aircraft_specs['Fuel_Consumption_kg/hr']
105
+ # cruising_speed = aircraft_specs['Max_Fuel_Capacity_kg']
106
+ # max_fuel_capacity = aircraft_specs['Speed_kmh']
107
+ # reserve_fuel_percentage = 0.05 # 5% reserve
108
+
109
+ # #Reserver Fuel calculation
110
+ # reserve_fuel = reserve_fuel_percentage*max_fuel_capacity
111
+
112
+ # #Flight Time
113
+ # flight_time = trip_distance/cruising_speed
114
+
115
+ # #Fuel needed for Trip
116
+ # fuel_required = flight_time*fuel_burn_rate
117
+
118
+ # total_fuel_with_reserve = fuel_required+reserve_fuel
119
+
120
+ # if total_fuel_with_reserve>max_fuel_capacity:
121
+ # print("Cant Fly without refuel")
122
+ # else:
123
+ # print(f"Total fuel required for the trip (including reserve): {round(total_fuel_with_reserve,2)} kg")
124
+
main.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pandas as pd
2
+ from flight_distance import *
3
+ # from optimizer import *
4
+ from weather import *
5
+
6
+ airport_identifiers = ['SIN', 'LAX', 'JFK', 'CDG', 'LHR'] # Replace with actual identifiers
7
+
8
+ #Get Airport Coordinates
9
+ lat_long_dict = get_airport_lat_long(airport_identifiers)
10
+ print("Coordinates: \n",lat_long_dict)
11
+
12
+ #Get Distance between each node (airports)
13
+ trip_distance = calculate_distances(airport_identifiers)
14
+ print("Distance b/w Airports: \n",trip_distance)
15
+
16
+ #Get onroute weather
17
+ weather = fetch_weather_along_route(airport_identifiers,lat_long_dict)
18
+ print("On Route weather: \n", weather)
19
+
20
+ # # Ensure the graph is bidirectional (undirected)
21
+ # for (a, b), dist in list(trip_distance.items()):
22
+ # trip_distance[(b, a)] = dist
23
+
24
+ # # Find the optimal route with the new cost metric
25
+ # optimal_route, optimal_distance = find_optimal_route(airport_identifiers, trip_distance)
26
+
27
+ # print("Optimal Route:", " -> ".join(optimal_route) + f" -> {optimal_route[0]}")
28
+ # print("Total Adjusted Distance/Cost:", optimal_distance)
optimizer.py ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import itertools
2
+
3
+ # Define the distances between the airports
4
+ distances = {
5
+ ('SIN', 'LAX'): 14101.48,
6
+ ('LAX', 'JFK'): 3974.20,
7
+ ('JFK', 'CDG'): 5833.66,
8
+ }
9
+
10
+ # Define the factors for each route segment
11
+ route_factors = {('SIN', 'LAX'): {'weather': 'clear sky', 'temperature': 27.18}, ('LAX', 'JFK'): {'weather': 'clear sky', 'temperature': 25.37}, ('JFK',
12
+ 'CDG'): {'weather': 'clear sky', 'temperature': 21.18}}
13
+
14
+ # Ensure the graph is bidirectional (undirected)
15
+ for (a, b), dist in list(distances.items()):
16
+ distances[(b, a)] = dist
17
+
18
+ for (a, b), factors in list(route_factors.items()):
19
+ route_factors[(b, a)] = factors
20
+
21
+ # Function to assign a risk factor based on weather
22
+ def weather_risk(weather):
23
+ risk_factors = {
24
+ "clear sky": 0.1,
25
+ "few clouds": 0.2,
26
+ "scattered clouds": 0.3,
27
+ "broken clouds": 0.4,
28
+ "overcast clouds": 0.5,
29
+ "light rain": 0.6,
30
+ "rain": 0.7,
31
+ "storm": 0.9
32
+ }
33
+ return risk_factors.get(weather, 0.5) # Default risk factor if not listed
34
+
35
+ # Function to normalize temperature impact
36
+ def temperature_impact(temperature):
37
+ # Assuming ideal temperature for fuel efficiency is around 20-25°C
38
+ if temperature < 20 or temperature > 25:
39
+ return abs(temperature - 22.5) / 30 # Normalize to a value between 0 and 1
40
+ return 0.1 # Low impact in the ideal range
41
+
42
+ # Calculate the adjusted cost for each route segment
43
+ def calculate_adjusted_cost(segment, base_distance):
44
+ if segment not in route_factors:
45
+ segment = (segment[1], segment[0]) # Check the reversed segment
46
+ weather = route_factors[segment]["weather"]
47
+ temperature = route_factors[segment]["temperature"]
48
+
49
+ weather_cost = weather_risk(weather) * 100 # Weight for weather impact
50
+ temperature_cost = temperature_impact(temperature) * 50 # Weight for temperature impact
51
+
52
+ total_cost = base_distance + weather_cost + temperature_cost
53
+ return total_cost
54
+
55
+ # Update the distance function to include additional factors
56
+ def calculate_route_distance(route, distances):
57
+ """Calculate the total cost for a given route, including additional factors."""
58
+ total_distance = 0
59
+ for i in range(len(route) - 1):
60
+ segment = (route[i], route[i + 1])
61
+ if segment not in distances:
62
+ segment = (route[i + 1], route[i])
63
+ base_distance = distances[segment]
64
+ total_distance += calculate_adjusted_cost(segment, base_distance)
65
+ # Add distance to return to the starting point
66
+ last_segment = (route[-1], route[0])
67
+ if last_segment not in distances:
68
+ last_segment = (route[0], route[-1])
69
+ base_distance = distances[last_segment]
70
+ total_distance += calculate_adjusted_cost(last_segment, base_distance)
71
+
72
+ return total_distance
73
+
74
+ def find_optimal_route(airports, distances):
75
+ """Find the optimal route that covers all airports."""
76
+ best_route = None
77
+ min_distance = float('inf')
78
+
79
+ # Generate all possible permutations of the route
80
+ for route in itertools.permutations(airports):
81
+ current_distance = calculate_route_distance(route, distances)
82
+ if current_distance < min_distance:
83
+ min_distance = current_distance
84
+ best_route = route
85
+
86
+ return best_route, min_distance
87
+
88
+ # List of all airports
89
+ airports = ['SIN', 'LAX', 'JFK', 'CDG']
90
+
91
+ # Find the optimal route with the new cost metric
92
+ optimal_route, optimal_distance = find_optimal_route(airports, distances)
93
+
94
+ print("Optimal Route:", " -> ".join(optimal_route) + f" -> {optimal_route[0]}")
95
+ print("Total Adjusted Distance/Cost:", optimal_distance)
ui.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import tkinter as tk
2
+ from tkinter import ttk
3
+ import pandas as pd
4
+
5
+ class AirportSearchApp:
6
+ def __init__(self, root, csv_file):
7
+ self.root = root
8
+ self.root.title("Airport Search")
9
+
10
+ self.df = pd.read_csv(csv_file)
11
+ self.iata_index = {row['IATA']: row['Airport_Name'] for idx, row in self.df.iterrows()}
12
+ self.name_index = {row['Airport_Name'].lower(): row['IATA'] for idx, row in self.df.iterrows()}
13
+ self.trie = self.build_trie()
14
+
15
+ self.create_widgets()
16
+
17
+ def build_trie(self):
18
+ trie = {}
19
+ for _, row in self.df.iterrows():
20
+ node = trie
21
+ for char in row['Airport_Name'].lower():
22
+ node = node.setdefault(char, {})
23
+ node['_end_'] = row['Airport_Name']
24
+ return trie
25
+
26
+ def search_iata(self, iata):
27
+ return self.iata_index.get(iata.upper(), "Airport not found")
28
+
29
+ def search_name(self, prefix):
30
+ node = self.trie
31
+ for char in prefix.lower():
32
+ if char not in node:
33
+ return []
34
+ node = node[char]
35
+ return self.find_airports(node)
36
+
37
+ def find_airports(self, node, prefix='', results=None):
38
+ if results is None:
39
+ results = []
40
+ if '_end_' in node:
41
+ results.append(node['_end_'])
42
+ for char, next_node in node.items():
43
+ if char != '_end_':
44
+ self.find_airports(next_node, prefix + char, results)
45
+ return results
46
+
47
+ def autocomplete(self, prefix, max_results=5):
48
+ results = self.search_name(prefix)
49
+ return results[:max_results]
50
+
51
+ def create_widgets(self):
52
+ self.label = tk.Label(self.root, text="Enter Airport Name or IATA Code:")
53
+ self.label.pack(pady=10)
54
+
55
+ self.entry = ttk.Entry(self.root, width=50)
56
+ self.entry.pack(pady=10)
57
+ self.entry.bind('<KeyRelease>', self.on_key_release)
58
+
59
+ self.listbox = tk.Listbox(self.root, width=50, height=10)
60
+ self.listbox.pack(pady=10)
61
+ self.listbox.bind('<<ListboxSelect>>', self.on_select)
62
+
63
+ self.result_label = tk.Label(self.root, text="")
64
+ self.result_label.pack(pady=10)
65
+
66
+ def on_key_release(self, event):
67
+ input_text = self.entry.get()
68
+ if len(input_text) == 3:
69
+ # Likely an IATA code
70
+ airport_name = self.search_iata(input_text)
71
+ self.result_label.config(text=f"IATA Code: {input_text} -> Airport: {airport_name}")
72
+ self.listbox.delete(0, tk.END)
73
+ else:
74
+ # Autocomplete based on airport name
75
+ suggestions = self.autocomplete(input_text)
76
+ self.listbox.delete(0, tk.END)
77
+ for suggestion in suggestions:
78
+ self.listbox.insert(tk.END, f"{suggestion} ({self.name_index[suggestion.lower()]})")
79
+
80
+ def on_select(self, event):
81
+ selected_airport = self.listbox.get(self.listbox.curselection())
82
+ self.result_label.config(text=f"Selected Airport: {selected_airport}")
83
+
84
+ def main():
85
+ root = tk.Tk()
86
+ app = AirportSearchApp(root, 'airport.csv')
87
+ root.mainloop()
88
+
89
+ if __name__ == "__main__":
90
+ main()
weather.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import itertools
3
+ from geopy.distance import geodesic
4
+
5
+ # Replace with your OpenWeather API key
6
+ API_KEY = '9811dd1481209c64fba6cb2c90f27140'
7
+
8
+ # Interpolation function to get intermediate points between airports
9
+ def get_intermediate_points(start, end, num_points=4):
10
+ points = []
11
+ lat_step = (end[0] - start[0]) / (num_points + 1)
12
+ lon_step = (end[1] - start[1]) / (num_points + 1)
13
+
14
+ for i in range(1, num_points + 1):
15
+ point = (start[0] + lat_step * i, start[1] + lon_step * i)
16
+ points.append(point)
17
+
18
+ return points
19
+
20
+ # Fetch weather data for a given coordinate
21
+ def fetch_weather(lat, lon):
22
+ url = f'http://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API_KEY}&units=metric'
23
+ response = requests.get(url)
24
+ return response.json()
25
+
26
+ # Fetch weather along all possible routes
27
+ def fetch_weather_for_all_routes(airport_identifiers, airports):
28
+ route_factors = {}
29
+
30
+ # Generate all possible routes (permutations)
31
+ for route in itertools.permutations(airport_identifiers, len(airport_identifiers)):
32
+ route_key = " -> ".join(route) # Key for route factors
33
+ route_factors[route_key] = []
34
+
35
+ for i in range(len(route) - 1):
36
+ start_airport = route[i]
37
+ end_airport = route[i + 1]
38
+ start_coords = (airports[start_airport][0], airports[start_airport][1])
39
+ end_coords = (airports[end_airport][0], airports[end_airport][1])
40
+
41
+ # Get 4 intermediate points along the route
42
+ points = get_intermediate_points(start_coords, end_coords)
43
+
44
+ # Include start and end airport coordinates
45
+ points.insert(0, start_coords)
46
+ points.append(end_coords)
47
+
48
+ # Fetch weather for each point
49
+ weather_descriptions = []
50
+ temperatures = []
51
+
52
+ for point in points:
53
+ weather = fetch_weather(point[0], point[1])
54
+ weather_descriptions.append(weather['weather'][0]['description'])
55
+ temperatures.append(weather['main']['temp'])
56
+
57
+ # Aggregate weather for the route segment
58
+ avg_temperature = sum(temperatures) / len(temperatures)
59
+ most_common_weather = max(set(weather_descriptions), key=weather_descriptions.count)
60
+
61
+ # Store the result in the route_factors dictionary for each route segment
62
+ segment_key = f"{start_airport} -> {end_airport}"
63
+ route_factors[route_key].append({
64
+ "segment": segment_key,
65
+ "weather": most_common_weather,
66
+ "temperature": round(avg_temperature, 2)
67
+ })
68
+
69
+ return route_factors
70
+
71
+ # Example airport coordinates
72
+ airports = {
73
+ 'SIN': (1.3644, 103.9915), # Singapore Changi Airport
74
+ 'LAX': (33.9416, -118.4085), # Los Angeles International Airport
75
+ 'JFK': (40.6413, -73.7781), # John F. Kennedy International Airport
76
+ 'CDG': (49.0097, 2.5479), # Charles de Gaulle Airport
77
+ 'LHR': (51.4700, -0.4543) # London Heathrow Airport
78
+ }
79
+
80
+ airport_identifiers = ['SIN', 'LAX', 'JFK', 'CDG', 'LHR'] # Replace with actual identifiers
81
+
82
+ # Fetch the weather along all possible routes
83
+ route_weather = fetch_weather_for_all_routes(airport_identifiers, airports)
84
+
85
+ # Display the weather data for each route
86
+ for route, factors in route_weather.items():
87
+ print(f"Route: {route}")
88
+ for factor in factors:
89
+ print(f" Segment: {factor['segment']}, Weather: {factor['weather']}, Temperature: {factor['temperature']} °C")
90
+ print()