Structured Data in Documents

Friday 15 November 2024
technology

I have been exploring the closed betas in Craft docs for many weeks now. It wouldn't be fair to discuss the details of these, but there should be a public release before the end of the year and I will come back then to discuss it.

It has made me think hard about "structured data" and its role in notes and other documents. Structured data is probably most familiar from spreadsheets or databases. Different values of data may exist (in different rows or records) but the type of data and its purpose remains the same. A "data structure" has been defined rather than allowing any information in any form or order to be recorded. Think of a list of temperatures on different days, or a number of contacts, each with name, address and phone number. In contrast, unstructured data is what most documents and notes are: information is recorded but it does not have to conform to any given structure.

It is becoming increasingly common for notes and documents apps to provide a way to incorporate structured data alongside the more traditional unstructured data of text and images. Most of these apps now provide at least some for of table and many provide "metadata" (such as the date the document was last edited) and this has been extended by some to allow any structured data to be associated with the note or document, with the fields being set up by the user. Some apps (e.g. Notion) incorporate "databases" in which the documents themselves are fields in a data structure.

I find a real use for structured data in my notes. It reflects the information I am recording, researching and analysing. For example, if I am writing notes about something I am observing with my telescope, I will want to note the ID of the object, the date, what kind of object it is and what constellation it belongs to, as well as my less structured observations, thoughts and reading about it. I welcome new ways to manage information more "naturally", especially when structured data can be sorted, searched and displayed in a variety of ways.

I have found that it can be difficult to draw a clear line between structured and unstructured data. In the Craft betas, I've gone round a loop a few times, where I set something up as structured data, only to realise later that structuring it gives little benefit. I have a tendency to want to see everything laid out neatly in a table, so found I set up complex and comprehensive data structures, only to realise that most if not all the information would have been better in note form.

The key divider is what I am planning to do with the data. Is there something valuable that can be extracted from a data structure? For example, if I have a list of temperatures in a structure, I can more easily find maxima, minima and averages than if those temperatures were recorded in text form in my notes. Similarly, if I have a structured list of contacts, I can much more easily find which belong to the same company or town than I could from unstructured notes.

Another thing I have learnt from the Craft betas is that links and relationships between documents is also a powerful method of providing structure for my information. I don't necessarily need to structure data inside a document, if the documents themselves are well organised.

I will go explore Craft's apprach when it is publicly released, in the near future.