Querying Your Google Calendar
Just like regular expressions, once you know SQL, you basically want SQL access to all structured data. Your emails, fitness tracking, work patterns…and your calendar. I had the good excuse to do this for calendars (hence my post yesterday) and I figure it’s worth sharing.
The ics2db README outlines the basics. Once you’ve got it working, here’s some example queries you might want to run.
How many meetings (with other people) do I have per month?
select timestamp_trunc(cast(start as timestamp), month), count(1) as events from google_calendar.events where array_length(attendees) > 1 group by 1;
Who’s inviting me to the most meetings?
select organizer, count(1) from google_calendar.events where array_length(attendees) > 1 group by 1;
If enough people are interested (basically, at least 3-4 people), I can build versions of this. Ping @ehfeng if you’d like to see these built.
- Support local ical files (especially for work calendars where admin settings prevent sharing via link)
- Easier install via
pipinstead of cloning
- Support for automatically uploading to BigQuery
- Support for Postgres