Author Archives: mathscinotes

Power Query Regular Expression Hack

I use Python, R, and Excel every day in the course of my work. Because many corporations are focused on the Microsoft Office suite of tools, many businesses require that I use Excel/Power Query so that they can work with the tools I develop after I am done. Fortunately, I really enjoy using Power Query, but I find it irritating that it does not support regular expressions. I must admit that Power Query's standard functions can do a good job of extracting strings, but the process is a bit tedious.  However, I have a large library of regular expressions for extracting email addresses, phone numbers, social security numbers, and the like that would be efficient for me to use. Continue reading

Posted in Excel | 3 Comments

US Navy WW2 Aviation Statistics Cleanup Using Power Query

was reading a forum post on fighter kill ratios during WW2 and decide to compute some  Imperial Japanese Navy (IJN) vs  US Navy (USN) ratios for myself. I should point out that these ratios are generally viewed as inflated because of the difficulty of confirming downed aircraft. However, the inflated numbers continue to be quoted. The published reports state that the F6F Hellcat had the best kill ratio of the USN/Marine fighter at 19-to-1, followed by the F4U Corsair at 11-to-1, and the F4F Wildcat at 7-to-1. Continue reading

Posted in History Through Spreadsheets, Naval History | 2 Comments

Battleship Shell Size Comparison

During some routine research on battleships, I encountered some photos on the web that I thought were worth sharing here. My hope with these photos is to give readers a feel for the size of these guns and their projectiles. Continue reading

Posted in Ballistics, Naval History | 1 Comment

Cleaning Up Coffee Production Data Using Power Query

I recently volunteered to do some pro-bono data analysis and front-end web development for a very nice Kenyan woman who is trying to provide a US distribution channel for some coffee growers in her native Kenya. This post documents my work on tidying her coffee data. Continue reading

Posted in Excel | 1 Comment

Converting a Binary Table To Hex With Power Query

I was recently given a specification for a Digital-to-Analog Converter (DAC) that contains a table of register settings that correspond to the DAC's output voltage. Each row of the table corresponds to one register setting and each column corresponds to a register bit. Thus, each table cell corresponds to a single bit – a 1 or 0. A simplified version of this table is shown in Figure 1 – a simplified version of the much larger table I was working with. Continue reading

Posted in Excel | 2 Comments

Steinhart-Hart Thermistor Calibration in Excel Using Matrix Formulas

I had a job this week that required that I use the Steinhart-Hart equation for modeling the thermistor resistance versus temperature relationship. The requirement was driven by the customer's need for high accuracy. Most thermistor applications do not demand high accuracy, but this application can tolerate no more than ±0.2 °C of error.  This means that I cannot use the β-based thermistor model, which in this application would have an error of more than ±2 °C. This page will show how how to perform an efficient 3-point calibration using Excel and a bit of matrix math. As a side benefit, I am using this workbook as an example of matrix math in my Excel tutoring at a local library. Continue reading

Posted in Electronics | 2 Comments

Another Excel TEXTJOIN Example

I have been analyzing seemingly random fuse failures in different products. The failing fuse is similar to the unit shown in Figure 1. My analysis has shown that the fuses are failing because of damage they are sustaining during the manufacturing process. In my analysis report, I was asked to list each product that experienced a fuse failure and to list how many days each product was in service before the fuse failure occurred. Continue reading

Posted in Excel | 1 Comment

Battleship Classes and Throw Weights

I just finished reading The Battle of Surigao Strait by Anthony Tully, a battle that saw the final clash of battleships. For a battleship aficionado, the climax of the fight was the contest between two Japanese battleships and six US battleships, where five of the six US battleships had been sunk or heavily damaged during the Pearl Harbor attack – only the USS Mississippi had escaped the carnage of Pearl Harbor. These were old battleships (Table 1) with two having been commissioned during WW1 and the rest shortly after the WW1 ended. Continue reading

Posted in History Through Spreadsheets, Military History, Naval History | 13 Comments

Everest Climbers With No Supplemental Oxygen

I recently have seen pictures on the news of a line of people preparing to summit Mount Everest (Figure 1), which got me thinking about the difficulty of waiting in line under low-pressure conditions.The vast majority of the people who climb Everest use supplemental oxygen. The air pressure at the summit of Everest is about 0.3 atmosphere, which is not enough to support human life for an extended period of time. But a relatively small number of people have climbed Everest with No Supplemental Oxygen (NSO). In this post, I will look at this very select group of people. Continue reading

Posted in History Through Spreadsheets | 2 Comments

My Robot Lawn Mowers

I am working today in my garage office at my cabin in northern Minnesota. From the office window, I can see a Worx Landroid robot mowing the lawn (Figure 1). I installed two of these mowers  (one for garage and one for cabin) because I am not regularly at the cabin and wanted to ensure the lawn was mowed even when I could not be there. Continue reading

Posted in Cabin | 2 Comments