@has_access
    @expose("/activity_per_day")
    def activity_per_day(self):
        Log = models.Log  # noqa
        qry = (
            db.session
            .query(
                Log.dt,
                sqla.func.count())
            .group_by(Log.dt)
            .all()
        )
        payload = {str(time.mktime(dt.timetuple())): ccount for dt, ccount in qry if dt}
        return Response(json.dumps(payload), mimetype="application/json")
endpoint to power the calendar heatmap on the welcome page
dataset/ETHPy150Open airbnb/caravel/caravel/views.py/Caravel.activity_per_day