Wednesday, April 10, 2024

Interpolating Values in a Tsibble

 I don't know why the documentation I ran into wasn't just a lot easier, but there's a few steps you need to take.  We'll use the gafa_stock data from the tsibbledata package.


google_stock <- gafa_stock |>
  filter(Symbol == "GOOG", year(Date) >= 2015) %>%
  update_tsibble(regular = TRUE) %>%
  fill_gaps() %>%
  mutate(Close = na_interpolation(Close),
         Volume = na_interpolation(Volume))

The enabling part of this is to make sure your tsibble knows the periods are regular.  At first it does not:

> google_stock
# A tsibble: 1,006 x 4 [!]
# Key:       Symbol [1]

 In the case above fill_gaps() won't have anything to do because the periodicity is not known:  [!], which is easily fixed by update_tsibble( ...., regular = TRUE):

 

> google_stock
# A tsibble: 1,006 x 4 [1D]
# Key:       Symbol [1]

 You can also use scan_gaps() to learn what fill_gaps() is going to do. If you get no rows you know fill_gaps() won't work either.

Once that is done there are two steps required:

  1. fill_gaps() adds missing dates, leaving non-key values as NA
  2. na_interpolation() fills in the NA values of a column. 

Now that you know the tricks to making this work you can pick any number of na_* methods to fill in the missing values. 

 

Wednesday, October 4, 2023

Time for New Surge Suppression

What a difference 20 years makes

If you first started buying surge protectors in the 20th century there are two big things which are different today than then which you need to know about.  The differences is so large that I am replacing out several of my old units.  It may be time for you to do the same. 

Here they are in summary:
  • Whole house units are required as of the National Electric Code (NEC) 2020 and they can save your life and home.  Details below.
  • Several surge protection brands have come around to focusing on low let through voltages instead of joules. This approach is something ZeroSurge has been on the leading edge of for decades in the semi-pro/pro space. 

All of the surge protectors I am recommending have let through voltages of less than 200.  Getting low let through voltages used to be something only exotic brands like ZeroSurge had but now it's widely available in more affordable units. 

The let through voltage of a surge protector is how high a voltage would have to occur before the protection circuits even notice it is happening.  Circuits which limit the let through voltages are key for several reasons: 

  • They work to slow down the surge, reducing the current that flows through your strip and therefore the home wiring. 
  • They improves the reliability of the surge protector.  The same surge won't dissipate as many joules, so you can think of this as a joule magnifier.
  • They start working at a much lower voltage protecting your equipment  
  • They add some noise filtering since they are essentially low pass filters.

 

Joules Don't Matter

Many surge protectors are sold on the amount of joules they will "abosrb."  This is actually kind of a false reading.  This is the amount of joules the MOV's will take before they are destroyed and ineffective.  If you imagine living in a home with constant lightning strikes every month then a strip with more joules will last longer than a strip with less joules, but it is not actually a more effective strip. These cheap surge protectors are still going to be slow to respond and may very high voltages and current flow through your wall wiring. 

Cheap Strips Can Cause a Fire

Cheap strips with high let through voltages can cause a fire through one of two ways:
  • They will blow up with flames shooting out of them (really)
  • They will cause so much current to flow through your home wiring that it can melt the wiring in the wall and start a fire in there. 
For the sake of your life and property therefore I recommend that you use a whole house surge suppressor along with surge suppressors with low let through voltages and those are the only ones I am recommending here. 

Recommendations

Best for General Use

 
This is what I use everywhere except the audio/home theater or where I have a UPS. 

Best for Audio and Home Theater

Furman makes dozens of models of power strips and surge suppressors but the feature mix that are must haves are LiFT and SMP.  LiFT will reduce noise on the line and SMP is a hybrid series mode surge suppression.   In addition they have models for everything with features like remote triggers, voltage regulation, balanced outputs, coaxial surge suppression, separate filter banks, the list goes on!

 
Furman seems to have discontinued the more affordable LiFT/SMP strips so I can no longer recommend them for general use.  If you don't need any of the advanced features beyond surge and noise suppression you should get a Tripp Lite Isobar Ultra instead for the price. 

At the high end of the Furman product line the mix of features and reliability is absolutely excellent.

Most Reliable 

Without question, ZeroSurge is the most reliable and has significant noise filtering built in. They are also the most expensive.  If you need the reliability of a 911 call center this is your best and only option. Unfortunately they typically run about 4x the price of other very good basic strips from Tripp Lite and lack any of the convenience or specialty features of the Furman units.
 
 

Networking

Besides the power lines the other way in which a lightning surge can infiltrate your home is via a cable modem.  I use a gas discharge tube on the outside at the grounding block and use an "air gap" kind of solution inside.  Between the cable provider's equipment and my own I use a 1m fiber optic cable to prevent lightning from traveling through the Ethernet cable to my PC's, TV's and audio streamers. Here's the list of equipment I use:

 
There are Ethernet surge protectors but after doing some reading and looking at the reviews I decided to take it out. They aren't that reliable and introducing a potential path to ground from the Ethernet cable can actually cause a surge current to happen when otherwise there would not have been one. 


Whole House

A whole house surge suppressor can save your life and your equipment. Get an appropriate one for your panel.  I prefer to use the kind that take two breaker slots rather than the kind that are placed in a separate enclosure. They are easier to install and are closer to the bus bars. I have used all but the Homeline here in the list below and while a homeowner can usually install this themselves (not in a rental)
 

As a homeowner I would only live in a home with Siemens or SquareD panels.  If you have any other brand I suggest you check out this website from an electrical engineer who specializes in electrical fire forensics.

 Having said that the Leviton brand of whole house surge suppressors are not bad either. 

 Details

 I first installed a whole house suppressor near Boston in around 2000.  The goal was to protect the air conditioners and woodworking equipment I had.  At the time these were considered accessories but 20 years later the National Electric Code has made these mandatory in new or upgraded installations.  I was curious as to why and thankfully I found the great State of Minnesota posted an explainer:

 I quot them thus: 

During the 2020 NEC code cycle it was substantiated that surge protective devices are necessary to protect against home fires and personal injury. For the typical home, surge protective devices also provide protection for all the sensitive electronic systems, a variety of different equipment, appliances, lifesaving apparatus such as smoke alarms and carbon-monoxide detectors, overcurrent devices such as GFCIs, AFCIs, and much more.

 

The important most important point here is is the fire protection.  A big enough surge coming from the power company can induce enough current in the wiring in the wall to cause a fire which could possibly smoulder in the walls before engulfing your home in the middle of the night.  Also, being at the meter or in the panel these surge protectors can channel a ton of current to ground safely, much better this current happen here than at your PC or TV.  That surge current would travel through much thinner and longer wires.

The secondary considerations here are that we have a number of important and delicate systems in our homes which are now directly wired in, like fire alarms, smart thermostats, remote lights, etc. in addition to major appliances.  Major appliances can take a hit here and there but will eventually wear down after repeated smaller strikes. 

Do not substitute a whole house protector for a surge strip.  Use both.  Here is why: 

  • The best whole house surge protectors clamp around 500 to 600 volts.  The surge strips I am recommending clam around 140 to 190 volts. 
  • While the whole house protector wont' clamp until 500-600 volts it WILL take on very high currents safer than the surge strips you plug in at the wall. 
By taking this dual approach you can both reduce the surge current that could flow AND reduce the voltage your precious gear will be subjected to. 


Monday, October 2, 2023

The Omega Dynamic III Chrono

 I just read some blog posts talking about how reliable the movements in these watches were and I have to put out a warning for potential buyers. 


I was one of the original purchasers and it was literally the worst watch I ever owned, and really soured me off of any watches that have to be serviced by the Swatch Group watchmakers. 

TL;DR - The chrono versions could suffer from some weird case/module mismatch which was not fixable. I was not the only Omega Dynamic chrono owner to suffer from this problem.  The watch would run fine for 12 to 18 hours and then freeze.  Use or lack of using the chrono module had nothing to do with the freezing problem. It just couldn't keep time for 24 hours straight.

After 3 rounds to Swatch and another 3 rounds with local watch makers I eventually sold it on e-bay for a couple of hundred bucks as a parts watch.  The last time it had come back from Swatch the hand on the minute subdial had literally broken off and was rattling between the face and the glass. 

As you may have read, this watch is not an integrated movement but a basic ETA with a chrono module from Dubois-Depraz.  Not really a negative for me, but it did add to the height of the watch.   It turns out that the Dubois Depraz module is not actually fixable/maintainable.  If it goes bad they throw it away and replace it.  So, as a general maintenance issue you best hope you'll be able to get a replacement module. 

As much as I love the face on this watch, if you are looking for a vintage, two sub-dial chrono I really think you should look elsewhere.  Plenty of great vintage watches that are going to be much more reliable and service friendly. . 

It is fair to say that there are owners who have bought this watch and never had an issue with it.  I know you are out there.  I wish I had been one of them because I'd never have sold mine.