Category Archives: Coding

Convert HOBO U12 data logger dates to Excel serial dates

The data loggers which I use when doing building performance evaluations are great (Onset HOBO U12-012), but they have one little quirk that makes working with the data really irritating – dates come out in a variety of formats when imported into Excel. It seems like it’s an actually an Excel problem. The data in [...]

Building Energy Performance Simulation Q&A site

If there’s one single site on the internet that I couldn’t live without (perhaps with the exception of Google), it would be StackOverflow from StackExchange. It’s an absolute life-saver for programmers, and as a fairly recent convert to programming, I struggle to think what it must have been like in the days before it existed. [...]

Weather data from Weather Underground

Go straight to the web form. If you want to know how to design your building you to need to know what the local weather is like. If you want to understand how your building is performing you need to know what weather it was coping with. If you want to install renewable energy – [...]

Times and time zones in Excel – now with added Google

Max, a visitor here, recently left a comment asking about accessing the public transit travel time option in the Google Directions API. Up until then I hadn’t used it and assumed it worked the same as the walking and driving time options, but that turned out not to be the case. The key difference is [...]

Improved Excel interface for Google Geocoding API

One quite popular post on this site is the Geocoding for Excel post. In common with lots of the code snippets here, the code was stripped down to the bare minimum to make it understandable and functional. I happened to be debugging a recent tool (the EPW weather file finder) and thought that it might [...]

Implementing the Normal Equation in Excel VBA

There’s a difficult-to-Google, but extremely useful equation for linear regression called the Normal Equation. I used to have an implementation in VBA and somehow lost is. As it happened, I needed it today so I spent a little while recreating it. This isn’t what I actually need the equation for, just a test case for [...]

Excel macro for subscripts, superscripts and common typos

If you’re anything like me, seeing badly-formatted things like “12 m3” for “12 m3”, typos like “34 kgC02” for “34 kgCO2”– or worse, combinations like “100 KWh/m2” for “100 kWh/m2” – really rubs you up the wrong way. If it doesn’t then trust me, anyone copy editing, and many people just reading your work really [...]

Weather file finder

This tool was updated to v1.02 on 2/11/2012 * Ever had the problem of looking at all the weather files available from the EnergyPlus weather files site and wondering which is closest to the location you’re modelling in? The oCo Carbon Weather file finder will save you the trouble of looking them up, downloading them, [...]