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
Via Barry Ritholtz, we find a JunkCharts makeover candidate:
The chart, produced by Jake at Econompic Data would qualify as a candidate for a JunkCharts makeover as it measures the percentage changes of percentages.
Let's first show how Jake likely found the percentages behind the columns in his chart. In June 2007, the Bureau of Labor Statistics reported that the total seasonally-adjusted unemployment rate for all workers was 4.5% (later revised to 4.6%). This year, the total unemployment rate for all workers is 5.5%. Now, sharp-eyed and math literate readers will immediately identify that the rate of unemployment has increased by 0.9% in the past year, the difference between 5.5% and 4.6%.
Where Jake goes off track is that he takes that 0.9% and divides it by the 4.4% rate of one year ago, giving him the appearance of a 19.6% increase in the unemployment rate.
If you're a journalist who struggles with percentages, here's why that's wrong. Let's start with how the percentage unemployment rates are properly found.
In June 2008, according to Table A-1 of the June 2008 employment report, the civilian labor force consisted of 154,390,000 individuals. Of this figure, 8,499,000 were unemployed. Dividing the number of unemployed by the total number of individuals in the civilian labor force and converting the decimal figure into a percentage gives us the current unemployment rate of 5.5%.
Repeating this exercise for June 2007, whose data is included with the June 2008 employment report, shows that a year ago, 6,997,000 individuals of the 153,085,000 civilian labor force were unemployed, which equates to a seasonally-adjusted unemployment rate of 4.6%.
We see two things right off. First, the civilian labor force has slightly shrunk by 196,000 individuals. We also see that compared to June 2007, an additional 1,502,000 individuals have been counted as being unemployed.
Now, let's play with some hypothetical numbers. Let's say that the size of the civilian labor force for June 2007 and June 2008 is the same as has been recorded, but that the unemployment rate in June 2007 was 10%. That would put the number of hypothetically unemployed individuals at 15,308,500. Now let's add 1,502,000 to that number of unemployed people - the same increase in the number of people counted as being unemployed that was measured as of June 2008.
This gives us a hypothetical figure of 16,105,000 unemployed individuals for June 2008. Dividing this figure by the June 2008 civilian labor force count of 154,390,000 would give us a hypothetical unemployment rate of 10.9%. Once again, an increase of 0.9% in the percentage of the civilian labor force counted as being unemployed, the same as before.
But, in Jake's world, that equates to a percentage increase in the percentage unemployment rate of just 9%. The same increase in the number of unemployed people, but a smaller percentage increase of the percentage unemployed.
Does that sound better to you? Is having 1,502,000 more people counted as being unemployed compared to a year ago less of a big deal when the base unemployment rate is high than if the base unemployment rate is low? Who would you be kidding?
If that doesn't bring home why Jake's math is wrong, we can't help you!
If you look at Jake's chart, you see that the percentage changes in percentage unemployed is different than what we calculated above. That's most likely due to his perhaps using the non-seasonally adjusted unemployment figures, but we don't know. He didn't bother telling us how he generated his figures.
Political Calculations takes issue with Jake's chart up top (A Lousy Unemployment Chart and Bad Math) -- but I am unconvinced of their argument.
A percentage change of a big number is less than the same percentage change of a smaller number. Hey, that's how percentages work.
Request for assistance: How else would one depict the year-over-year change in a number that is itself a percentage? The goal is to convey information quickly and accurately.
You would more properly use the difference between the two percentages. Alternatively, you would chart the actual numbers or the percentages - the scale of any changes would be readily apparent.
As to why percentage changes of percentages doesn't past muster, it might help illustrate things if we consider additional data points. Let's say unemployment is rising by 1% of the labor force every year, which we'll assume to be constant. Starting at 5% unemployment, here's what the year-over-year percentage changes would record:
Year | Unemployment Rate | YOY % change of % |
---|---|---|
0 | 5% | N/A |
1 | 6% | 20% |
2 | 7% | 16.7% |
3 | 8% | 14.2% |
4 | 9% | 12.5% |
5 | 10% | 11.1% |
If we go by the percentage change of percentage, it appears that the rate at which unemployment is increasing is decelerating, even though we know that couldn't be further from the truth!
Update 3 July 2008: Jake clarifies how he determined the percentages in Barry's comments:
For clarification, calculations in the chart are not percents of percents, but in fact the year over year change in the number of ACTUAL people in:
*The labor force
*Employed
*Unemployed
*Not in labor force
There's still an issue with the chart in that each of the percentages has a different base. The numbers may be okay on their own, but putting all of them side by side on the same chart is not. Since they do not share the same base, comparisons that would naturally be drawn between them are nearly meaningless. Very different things are being conveyed by the individual data points.
Labels: math
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.