Added threshold analytics.
Started threshold.py