added code for trending data frequency and visual plot