I have a data frame with many events, each of them having a timestamp.
I need a 2-dimensional plot of this: x axis represents days, y axis represents the time of a day (e.g. hours), and the number of events in this hour of this day is represented by the color (or maybe another way?) of the corresponding cell.
First I’ve tried to use
ggplot(events) +
geom_jitter(aes(x = round(TimeStamp / (3600*24)),
y = TimeStamp %% (3600*24))),
but due to a large number of events (more than 1 million per month) it’s possible to see only the fact that there were events during a specific hour, not how many there were (almost all cells are just filled with black). So, the question is – how to create such a plot in R?
You could make a hexbin plot: