Improved graphical interface and code robustness of viewdata.py