https://github.com/nfultz/alerts/blob/76f9560f6ebda70399502441a4370f083fad5469/analysis.py#L191