I’ve written an implementation of the Hampel filter, which is a simple yet robust way to detect and replace outliers in univariate time series without smoothing legitimate jumps. It seems to offer more flexibility than any other Julia or Python implementation I can find. But IANAS, and I make no grand claims.

For now, it’s not in the registry. Install it by direct reference, e.g.,

The page linked in the announcement takes you to the GitHub readme file, which gives the mathematical definition. In essence, it applies median filtering within a moving window, but it makes replacement only when the original value deviates a certain amount from the window median.