Querying calendar events
Expanding support for RDF formats.
One of my goals with Markdown Linked Data has been to enable pulling in data that doesn’t really fit in a Markdown document. While I have experimented with some documents that have longer sections of metadata (e.g. a timeline of dates I performed a recurring task) I wanted to include other data sources too. As a first step, I added support for loading files in Turtle or N-Triples formats.
I cobbled together a quick Python script to fetch my calendar, use recurring-ical-events to expand out events that are happening in the surrounding couple of weeks, and then turned it into a Turtle file like:
@prefix cal: <http://www.w3.org/2002/12/cal/ical#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a cal:Vevent ;
cal:summary "Some event" ;
cal:dtstart "2026-01-20T09:00:00-08:00"^^xsd:dateTime ;
cal:dtend "2026-01-20T10:00:00-08:00"^^xsd:dateTime .
The output calendar.ttl file is automatically detected for querying, so I can add look up events within a time period:
PREFIX cal: <http://www.w3.org/2002/12/cal/ical#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?name, ?startTime, ?endTime WHERE {
BIND(xsd:dateTime("2026-01-20T00:00:00Z") AS ?startOfDay)
BIND(xsd:dateTime("2026-01-21T00:00:00Z") AS ?endOfDay)
?event a cal:Vevent ;
cal:summary ?name ;
cal:dtstart ?startTime ;
cal:dtend ?endTime .
FILTER(?startTime < ?endOfDay && ?endTime > ?startOfDay)
}
ORDER BY ?startTime
The actual query for my “Today” dashboard is slightly more complicated to deal with some nuances around time zones and “all-day” events. I’ll probably try adding some more tailored views for calendars, but a simple table works well for seeing my events when planning out the day.

What’s next?
Adding calendar events was a nice quick enhancement to my daily workflow, but this opens up the ability to incorporate many other data sources to query.
Datasette is a great example of some of the interesting things you can do with “small” data sets. It’s designed to quickly explore data ranging from public information about power plants to your personal Apple HealthKit records to GitHub issues.
I plan to test out creating a Datasette export to RDF for exploring this data in connection to my workflow documents. For example, during a weekly review it would be interesting to see my sleep schedule and activity level in comparison to what I accomplised each day, so I could load up data from HealthKit to show that along side the tasks that I completed.
Or I might want to import GitHub issues to link the statuses to tasks in my personal planning board.
Longer term I’d like the ability to run “live” queries against remote data sources, but this approach of adding an RDF snapshot offers a lot of flexibility to expand the connections between these various data sets.