Github Push Events
Compute at what times during a week are there most activities on Github based on push events.
Sample input data. Here is Github sample dataset for this scenario:
{"timestamp": "2025-08-11T09:15:23Z", "type": "PushEvent", "repo": "myapp", "user": "dev1", "commits": 3}
{"timestamp": "2025-08-11T14:30:24Z", "type": "PushEvent", "repo": "myapp", "user": "dev2", "commits": 1}
{"timestamp": "2025-08-12T10:45:25Z", "type": "PushEvent", "repo": "backend", "user": "dev3", "commits": 2}
{"timestamp": "2025-08-12T16:20:26Z", "type": "PushEvent", "repo": "frontend", "user": "dev1", "commits": 4}
{"timestamp": "2025-08-13T11:05:27Z", "type": "PushEvent", "repo": "myapp", "user": "dev4", "commits": 1}
{"timestamp": "2025-08-13T15:40:28Z", "type": "PushEvent", "repo": "backend", "user": "dev2", "commits": 2}
{"timestamp": "2025-08-14T08:55:29Z", "type": "PushEvent", "repo": "frontend", "user": "dev3", "commits": 3}
{"timestamp": "2025-08-14T13:10:30Z", "type": "PushEvent", "repo": "myapp", "user": "dev1", "commits": 2}
{"timestamp": "2025-08-15T10:25:31Z", "type": "PushEvent", "repo": "backend", "user": "dev4", "commits": 1}
{"timestamp": "2025-08-15T14:50:32Z", "type": "PushEvent", "repo": "frontend", "user": "dev2", "commits": 3}
Query. To create this heat map, use the following query:
type="PushEvent"
| dayOfWeekName := time:dayOfWeekName()
| dayOfWeek := time:dayOfWeek()
| hour := time:hour()
| groupBy([dayOfWeekName, dayOfWeek, hour])
| sort([dayOfWeek, hour], type=[number, number], order=[asc, desc], limit=200)
| drop(dayOfWeek)
This query creates dayOfWeek
(and data of week number for sorting) and
hour of day fields and
computes a groupBy()
with the default
_count aggregate
function. Finally, the query orders the result such that both the
Y-axis and X-axis are sorted. This type of query is best suited when
all combinations of the grouping fields are present, otherwise the
sorting of the map may be inconsistent.