#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_line_magic('matplotlib', 'inline') from quickviz import visualize as v from vega_datasets import data github = data.github() github["month"] = github["time"].map(lambda t: t.month) github["day"] = github["time"].map(lambda t: t.day) per_day = github.groupby(["month", "day"]).sum() heatmap = per_day.reset_index().pivot("month", "day", "count") v(heatmap)