clean up for visualisations

grouping function and date selection - limit to 31 days for quick view