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
If you're one of the Americans who are able to avoid commuting while working from home, how much value are you getting from the time you're saving?
For a lot of white collar employees, the opportunity to work remotely has provided a huge personal windfall. But not many people have taken a serious stab at estimating how much that value might be, either individual or for society at large.
Until now. It's not often we have the opportunity to work with some of the top minds in economics while crafting a new tool using some of the latest cutting edge technology, so when we do, we jump on it! Today, that means we're starting with some back of the envelope math that Paul Krugman recently featured in his New York Times column estimating the value of the benefit that Americans who are able to work from home are getting in being able to ditch their daily commute:
First things first: The reduction in commuting time is a seriously big deal. Before the pandemic, the average American adult spent about 0.28 hours per day, or more than 100 hours a year, on work-related travel. (Since not all adults are employed, the number for workers was considerably higher.) By 2021, that number had fallen by about a quarter.
Putting a dollar value on the benefits from reduced commuting is tricky. You can’t simply multiply the time saved by average wages, because people probably don’t view time spent on the road (yes, most people drive to work) as fully lost. On the other hand, there are many other expenses, from fuel to wear and tear to psychological strain, associated with commuting. On the third hand, the option of remote or hybrid work tends to be available mainly to highly educated workers with above-average wages and hence a high value associated with their time.
But it’s not hard to make the case that the overall benefits from not commuting every day are equivalent to a gain in national income of at least one and maybe several percentage points.
From there, John Whitehead provided some additional datapoints needed to more precisely calculate the value of those overall benefits:
If median household income is $70,000 and 1 earner in each household works full-time then the household wage is $35. If time is valued at 1/3 of the wage (the number typically used in travel cost demanad models) then the average household enjoys $1200 in additional time at home (100 hours at $12). If there are 125 million households in the U.S. then the number aggregates to $150 billion.
That is lower, 0.65%, Krugman's 1-3% of US GDP ($23 trillion) estimate. There is some slippage between households and individual adults here, but you get the idea. Krugman is making assumptions less conservative than mine.
Here's where we come in. We've built a tool to do Krugman's and Whitehead's back-of-the-envelope commuting time-saved math, which anyone can update with their own assumptions or with the latest data though we've used Whitehead's figures for the default values. Or rather, we instructed ChatGPT to code that tool, which is presented below. If you're accessing this article on a site that republishes our RSS news feed, you may need to click through to our site to access a working version of the tool. If you're there already, here's the tool....
Annual Household Income: | |
Number of Commuting Earners per Household: | |
Hours per Day Spent Commuting: | |
Percentage of Hourly Wage for Value of Time Spent Commuting: | |
Total Number of Commuting Households: | |
Annual Gross Domestic Product (GDP): | |
Average Household Annual Savings for Time Not Spent Commuting: | |
Aggregate Value of Time Not Spent Commuting for All Households: | |
Savings as a Percentage of GDP: |
This tool is a little more complex than our first test drive using ChatGPT's coding capabilities. Here's the prompt we used to generate the basic coding:
Please see this article. Please write the code for a javascript calculator using HTML tables to determine both a single household's value of time not spent commuting and the total value of time not spent commuting for all households given the inputs of annual household income, number of commuting earners per household, hours per day spent commuting, the percentage of hourly wage for the value of time spent commuting, and the total number of commuting households. The default values of these inputs are 70000, 1, 0.28, 33, and 125000000 respectively.
The code generated was about 80% of what we wanted, so we opted to tweak it to make it fully functional rather than attempt to iterate the coding through additional chat. Unlike our earlier test drive, we needed to modify the equations it constructed to obtain the desired results. We had also deliberately left out the GDP input and calculation to see how difficult it would be to add after the code was generated, which turned out to be a piece of cake.
On the whole, our total time in generating this article was similar to what we would normally spend in just debugging a similarly complex tool. Overall, we estimate our time saved is over 70% what coding a similar tool would have required if we had coded it all from scratch.
How much do you suppose that might be worth to the economy multiplied across the country's population of coders?
Image credit: Photo by Domenico Loia on Unsplash.
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.