{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artwaste.land/data/navigation-lights/schema.json",
  "title": "Navigation lights, with their characteristics parsed",
  "description": "One row per light in NGA List of Lights Pub. 110 through 116. The identifying and descriptive fields are the publication's; the decomposition of the light's characteristic into rhythm, groups, colours, period and phase sequence is this project's parse of the printed string, and is the reason the dataset exists.",
  "type": "object",
  "required": [
    "id",
    "name",
    "country",
    "structure",
    "lat",
    "lon",
    "range_nm",
    "height_m",
    "rhythm",
    "groups",
    "colours",
    "period_s",
    "phases",
    "multiple",
    "characteristic",
    "period_status"
  ],
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "description": "volume number, feature number and characteristic index, joined. Ours: the publication has no single stable key for a light with several characteristics.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "name": {
      "type": [
        "string",
        "null"
      ],
      "description": "The light's name as printed. Null where the publication prints none.",
      "x-origin": "redistributed",
      "x-source": "src:nga-list-of-lights"
    },
    "country": {
      "type": "string",
      "description": "The geopolitical heading the light is listed under.",
      "x-origin": "redistributed",
      "x-source": "src:nga-list-of-lights"
    },
    "structure": {
      "type": [
        "string",
        "null"
      ],
      "description": "The structure description as printed.",
      "x-origin": "redistributed",
      "x-source": "src:nga-list-of-lights"
    },
    "lat": {
      "type": "number",
      "minimum": -90,
      "maximum": 90,
      "description": "Latitude in decimal degrees, converted by us from the printed degrees and minutes and rounded to five places.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "lon": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "Longitude in decimal degrees, converted as for lat.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "range_nm": {
      "type": [
        "number",
        "null"
      ],
      "description": "Nominal range in nautical miles. WHERE THE PUBLICATION PRINTS SEVERAL RANGES, ONE PER SECTOR, THIS IS THE LARGEST OF THEM: the per-sector ranges are not carried. Null where no range is printed or none parsed.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "height_m": {
      "type": [
        "number",
        "null"
      ],
      "description": "Height above water in metres, taken from the metres half of the printed feet/metres pair and rejected when the two disagree by more than 1.5 m.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "rhythm": {
      "type": "string",
      "description": "The rhythm class parsed from the characteristic (Fl, Oc, Iso, Q, F and the rest).",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "The group counts, as in Fl.(2+1). Empty where the characteristic has no group.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "colours": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Colour letters in printed order: W white, R red, G green, Y yellow, B blue.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "period_s": {
      "type": [
        "number",
        "null"
      ],
      "description": "The period in seconds. Null where the publication prints none; period_status says which kind of absence it is.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "phases": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "required": [
          "fl",
          "ec"
        ],
        "additionalProperties": false,
        "properties": {
          "fl": {
            "type": [
              "number",
              "null"
            ],
            "description": "Seconds lit."
          },
          "ec": {
            "type": [
              "number",
              "null"
            ],
            "description": "Seconds dark. NULL ON AN ALTERNATING LIGHT, which changes colour instead of going dark, so no eclipse exists to give a duration to. Exactly one row in this release is of that kind."
          }
        }
      },
      "description": "The reconstructed flash/eclipse sequence within one period, in seconds. Null where no period is known. This is the field the instrument blinks on screen.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "multiple": {
      "type": "integer",
      "minimum": 1,
      "description": "How many characteristics this feature number carries in the publication.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    },
    "characteristic": {
      "type": "string",
      "description": "The characteristic string as printed, which is what the parse above was derived from.",
      "x-origin": "redistributed",
      "x-source": "src:nga-list-of-lights"
    },
    "period_status": {
      "type": "string",
      "enum": [
        "printed",
        "definitionally-absent",
        "missing"
      ],
      "description": "printed: a period is given. definitionally-absent: the rhythm (F, Q, VQ, UQ, IQ, IVQ) does not take one. missing: a period should be there and is not. The three-way split is our editorial judgement, not the publication's.",
      "x-origin": "built",
      "x-source": "src:aw-characteristic-parse"
    }
  }
}
