{
  "$schema": "https://datapackage.org/profiles/2.0/tableschema.json",
  "title": "避難所の運用状況",
  "description": "避難所 1 か所の運用状況のデータです。避難所そのものの基本情報（名称、位置など）は持ちません。指定避難所は、shelter（DesignatedShelter）、externalShelterId、nationalShelterId のどれかで参照します（どれか 1 つは必須）。そのうえに、開設状況と避難者数だけを重ねます。同じ場所の指定緊急避難場所は、site で EvacuationSite を参照します。災害対策基本法第 49 条の 7 に基づいて市町村長が指定する「指定避難所」の運用を想定しています。同法第 49 条の 4 の「指定緊急避難場所」とは別のものです。openingStatus、statusLabel のどれか 1 つは必須です。shelter、externalShelterId、nationalShelterId のどれか 1 つは必須です。",
  "x-type": "EvacuationShelter",
  "x-typeIri": "https://datamodels.jp/ns/disaster/EvacuationShelter",
  "x-version": "1.0.0",
  "x-schema": "https://datamodels.jp/schema/disaster/EvacuationShelter/v1.0.0.json",
  "x-context": "https://datamodels.jp/context/disaster/v1.jsonld",
  "x-translations": {
    "en": {
      "title": "Evacuation shelter operation",
      "description": "Operational overlay for one evacuation shelter. The shelter master data (name, location) is not included: the designated shelter is referenced by shelter (DesignatedShelter) or by externalShelterId / nationalShelterId, and one of the three is required. Only opening status and evacuee counts live here. When the shelter is also a designated emergency evacuation site, site links to its EvacuationSite. Models the operation of a 指定避難所 (designated shelter, Basic Act on Disaster Management Art. 49-7), a distinct legal concept from the 指定緊急避難場所 (designated emergency evacuation site, Art. 49-4). At least one of openingStatus, statusLabel is needed. At least one of shelter, externalShelterId, nationalShelterId is needed."
    }
  },
  "fields": [
    {
      "name": "id",
      "title": "エンティティの ID",
      "description": "エンティティの ID（URI。例：urn:ngsi-ld:EvacuationShelter:001）",
      "type": "string",
      "constraints": {
        "required": true,
        "unique": true
      },
      "x-translations": {
        "en": {
          "title": "Entity id",
          "description": "Entity id: a URI, for example urn:ngsi-ld:EvacuationShelter:001"
        }
      }
    },
    {
      "name": "externalShelterId",
      "title": "市町村の避難所一覧での ID",
      "description": "市町村の避難所一覧での ID（市町村の中で一意）。localGovernmentCode と合わせると全国で一意になります。DesignatedShelter の externalShelterId と同じ ID です。shelter、externalShelterId、nationalShelterId のどれか 1 つは必須です。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/disaster/externalShelterId",
      "x-translations": {
        "en": {
          "description": "The shelter's ID in the municipality's own shelter list (unique within it). Together with localGovernmentCode it is unique nationwide; the same ID as DesignatedShelter's externalShelterId. One of shelter, externalShelterId and nationalShelterId is required"
        }
      }
    },
    {
      "name": "nationalShelterId",
      "title": "全国共通避難所・避難場所 ID",
      "description": "全国共通避難所・避難場所 ID（14 文字。国土地理院のデータの「共通 ID」）。このモデルで使えるのは、種別コード 11（一般の指定避難所）と 12（福祉避難所）だけです。採番されていなければ、空文字にせず属性ごと省きます。ID の構造と出典は、このモデルの対応表「全国共通避難所・避難場所 ID」（gsi-national-shelter-id）にまとめています。shelter、externalShelterId、nationalShelterId のどれか 1 つは必須です。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/disaster/nationalShelterId",
      "constraints": {
        "pattern": "E[0-9]{10}1[12][1-9A-Za-z]"
      },
      "x-translations": {
        "en": {
          "description": "The nationwide common shelter/evacuation-site ID (14 characters, the '共通ID' of GSI's data). Only type codes 11 (general designated shelter) and 12 (welfare shelter) are valid on this model. When none is assigned, leave the property out rather than send an empty string. Its structure and source are described once, in EvacuationShelter's mapping 'nationwide common shelter/evacuation-site ID' (gsi-national-shelter-id). One of shelter, externalShelterId and nationalShelterId is required"
        }
      }
    },
    {
      "name": "localGovernmentCode",
      "title": "一覧を公開する自治体の全国地方公共団体コード",
      "description": "一覧を公開する自治体の全国地方公共団体コード（総務省の「全国地方公共団体コード仕様」（平成 19 年 4 月 1 日）による、検査数字を含む 6 桁）",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/common/localGovernmentCode",
      "constraints": {
        "required": true,
        "pattern": "\\d{6}"
      },
      "x-translations": {
        "en": {
          "description": "Local government code of the municipality that publishes the shelter list (全国地方公共団体コード per MIC's \"全国地方公共団体コード仕様\", 2007-04-01; 6 digits including the check digit)"
        }
      }
    },
    {
      "name": "shelter",
      "title": "この運用状況が対象とする指定避難所",
      "description": "この運用状況が対象とする指定避難所（DesignatedShelter）。shelter、externalShelterId、nationalShelterId のどれか 1 つは必須です。",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/disaster/shelter",
      "x-translations": {
        "en": {
          "title": "The designated shelter",
          "description": "The designated shelter (DesignatedShelter) this operation record is for. One of shelter, externalShelterId and nationalShelterId is required"
        }
      }
    },
    {
      "name": "site",
      "title": "同じ場所にある指定緊急避難場所",
      "description": "同じ場所にある指定緊急避難場所（EvacuationSite）。避難所が指定緊急避難場所を兼ねるときに使います。",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/disaster/site",
      "x-translations": {
        "en": {
          "title": "The designated emergency evacuation site",
          "description": "The designated emergency evacuation site (EvacuationSite) at the same place, when the shelter is also one"
        }
      }
    },
    {
      "name": "openingStatus",
      "title": "正規化した開設状況",
      "description": "正規化した開設状況：open（開設中）、closed（未開設・閉鎖）、full（満員）、requested（開設を依頼・指示されたが、まだ確認できていない）。requested は、公的なコード表や用語集には見当たらない区分です。現場での呼び方も、必ず statusLabel に書きます。合う値がないときは省き、statusLabel だけを送ります。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/disaster/openingStatus",
      "constraints": {
        "enum": [
          "open",
          "closed",
          "full",
          "requested"
        ]
      },
      "x-translations": {
        "en": {
          "title": "Normalised opening state",
          "description": "Normalised opening state: open, closed, full (open but at capacity), requested (opening has been requested/instructed but not yet confirmed open; no public controlled vocabulary defines this state). The local wording always also goes in statusLabel. When no value fits, leave it out and send only statusLabel"
        }
      }
    },
    {
      "name": "statusLabel",
      "title": "現場や元のシステムでの開設状況の呼び方",
      "description": "現場や元のシステムでの開設状況の呼び方（例：未開設、開設中、満員、依頼中）。openingStatus を省いたときは必須です。",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/statusLabel",
      "constraints": {
        "minLength": 1
      },
      "x-translations": {
        "en": {
          "description": "The opening status in the local or source system's wording (e.g. 未開設, 開設中, 満員, 依頼中). Required when openingStatus is left out"
        }
      }
    },
    {
      "name": "evacueeHouseholds",
      "title": "避難世帯数",
      "description": "避難世帯数",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/disaster/evacueeHouseholds",
      "constraints": {
        "minimum": 0
      },
      "x-translations": {
        "en": {
          "title": "Number of evacuated households",
          "description": "Number of evacuated households"
        }
      }
    },
    {
      "name": "evacueeTotal",
      "title": "避難人数合計",
      "description": "避難人数合計",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/disaster/evacueeTotal",
      "constraints": {
        "minimum": 0
      },
      "x-translations": {
        "en": {
          "title": "Total number of evacuees",
          "description": "Total number of evacuees"
        }
      }
    },
    {
      "name": "evacueeFemale",
      "title": "避難人数",
      "description": "避難人数（女）",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/disaster/evacueeFemale",
      "constraints": {
        "minimum": 0
      },
      "x-translations": {
        "en": {
          "title": "Number of female evacuees",
          "description": "Number of female evacuees"
        }
      }
    },
    {
      "name": "evacueeMale",
      "title": "避難人数",
      "description": "避難人数（男）",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/disaster/evacueeMale",
      "constraints": {
        "minimum": 0
      },
      "x-translations": {
        "en": {
          "title": "Number of male evacuees",
          "description": "Number of male evacuees"
        }
      }
    },
    {
      "name": "description",
      "title": "メモ",
      "description": "メモ",
      "type": "string",
      "x-iri": "http://purl.org/dc/terms/description",
      "x-translations": {
        "en": {
          "title": "Free-text memo",
          "description": "Free-text memo"
        }
      }
    },
    {
      "name": "openedAt",
      "title": "開設日時",
      "description": "開設日時",
      "type": "datetime",
      "x-iri": "https://datamodels.jp/ns/disaster/openedAt",
      "x-translations": {
        "en": {
          "title": "Time the shelter opened",
          "description": "Time the shelter opened"
        }
      }
    },
    {
      "name": "closedAt",
      "title": "閉鎖日時",
      "description": "閉鎖日時",
      "type": "datetime",
      "x-iri": "https://datamodels.jp/ns/disaster/closedAt",
      "x-translations": {
        "en": {
          "title": "Time the shelter closed",
          "description": "Time the shelter closed"
        }
      }
    }
  ],
  "primaryKey": [
    "id"
  ],
  "missingValues": [
    ""
  ]
}
