Updated analysis/views.py to use clustering