2c2 < // growth_of_merchandise_trade_2006_2016.php --- > // growth_of_merchandise_trade.php 5c5 < // January 2020 --- > // January 2016 10c10 < // //localhost:8888/PHP/BubbleChart/bubble_chart.php?title=Net barter terms of Export trade index 2006-2016&label='Letter'&value=Export volume,Export value,'Country',Net barter terms of Export trade index&data=, [~A~,-1.8,6.8,'Afghanistan',2.2] , [~A~,11.5,17.3,'Albania',0.1] --- > // //localhost:8888/PHP/BubbleChart/bubble_chart.php?title=Net barter terms of Export trade index 2003-2013&label='Letter'&value=Export volume,Export value,'Country',Net barter terms of Export trade index&data=, [~A~,-1.8,6.8,'Afghanistan',2.2] , [~A~,11.5,17.3,'Albania',0.1] 12,93c12 < function uvaltosfcp($string) { // thanks to https://stackoverflow.com/questions/1805802/php-convert-unicode-codepoint-to-utf-8 < return html_entity_decode(preg_replace("/U\+([0-9A-F]{5})/", "&#x\\1;", $string), ENT_NOQUOTES, 'UTF-8'); < } < < function flagflag($inctryname) { < global $flagentity, $iso_country_codes, $lri, $dri; < $uretv=""; < $flagentity=""; < if ($inctryname != "") { < $matchfound=false; < for ($im=1; $im🔻"; < $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 . "
"; --- > $htmlis=" var cdone=','; function subclick(ifid) { if (cdone.indexOf(',' + ifid + ',') == -1) { cdone=cdone + ifid + ','; document.getElementById('sf' + ifid).click(); } }

Growth of Merchandise Trade 2003-2013


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


Exports
Imports
"; 96c15 < $etitle="Net barter terms of Export trade index " . $yrange; --- > $etitle="Net barter terms of Export trade index 2003-2013"; 98,99c17,18 < $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="; --- > $evalue="Export volume (average annual % growth),Export value (average annual % growth),'Country',Net barter terms of Export trade index"; > $eurlprefix="bubble_chart.php?title=Net barter terms of Export trade index 2003-2013&onclick=y&label='Letter'&value=Export volume (average annual % growth),Export value (average annual % growth),'Country',Net barter terms of Export trade index&data="; 101c20 < $ititle="Net barter terms of Import trade index " . $yrange; --- > $ititle="Net barter terms of Import trade index 2003-2013"; 104c23 < $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="; --- > $iurlprefix="bubble_chart.php?title=Net barter terms of Import trade index 2003-2013&onclick=y&label='Letter'&value=Import volume (average annual % growth),Import value (average annual % growth),'Country',Net barter terms of Export trade index&data="; 107,372d25 < $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']; 374,375c27,28 < 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]; --- > if (file_exists("wdi_worldbank_org-table-6.1")) { > $cont=file_get_contents("wdi_worldbank_org-table-6.1"); 377,378c30,31 < $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); --- > $cont=file_get_contents("HTTP://wdi.worldbank.org/table/6.1"); > file_put_contents("wdi_worldbank_org-table-6.1", $cont); 381,405c34 < $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; --- > $bits=explode("" . '
', str_replace(" class=''","",$cont)); 408,411c37,38 < if ((($i + $ioff - 1) % (sizeof($values) - 1)) == 0) { < if (flagflag($values[0]) != "") { < //echo "**" . $values[0] . "*"; < //exit; --- > if ((($i - 1) % (sizeof($values) - 1)) == 0) { > if ($values[0] != "") { 413,417d39 < 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 { 420,421c42 < } < } --- > //echo "

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


"; 427,429d47 < $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; 436,459c54 < //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; --- > $values[(($i - 1) % (sizeof($values) - 1)) + 1]=str_replace("..","0.0",$subbits[0]); 461,464c56 < if (flagflag($values[0]) != "" || 1 == 1) { < //echo "*" . $values[0] . "*"; < //exit; < if (flagflag($values[0]) != "") { --- > if ($values[0] != "") { 466,470d57 < 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 { 473,475d59 < } < } < } 483,485c67,69 < if (1 == 1 || $i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) $onli=" onload=\" subclick('i" . $i . "'); \" "; < if (1 == 1 || $i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) $onle=" onload=\" subclick('e" . $i . "'); \" "; < if (1 == 1 || $i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) { --- > if ($i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) $onli=" onload=\" subclick('i" . $i . "'); \" "; > if ($i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) $onle=" onload=\" subclick('e" . $i . "'); \" "; > if ($i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) { 487c71 < $ximporturls=str_replace($yrange, $yrange . " " . $letters[$i] . "",$huhs[0]); --- > $ximporturls=str_replace("index 2003-2013", "index 2003-2013 " . $letters[$i] . "",$huhs[0]); 489c73 < if (1 == 1 || $i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) { --- > if ($i == 1 || $i == 2 || $i == 12 || $i == 15 || $i == 17 || $i == 18) { 491c75 < $xexporturls=str_replace($yrange, $yrange . " " . $letters[$i] . "",$huhs[0]); --- > $xexporturls=str_replace("index 2003-2013", "index 2003-2013 " . $letters[$i] . "",$huhs[0]); 493,494c77,78 < $htmlis=str_replace("", "", $htmlis); < $htmlis=str_replace(" $htmlis=str_replace("", "", $htmlis); > $htmlis=str_replace(" // $htmlis=str_replace("', '

', str_replace(' echo $htmlis;