Update analyze_frequencies.py

did some preliminary code. Its a start.