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
How does the United States and Canada really compare to each other when it comes to the murderous impulses of each nation's population? And how does it really compare when we take the nations' primary racial and ethnic differences into account?
Let's answer the first question by tapping the data that applies for the year 2006, which in addition to being a pretty typical year for Canadian homicides, is also the most recent year in which Canada conducted a full census of its population. Our first chart reveals what we found when we dug into both Canadian and U.S. homicide statistics for that year:
In 2006, Canada saw 606 homicides, while the United States experienced 19,160. Let's next take the relative sizes of each nation's population into account by finding the number of homicides in each country for each 100,000 people.
We find then that Canada saw 1.94 homicides for each 100,000 people in its population, while the United States saw 6.42 homicides for each 100,000 people in its population. These figures represent an apples-to-oranges kind of comparison however, because they do not take the racial and ethnic makeup of each nation into account.
That's important because of the pattern we found in the United States for who kills who. Here, we found that the vast majority of the offenders in homicides are of the same race as their victims. Because the United States has very large minority populations (blacks and Hispanics) which are largely absent in Canada, we must exclude the numbers of homicides of black and Hispanic victims from the U.S. totals to make a much more accurate apples-to-apples kind of comparison of U.S. homicides with Canadian homicides.
The chart below reveals what we found when we compared Canadian homicides with the portions of the U.S. population that most closely resembles the Canadian population:
After comparing just the portions of the U.S. population that is most similar to the makeup of the Canadian population, we find that the U.S. sees approximately one additional homicide per 100,000 people than does Canada, with 2.87 homicides per 100,000 people compared to Canada's 1.94 homicides per 100,000 people.
To put that in perspective, if Canada had the demographically-adjusted U.S. homicide rate of 2.87 per 100,000, it would see an additional 292 homicides per year. Meanwhile, if the portion of the U.S. population that most closely resembles the demographics of the Canadian population had the Canadian homicide rate of 1.94 per 100,000, the United States would see roughly 2,180 fewer homicides per year in this portion of its total population.
Statistics Canada. CANSIM, Table 253-0002 and Homicide Survey, Canadian Centre for Justice Statistics. 26 October 2010. Accessed 20 March 2011.
U.S. Centers for Disease Control. WISQARS Injury Mortality Reports, 1999-2007. Accessed 20 March 2011.
Labels: crime, data visualization, demographics
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.