ENH: Added api/analysis.py