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
The following question was asked over at Some Assembly Required:
Is there a simple formula that combines the price of gasoline, the one-way commute in miles, and per-hour wages that will let those in the exurbs (and soon, suburbs) figure out when it's time to move back to the city?
The answer, obviously, is yes! Felix Salmon was kind enough to develop the formula, which we've tweaked to create the tool below! Should you move closer to your work? Just plug in the indicated data below, and we'll find out how seriously you might consider the idea:
The tool above only provides a rough approximation of whether or not it might be beneficial to move closer to your work. If you get a positive indication, that means it's worth exploring the idea, with an eye to looking at a wider range of the difference in costs between where you live today and where you might consider living. Things like insurance expenses, food prices, or taxes should be considered before committing yourself to packing up and moving!
For instance, you wouldn't want to move closer to your work in Chicago if that meant having to drive all the way back out to the suburbs to do all your shopping and to eat out to avoid the highest sales taxes in the United States!
Update: Matthew Kahn considers another aspect of commuting cost arithmetic:
Is $5 gas a significant commute cost? This depends on your wage. Consider the following deep math;
Suppose you own a vehicle that gets 25 miles per gallon and you work 25 miles from where you work. Suppose you drive at 25 miles per hour.
Then to get to work, you need to purchase 1 gallon of gas and use 1 hour of your time.
Total One Way commute cost = price of a gallon of gas + hourly wage
Case #1: you make minimum wage = 5 + 7 = 12 and gas = 5/7 of the expenditure
Case #2: Ivy League graduate = 5 + 100 = 105 and gas = 5/105 of total expenditure
So this simple example highlights how the wage can swamp the price of gas for the high skilled but for the less educated, gas is a huge part of the commute cost.
Update 7 July 2008: Ryan Avent summarizes and extends the discussion....
Update 10 February 2010: Len Penzo runs a more detailed analysis of the math!
Labels: gas consumption, personal finance, tool
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.