{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://geelong.ai/data/schema.json",
  "title": "geelong.ai AI ecosystem map",
  "description": "Organisations, services and key personnel in the Geelong (G21) AI ecosystem, tagged against the GEEMap pillars. Every entity carries one or more reference URLs for traceability.",
  "type": "object",
  "required": [
    "meta",
    "pillars",
    "organisations",
    "services",
    "people",
    "relationships"
  ],
  "$defs": {
    "id": {
      "type": "string",
      "pattern": "^(org|svc|person|pillar)-[a-z0-9-]+$"
    },
    "pillarId": {
      "enum": [
        "markets",
        "talent",
        "funding",
        "networks",
        "civic",
        "support",
        "learning",
        "culture",
        "facilities"
      ]
    },
    "reference": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "title": {
          "type": "string"
        },
        "supports": {
          "type": "string",
          "description": "What this source evidences"
        }
      }
    },
    "references": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/reference"
      }
    }
  },
  "properties": {
    "meta": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "updated": {
          "type": "string",
          "format": "date"
        },
        "scope": {
          "type": "string"
        },
        "method": {
          "type": "string"
        }
      }
    },
    "pillars": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "description"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/pillarId"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "organisations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "type",
          "description",
          "pillars",
          "references"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/id"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "enum": [
              "university",
              "tafe",
              "research-institute",
              "government",
              "company",
              "startup",
              "consultancy",
              "investor",
              "accelerator",
              "network",
              "coworking",
              "nonprofit",
              "industry-body"
            ]
          },
          "description": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "suburb": {
                "type": "string"
              },
              "lga": {
                "enum": [
                  "City of Greater Geelong",
                  "Surf Coast",
                  "Queenscliffe",
                  "Golden Plains",
                  "Colac Otway"
                ]
              },
              "sites": {
                "type": "array",
                "description": "Physical sites in the G21 region where the AI activity happens. Empty for organisations that only fund or deliver programmes into the region.",
                "items": {
                  "type": "object",
                  "required": [
                    "name",
                    "lat",
                    "lon",
                    "precision",
                    "references"
                  ],
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "e.g. 'Waurn Ponds campus'"
                    },
                    "address": {
                      "type": "string"
                    },
                    "lat": {
                      "type": "number",
                      "minimum": -39,
                      "maximum": -37.5
                    },
                    "lon": {
                      "type": "number",
                      "minimum": 143,
                      "maximum": 145
                    },
                    "precision": {
                      "enum": [
                        "address",
                        "building",
                        "street",
                        "suburb"
                      ],
                      "description": "address = geocoded street address; building = named building/campus; street = street found but not the number; suburb = suburb centroid only (approximate)"
                    },
                    "geocoder": {
                      "type": "string",
                      "format": "uri",
                      "description": "Geocoding query URL that produced the coordinates"
                    },
                    "references": {
                      "$ref": "#/$defs/references",
                      "description": "Sources evidencing the address"
                    }
                  }
                }
              }
            }
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "parent": {
            "$ref": "#/$defs/id",
            "description": "Parent organisation, e.g. an institute within a university"
          },
          "pillars": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/$defs/pillarId"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "references": {
            "$ref": "#/$defs/references"
          }
        }
      }
    },
    "services": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "provider",
          "description",
          "pillars",
          "references"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/id"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "$ref": "#/$defs/id"
          },
          "description": {
            "type": "string"
          },
          "pillars": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/$defs/pillarId"
            }
          },
          "cohorts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "references": {
            "$ref": "#/$defs/references"
          }
        }
      }
    },
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "roles",
          "references"
        ],
        "properties": {
          "id": {
            "$ref": "#/$defs/id"
          },
          "name": {
            "type": "string"
          },
          "roles": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "organisation",
                "title"
              ],
              "properties": {
                "organisation": {
                  "$ref": "#/$defs/id"
                },
                "title": {
                  "type": "string"
                }
              }
            }
          },
          "linkedin": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://www\\.linkedin\\.com/in/[^/?#]+/$",
            "description": "Public LinkedIn profile, only when it clearly matches the role above."
          },
          "references": {
            "$ref": "#/$defs/references"
          }
        }
      }
    },
    "relationships": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "source",
          "target",
          "type",
          "references"
        ],
        "properties": {
          "source": {
            "$ref": "#/$defs/id"
          },
          "target": {
            "$ref": "#/$defs/id"
          },
          "type": {
            "enum": [
              "partner",
              "funds",
              "spinout-of",
              "member-of",
              "hosted-by",
              "supports",
              "part-of"
            ]
          },
          "description": {
            "type": "string"
          },
          "references": {
            "$ref": "#/$defs/references"
          }
        }
      }
    }
  }
}
