Beginning data processing in trends.js

Minor edit