I have a dataframe with 15minutes observations for 10 years. I want to find the 15minutes that has often the highest value over the years.
time_start count_id location_id obs
time
2000-03-07 07:30:00 2000-03-07 07:30:00-05:00 8182 3939 2.0
2000-03-07 07:45:00 2000-03-07 07:45:00-05:00 8182 3939 0.0
2000-03-07 08:00:00 2000-03-07 08:00:00-05:00 8182 3939 13.0
2000-03-07 08:15:00 2000-03-07 08:15:00-05:00 8182 3939 12.0
2000-03-07 08:30:00 2000-03-07 08:30:00-05:00 8182 3939 6.0
... ... ... ... ...
2000-03-01 17:45:00 2000-03-01 17:45:00-05:00 8193 5600 40.0
2000-01-11 07:30:00 2000-01-11 07:30:00-05:00 8194 5601 59.0
2000-01-11 07:45:00 2000-01-11 07:45:00-05:00 8194 5601 50.0
2000-01-11 08:00:00 2000-01-11 08:00:00-05:00 8194 5601 37.0
2000-01-11 08:15:00 2000-01-11 08:15:00-05:00 8194 5601 31.0
I used the following code to create a histogram of the average of 10years of observations (obs) for each 15minutes in 24 hours and have the highest peds_sum with the darkest colour.
counts_df = stationData10['obs'].groupby([stationData10.index.time, pd.Grouper(freq='15Min')]).mean().to_frame(name='n')
counts_df.rename_axis(['15Min', 'day'], inplace=True)
counts_df.hvplot.heatmap(title='Record count', x='15Min', y='day', C='n', width=FIGSIZE[0], height=FIGSIZE[1])