Skip to content

Commit 7ecdac2

Browse files
schema: Make exposure an array of exposure_items
1 parent 77e263f commit 7ecdac2

File tree

4 files changed

+59
-43
lines changed

4 files changed

+59
-43
lines changed

docs/about/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ This page lists changes to the Risk Data Library Standard.
4242
- `Event.footprint`
4343
- `Event_set.temporal`
4444
- `Event_set.spatial`
45+
- [#408](https://github.com/GFDRR/rdl-standard/pull/408) - Make `exposure` an array of `Exposure_items`.
4546

4647
### Codelists
4748

docs/reference/codelists.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ open:
556556

557557
This codelist is referenced by the following properties:
558558

559-
- [`exposure/category`](rdls_schema.json,/properties/exposure,category)
559+
560560
- [`Losses/category`](rdls_schema.json,/$defs/Losses,category)
561561
- [`Function/category`](rdls_schema.json,/$defs/Function,category)
562562

docs/reference/schema.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ The following table lists all exposure component fields:
385385
```{jsonschema} ../../docs/_readthedocs/html/rdls_schema.json
386386
---
387387
pointer: /properties/exposure
388-
collapse: metrics
389388
addtargets:
390389
---
391390
```
@@ -1054,7 +1053,7 @@ jsonpointer: /$defs/Metric/description
10541053

10551054
This sub-schema is referenced by the following properties:
10561055

1057-
- [`exposure/metrics`](rdls_schema.json,/properties/exposure,metrics)
1056+
10581057

10591058
Each `Metric` has the following fields:
10601059

schema/rdls_schema.json

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -194,47 +194,12 @@
194194
},
195195
"exposure": {
196196
"title": "Exposure metadata",
197-
"type": "object",
197+
"type": "array",
198198
"description": "Metadata that is specific to datasets that describe the situation of people, infrastructure, housing, production capacities and other tangible human assets located in hazard-prone areas.",
199-
"required": [
200-
"category",
201-
"metrics"
202-
],
203-
"properties": {
204-
"category": {
205-
"title": "Exposure category",
206-
"description": "The category of the exposed assets, from the closed [exposure_category codelist](https://docs.riskdatalibrary.org/en/{{version}}/reference/codelists/#exposure-category).",
207-
"type": "string",
208-
"codelist": "exposure_category.csv",
209-
"openCodelist": false,
210-
"enum": [
211-
"agriculture",
212-
"buildings",
213-
"infrastructure",
214-
"population",
215-
"natural_environment",
216-
"economic_indicator",
217-
"development_index"
218-
]
219-
},
220-
"taxonomy": {
221-
"title": "Exposure taxonomy scheme",
222-
"type": "string",
223-
"description": "The name of the taxonomy scheme used to create descriptive individual asset feature strings within the dataset.",
224-
"minLength": 1
225-
},
226-
"metrics": {
227-
"title": "Exposure metrics",
228-
"type": "array",
229-
"description": "The measurements used to quantify the extent to which assets are exposed.",
230-
"items": {
231-
"$ref": "#/$defs/Metric"
232-
},
233-
"minItems": 1,
234-
"uniqueItems": true
235-
}
199+
"items": {
200+
"$ref": "#/$defs/Exposure_item"
236201
},
237-
"minProperties": 1
202+
"minItems": 1
238203
},
239204
"vulnerability": {
240205
"title": "Vulnerability metadata",
@@ -3100,7 +3065,58 @@
31003065
}
31013066
}
31023067
]
3068+
},
3069+
"Exposure_item": {
3070+
"title": "Exposure item",
3071+
"type": "object",
3072+
"description": "Information about a specific category of exposed assets.",
3073+
"required": [
3074+
"id",
3075+
"category",
3076+
"metrics"
3077+
],
3078+
"properties": {
3079+
"id": {
3080+
"title": "Exposure item identifier",
3081+
"type": "string",
3082+
"description": "A locally unique identifier for this exposure item.",
3083+
"minLength": 1
3084+
},
3085+
"category": {
3086+
"title": "Exposure category",
3087+
"description": "The category of the exposed assets, from the closed [exposure_category codelist](https://docs.riskdatalibrary.org/en/{{version}}/reference/codelists/#exposure-category).",
3088+
"type": "string",
3089+
"codelist": "exposure_category.csv",
3090+
"openCodelist": false,
3091+
"enum": [
3092+
"agriculture",
3093+
"buildings",
3094+
"infrastructure",
3095+
"population",
3096+
"natural_environment",
3097+
"economic_indicator",
3098+
"development_index"
3099+
]
3100+
},
3101+
"taxonomy": {
3102+
"title": "Exposure taxonomy scheme",
3103+
"type": "string",
3104+
"description": "The name of the taxonomy scheme used to create descriptive individual asset feature strings within the dataset.",
3105+
"minLength": 1
3106+
},
3107+
"metrics": {
3108+
"title": "Exposure metrics",
3109+
"type": "array",
3110+
"description": "The measurements used to quantify the extent to which assets are exposed.",
3111+
"items": {
3112+
"$ref": "#/$defs/Metric"
3113+
},
3114+
"minItems": 1,
3115+
"uniqueItems": true
3116+
}
3117+
},
3118+
"minProperties": 1
31033119
}
31043120
},
31053121
"minProperties": 1
3106-
}
3122+
}

0 commit comments

Comments
 (0)