Speed fixes

This PR makes changes to the charts and aggregation functions in order to render the site faster on initial load. 

cc @smit1678 @jueyang