Exports 🔻"; $thimports="Imports 🔻"; //$htmlis="Growth of Merchandise Trade - RJM Programming - January,2020 var cdone=','; function subclick(ifid) { if (cdone.indexOf(',' + ifid + ',') == -1) { cdone=cdone + ifid + ','; document.getElementById('sf' + ifid).click(); } }

Growth of Merchandise Trade " . $yrange . "

Thanks to Worldbank data of http://wdi.worldbank.org/table/6.1

Exports
Imports
"; $htmlis="Growth of Merchandise Trade - RJM Programming - January,2020 var cdone=','; function subclick(ifid) { if (cdone.indexOf(',' + ifid + ',') == -1) { cdone=cdone + ifid + ','; document.getElementById('sf' + ifid).click(); } }

Growth of Merchandise Trade " . $yrange . "

Thanks to Worldbank data of http://wdi.worldbank.org/table/6.1

" . str_replace("" . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . $thimports . "
"; $things=["Country","Export volume","Import volume","Export value","Import value","Net barter terms of trade index"]; $values=["","","","","",""]; $etitle="Net barter terms of Export trade index " . $yrange; $elabel="'Letter'"; $evalue="Export volume (average annual % growth),Export value (average annual % growth),'Country',Net barter terms of Export trade index (2000 = 100)"; $eurlprefix="bubble_chart.php?title=Net barter terms of Export trade index " . $yrange . "&onclick=y&label='Letter'&value=Export volume (average annual % growth),Export value (average annual % growth),'Country',Net barter terms of Export trade index&data="; $exporturls=[$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix,$eurlprefix]; $ititle="Net barter terms of Import trade index " . $yrange; $ilabel="'Letter'"; $ivalue="Import volume (average annual % growth),Import value (average annual % growth),'Country',Net barter terms of Import trade index"; $iurlprefix="bubble_chart.php?title=Net barter terms of Import trade index " . $yrange . "&onclick=y&label='Letter'&value=Import volume (average annual % growth),Import value (average annual % growth),'Country',Net barter terms of Export trade index&data="; $importurls=[$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix,$iurlprefix]; $letters=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; $flagentity=""; $iso_country_codes=['AF','Afghanistan', 'AX','Aland Islands', 'AL','Albania', 'DZ','Algeria', 'AS','American Samoa', 'AD','Andorra', 'AO','Angola', 'AI','Anguilla', 'AQ','Antarctica', 'AG','Antigua and Barbuda', 'AR','Argentina', 'AM','Armenia', 'AW','Aruba', 'AU','Australia', 'AT','Austria', 'AZ','Azerbaijan', 'BS','Bahamas the', 'BH','Bahrain', 'BD','Bangladesh', 'BB','Barbados', 'BY','Belarus', 'BE','Belgium', 'BZ','Belize', 'BJ','Benin', 'BM','Bermuda', 'BT','Bhutan', 'BO','Bolivia', 'BA','Bosnia and Herzegovina', 'BW','Botswana', 'BV','Bouvet Island (Bouvetoya)', 'BR','Brazil', 'IO','British Indian Ocean Territory (Chagos Archipelago)', 'VG','British Virgin Islands', 'BN','Brunei Darussalam', 'BG','Bulgaria', 'BF','Burkina Faso', 'BI','Burundi', 'KH','Cambodia', 'CM','Cameroon', 'CA','Canada', 'cv','Cabo Verde', 'CV','Cape Verde', 'KY','Cayman Islands', 'CF','Central African Republic', 'TD','Chad', 'CL','Chile', 'CN','China', 'CX','Christmas Island', 'CC','Cocos (Keeling) Islands', 'CO','Colombia', 'KM','Comoros the', 'CD','Congo, Dem. Rep.', 'CG','Congo, Rep.', 'CK','Cook Islands', 'CR','Costa Rica', 'CI','Cote d`Ivoire', 'HR','Croatia', 'CU','Cuba', 'CY','Cyprus', 'CZ','Czech Republic', 'DK','Denmark', 'DJ','Djibouti', 'DM','Dominica', 'DO','Dominican Republic', 'EC','Ecuador', 'EG','Egypt', 'SV','El Salvador', 'GQ','Equatorial Guinea', 'ER','Eritrea', 'EE','Estonia', 'ET','Ethiopia', 'FO','Faroe Islands', 'FK','Falkland Islands (Malvinas)', 'FJ','Fiji the Fiji Islands', 'FI','Finland', 'FR','France, French Republic', 'GF','French Guiana', 'PF','French Polynesia', 'TF','French Southern Territories', 'GA','Gabon', 'GM','Gambia the', 'GE','Georgia', 'DE','Germany', 'GH','Ghana', 'GI','Gibraltar', 'GR','Greece', 'GL','Greenland', 'GD','Grenada', 'GP','Guadeloupe', 'GU','Guam', 'GT','Guatemala', 'GG','Guernsey', 'GN','Guinea', 'GW','Guinea-Bissau', 'GY','Guyana', 'HT','Haiti', 'HM','Heard Island and McDonald Islands', 'VA','Holy See (Vatican City State)', 'HN','Honduras', 'hk','Hong Kong SAR', 'HK','Hong Kong', 'HU','Hungary', 'IS','Iceland', 'IN','India', 'ID','Indonesia', 'IR','Iran', 'IQ','Iraq', 'IE','Ireland', 'IM','Isle of Man', 'IL','Israel', 'IT','Italy', 'JM','Jamaica', 'JP','Japan', 'je','Channel Islands', 'JE','Jersey', 'JO','Jordan', 'KZ','Kazakhstan', 'KE','Kenya', 'KI','Kiribati', 'KP','Korea, Rep.', 'KR','Korea, Dem. People’s Rep.', 'KW','Kuwait', 'KG','Kyrgyz Republic', 'lA','Lao PDR', 'la','Laos', 'LA','Lao', 'LV','Latvia', 'LB','Lebanon', 'LS','Lesotho', 'LR','Liberia', 'LY','Libyan Arab Jamahiriya', 'LI','Liechtenstein', 'LT','Lithuania', 'LU','Luxembourg', 'mo','Macao SAR', 'MO','Macao', 'MK','Macedonia', 'MG','Madagascar', 'MW','Malawi', 'MY','Malaysia', 'MV','Maldives', 'ML','Mali', 'MT','Malta', 'MH','Marshall Islands', 'MQ','Martinique', 'MR','Mauritania', 'MU','Mauritius', 'YT','Mayotte', 'MX','Mexico', 'FM','Micronesia', 'MD','Moldova', 'MC','Monaco', 'MN','Mongolia', 'ME','Montenegro', 'MS','Montserrat', 'MA','Morocco', 'MZ','Mozambique', 'MM','Myanmar', 'NA','Namibia', 'NR','Nauru', 'NP','Nepal', 'nl','Netherlands', 'AN','Netherlands Antilles', 'NL','Netherlands the', 'NC','New Caledonia', 'NZ','New Zealand', 'NI','Nicaragua', 'NE','Niger', 'NG','Nigeria', 'NU','Niue', 'NF','Norfolk Island', 'MK','North Macedonia', 'MP','Northern Mariana Islands', 'NO','Norway', 'OM','Oman', 'PK','Pakistan', 'PW','Palau', 'ps','West Bank and Gaza', 'PS','Palestinian Territory', 'PA','Panama', 'PG','Papua New Guinea', 'PY','Paraguay', 'PE','Peru', 'PH','Philippines', 'PN','Pitcairn Islands', 'PL','Poland', 'PT','Portugal, Portuguese Republic', 'PR','Puerto Rico', 'QA','Qatar', 'RE','Reunion', 'RO','Romania', 'RU','Russian Federation', 'RW','Rwanda', 'bl','St. Barthelemy', 'sh','St. Helena', 'kn','St. Kitts and Nevis', 'lc','St. Lucia', 'mF','Sint Maarten', 'mf','St. Martin', 'pm','St. Pierre and Miquelon', 'vc','St. Vincent and the Grenadines', 'BL','Saint Barthelemy', 'SH','Saint Helena', 'KN','Saint Kitts and Nevis', 'LC','Saint Lucia', 'MF','Saint Martin', 'PM','Saint Pierre and Miquelon', 'VC','Saint Vincent and the Grenadines', 'WS','Samoa', 'SM','San Marino', 'ST','Sao Tome and Principe', 'SA','Saudi Arabia', 'SN','Senegal', 'RS','Serbia', 'SC','Seychelles', 'SL','Sierra Leone', 'SG','Singapore', 'SK','Slovakia (Slovak Republic)', 'SI','Slovenia', 'SB','Solomon Islands', 'SO','Somalia, Somali Republic', 'ZA','South Africa', 'GS','South Georgia and the South Sandwich Islands', 'SS','South Sudan', 'ES','Spain', 'LK','Sri Lanka', 'SD','Sudan', 'SR','Suriname', 'SJ','Svalbard & Jan Mayen Islands', 'SZ','Swaziland', 'SE','Sweden', 'CH','Switzerland, Swiss Confederation', 'SY','Syrian Arab Republic', 'TW','Taiwan', 'TJ','Tajikistan', 'TZ','Tanzania', 'TH','Thailand', 'TL','Timor-Leste', 'TG','Togo', 'TK','Tokelau', 'TO','Tonga', 'TT','Trinidad and Tobago', 'TN','Tunisia', 'TR','Turkey', 'TM','Turkmenistan', 'TC','Turks and Caicos Islands', 'TV','Tuvalu', 'UG','Uganda', 'UA','Ukraine', 'AE','United Arab Emirates', 'GB','United Kingdom', 'US','United States of America', 'UM','United States Minor Outlying Islands', 'vi','Virgin Islands (U.S.)', 'VI','United States Virgin Islands', 'UY','Uruguay, Eastern Republic of', 'UZ','Uzbekistan', 'VU','Vanuatu', 'VE','Venezuela', 'VN','Vietnam', 'WF','Wallis and Futuna', 'EH','Western Sahara', 'YE','Yemen', 'ZM','Zambia', 'ZW','Zimbabwe']; if (file_exists("wdi_worldbank_org-table-6.1" . str_replace("-2003-2013","",("-" . $yrange)) )) { $cont=explode("<", file_get_contents("wdi_worldbank_org-table-6.1" . str_replace("-2003-2013","",("-" . $yrange))))[1]; } else { $cont=file_get_contents("HTTP://wdi.worldbank.org/table/6.1" . str_replace("-2003-2013","",("-" . $yrange))); file_put_contents("wdi_worldbank_org-table-6.1" . str_replace("-2003-2013","",("-" . $yrange)), $cont); } $bits=explode("" . '
', str_replace(" class=''","", str_replace(" class=''","",str_replace(' class="country"',"", str_replace("'Ivoire","`Ivoire",$cont))) )); //$bits=explode('' . '
', str_replace(" class=''","",$cont)); //echo " " . sizeof($bits) . "\n"; //exit; //echo "1:" . str_replace("<","<",str_replace(">",">",$bits[1])) . "\n"; //echo "2:" . str_replace("<","<",str_replace(">",">",$bits[2])) . "\n"; //echo "3:" . str_replace("<","<",str_replace(">",">",$bits[3])) . "\n"; //echo "4:" . str_replace("<","<",str_replace(">",">",$bits[4])) . "\n"; //echo "5:" . str_replace("<","<",str_replace(">",">",$bits[5])) . "\n"; //echo "6:" . str_replace("<","<",str_replace(">",">",$bits[6])) . "\n"; //echo "7:" . str_replace("<","<",str_replace(">",">",$bits[7])) . "\n"; //echo "8:" . str_replace("<","<",str_replace(">",">",$bits[8])) . "\n"; //echo "9:" . str_replace("<","<",str_replace(">",">",$bits[9])) . "\n"; //exit; //new ... //
-0.7
11.0
3.2
12.9
163.6
//
8.0
0.9
9.9
2.3
93.4
//1:Afghanistan
2:-0.7
//old ... //
-1.8
5.9
6.8
12.7
2.2
//
11.5
4.9
17.3
10.3
0.1
//1:Afghanistan 2:-0.7 $ioff=0; for ($i=1; $iAfghanistan", str_replace("<", ">", $bits[-1 + $i])); $values[0]=str_replace("'", "`", trim($presubbits[-7 + sizeof($presubbits)])); $values[0]=explode(">", explode("", explode("", $values[0])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $values[0])[0])[0]))]; //echo "!" . $i . "!" . $values[0] . "!" . str_replace("<","<",str_replace(">",">",$presubbits)); //exit; //if (substr($values[0],0,1) == "B" || substr($values[0],0,1) == "C" || substr($values[0],0,1) == "M" || substr($values[0],0,1) == "P" || substr($values[0],0,1) == "R" || substr($values[0],0,1) == "S") { // $cvals=explode(" ", $values[0]); // $values[0] = $cvals[0]; //} } $subbits=explode("", $bits[$i]); //echo "#" . $subbits[0] . "#"; //exit; if (strpos($bits[$i], ' data-text="Metadata:') != false) { // Andorra $ioff=(sizeof($values) - ($i % sizeof($values))); // ... if i=5 bad is ((5-1) % 5) needs to be 0 $values[0]=explode(">", explode("", explode("", $bits[$i])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i])[0])[0]))]; if ($ioff != 0) { // Andorra at 24 computes to 3 Andorra //echo $values[0] . " ... " . $i . " " . $ioff; // at " . $i . " computes to " . str_replace("<", "<", str_replace(">", ">", $values[((($i - 1) % (sizeof($values) - 1)) + 1)])) . " (" . ((($i - 1) % (sizeof($values) - 1)) + 1) . ") " . str_replace("<", "<", str_replace(">", ">", $bits[$i])); //exit; //if (strpos($bits[$i + 1]. ' ' . $bits[$i + 2]. ' ' . $bits[$i + 3]. ' ' . $bits[$i + 4]. ' ' . $bits[$i + 5], "<") !== false) { echo $values[0] . ' ' . $bits[$i + 1]. ' ' . $bits[$i + 2]. ' ' . $bits[$i + 3]. ' ' . $bits[$i + 4]. ' ' . $bits[$i + 5]. ' '; //exit; //} $values[1]=str_replace("..","0.0",explode("<",$bits[$i + 1])[0]); //explode(">", explode("", explode("", $bits[$i + 1])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i + 1])[0])[0]))]; $values[2]=str_replace("..","0.0",explode("<",$bits[$i + 2])[0]); //explode(">", explode("", explode("", $bits[$i + 2])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i + 2])[0])[0]))]; $values[3]=str_replace("..","0.0",explode("<",$bits[$i + 3])[0]); //explode(">", explode("", explode("", $bits[$i + 3])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i + 3])[0])[0]))]; $values[4]=str_replace("..","0.0",explode("<",$bits[$i + 4])[0]); //explode(">", explode("", explode("", $bits[$i + 4])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i + 4])[0])[0]))]; $values[5]=str_replace("..","0.0",explode("<",$bits[$i + 5])[0]); //explode(">", explode("", explode("", $bits[$i + 5])[0])[0])[-1 + sizeof(explode(">", explode("", explode("", $bits[$i + 5])[0])[0]))]; } } else if ($ioff == 0) { $values[(($i + $ioff - 1) % (sizeof($values) - 1)) + 1]=str_replace("..","0.0",$subbits[0]); } //echo "!!" . $i . "!" . $values[0] . "!" . str_replace("<","<",str_replace(">",">",$presubbits)); //exit; } if (flagflag($values[0]) != "" || 1 == 1) { //echo "*" . $values[0] . "*"; //exit; if (flagflag($values[0]) != "") { $idx=ord(substr($values[0],0,1)) - ord('A'); if (strpos($importurls[$idx], ",'" . $values[0]) == false) { if ($flagentity != "") { $importurls[$idx].=", [~" . $flagentity . "~," . $values[2] . "," . $values[4] . ",'" . $values[0] . " " . $flagentity . "'," . $values[5] . "]"; $exporturls[$idx].=", [~" . $flagentity . "~," . $values[1] . "," . $values[3] . ",'" . $values[0] . " " . $flagentity . "'," . $values[5] . "]"; } else { $importurls[$idx].=", [~" . substr($values[0],0,1) . "~," . $values[2] . "," . $values[4] . ",'" . $values[0] . "'," . $values[5] . "]"; $exporturls[$idx].=", [~" . substr($values[0],0,1) . "~," . $values[1] . "," . $values[3] . ",'" . $values[0] . "'," . $values[5] . "]"; } } } //echo "

" . $values[0] . " " . $values[1] . " " . $values[2] . " " . $values[3] . " " . $values[4] . " " . $values[5] . " " . $values[6] . "


"; //echo "

\$exporturls[" . $idx . "]=" . $exporturls[$idx] . "


"; for ($i=0; $i", "", $htmlis); $htmlis=str_replace("', '

', str_replace('