MurmurationsNetwork / MurmurationsProtocol

Murmurations is a distributed data sharing protocol
https://murmurations.network
GNU General Public License v3.0
10 stars 1 forks source link

Draft overview of Fields and Schemas #8

Closed geoffturk closed 3 years ago

geoffturk commented 4 years ago

Includes #7

Here's some text which can be the basis of the documentation:


A schema is a group of data points (fields) that together provide information that is useful to aggregators who present that data in meaningful ways.

Fields

A field can contain a single item of data, such as an organization's name:

"legalName": "Greenfarm Co-op"

a date of creation:

"foundingDate": "2010-09-10"

or a number of staff members.

"numberOfEmployees": 88

Alternatively a field could hold more complex structures such as a list of items:

"itemListElement": [
    "carrots",
    "lettuce",
    "apples",
    "cherries",
    "broccoli"
  ]

or an object composed of many different fields.

"address": {
  "streetAddress": "123 Country Lane",
  "addressLocality": "Pleasantville",
  "addressRegion": "Comfortshire",
  "addressCountry": "Loveland"
}

Every field needs to have context, that is, some definition that provides a clear meaning for the data it holds. The Murmurations Protocol leverages widely accepted field definitions whenever possible, using established vocabularies.

{
  "@context": {
      "legalName": "http://schema.org/legalName",
      "foundingDate": "https://schema.org/foundingDate",
      "numberOfEmployees": "https://schema.org/numberOfEmployees"
  }
}

However if suitable definitions do not exist to describe fields correctly, it is possible to create new vocabularies and use them, provided there is a URL where it is described.

geoffturk commented 3 years ago

This has been resolved with MurmurationsNetwork/MurmurationsLibrary/pull/7

See the README.