python/js graphs plotting and statistics calculation