to your HTML Add class="sortable" to any table you'd like to make sortable Click on the headers to sort Thanks to many, many people for contributions and suggestions. Licenced as X11: http://www.kryogenix.org/code/browser/licence.html This basically means: do what you want with it. */ var stIsIE = /*@cc_on!@*/false; sorttable = { init: function() { // quit if this function has already been called if (arguments.callee.done) return; // flag this function so we don't do the same thing twice arguments.callee.done = true; // kill the timer if (_timer) clearInterval(_timer); if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; forEach(document.getElementsByTagName('table'), function(table) { if (table.className.search(/\bsortable\b/) != -1) { sorttable.makeSortable(table); } }); }, makeSortable: function(table) { if (table.getElementsByTagName('thead').length == 0) { // table doesn't have a tHead. Since it should have, create one and // put the first table row in it. the = document.createElement('thead'); the.appendChild(table.rows[0]); table.insertBefore(the,table.firstChild); } // Safari doesn't support table.tHead, sigh if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; if (table.tHead.rows.length != 1) return; // can't cope with two header rows // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as // "total" rows, for example). This is B&R, since what you're supposed // to do is put them in a tfoot. So, if there are sortbottom rows, // for backwards compatibility, move them to tfoot (creating it if needed). sortbottomrows = []; for (var i=0; i
Update (11 January 2005): A new dynamic table with 2004 GDP-PPP and population data is now available in GDP Rankings of the Americas: 2004 Edition!
Previously, I put together a dynamic table that would allow you to sort individual U.S. states according to their 2002 Gross State Product (GSP), the state equivalent of Gross Domestic Product (GDP). Today, we're expanding into the Western Hemisphere, looking at the GDP, population and GDP per capita of the independent nations of North America, South America, Central America and the Carribbean. Unlike the previous exercise however, the GDP data has been adjusted for each country's Purchasing Power Parity (PPP), which takes into account how much an individual can buy within a country along with the currency exchange rate between the individual country's currency and the U.S. dollar.
As with Political Calculations(TM) U.S. Gross State Product table, you may rank the data either from least to greatest or greatest to least in the table below by clicking the individual column heads:
2002 Western Hemisphere Gross Domestic Product (Adjusted for PPP) |
---|
Country | GDP-PPP ($USD Billions) | 2003 Estimated Population | GDP-PPP per Capita ($USD) |
---|---|---|---|
Antigua and Barbuda | 0.8 | 67897 | 11046 |
Argentina | 391 | 38740807 | 10093 |
Bahamas, The | 5.2 | 297477 | 17480 |
Barbados | 4 | 277264 | 14427 |
Belize | 1.3 | 266440 | 4804 |
Bolivia | 21 | 8586443 | 2446 |
Brazil | 1340 | 182032604 | 7361 |
Canada | 923 | 32207113 | 28658 |
Chile | 151 | 15664216 | 9640 |
Colombia | 268 | 41662073 | 6433 |
Costa Rica | 32.3 | 3896092 | 8290 |
Cuba | 25.9 | 11263429 | 2299 |
Dominica | 0.4 | 69655 | 5455 |
Dominican Republic | 53 | 8715602 | 6081 |
Ecuador | 41.7 | 13710234 | 3042 |
El Salvador | 30 | 6470379 | 4637 |
Grenada | 0.4 | 89258 | 4930 |
Guatemala | 48 | 13909384 | 3451 |
Guyana | 2.7 | 702100 | 3846 |
Haiti | 12 | 7527817 | 1594 |
Honduras | 17.6 | 6669789 | 2639 |
Jamaica | 10 | 2695867 | 3709 |
Mexico | 900 | 104907991 | 8579 |
Netherlands Antilles | 2.4 | 216226 | 11099 |
Nicaragua | 12.8 | 5128517 | 2496 |
Panama | 17.3 | 2960784 | 5843 |
Paraguay | 25 | 6036900 | 4141 |
Peru | 132 | 28409897 | 4646 |
St. Kitts and Nevis | 0.3 | 38763 | 8745 |
St. Lucia | 0.9 | 162157 | 5341 |
St. Vincent and the Grenadines | 0.3 | 116812 | 2902 |
Suriname | 1.5 | 435449 | 3445 |
Trinidad and Tobago | 11.1 | 1104209 | 10052 |
United States | 10400 | 290342554 | 35820 |
Uruguay | 26.5 | 3413329 | 7764 |
Venezuela | 132.8 | 24654694 | 5386 |
The Americas (All) | 15042.2 | 863450222 | 17421 |
Gross Domestic Product (GDP) Data: The World Factbook, 2003 via Bartelby.
July, 2003 Population Estimate: The World Factbook, 2003 GDP Data via Bartelby.
Table Sorting Function: The Daily Kryogenix
Labels: gdp
Welcome to the blogosphere's toolchest! Here, unlike other blogs dedicated to analyzing current events, we create easy-to-use, simple tools to do the math related to them so you can get in on the action too! If you would like to learn more about these tools, or if you would like to contribute ideas to develop for this blog, please e-mail us at:
ironman at politicalcalculations
Thanks in advance!
Closing values for previous trading day.
This site is primarily powered by:
The tools on this site are built using JavaScript. If you would like to learn more, one of the best free resources on the web is available at W3Schools.com.