Calculate 5- and 30-day averages in JS instead of relying on spreadsheet data