route.py: sort history by requested date in /analyze