From cf402df31c39c7714467e3d520c2ebd2b4d32e44 Mon Sep 17 00:00:00 2001 From: odscjen Date: Fri, 28 Jul 2023 15:17:22 +0100 Subject: [PATCH 1/4] rdl_schema_0.1.json: fix typos in schema --- schema/rdl_schema_0.1.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/schema/rdl_schema_0.1.json b/schema/rdl_schema_0.1.json index 3d91ae5e..b9692505 100644 --- a/schema/rdl_schema_0.1.json +++ b/schema/rdl_schema_0.1.json @@ -640,7 +640,7 @@ "properties": { "loss": { "title": "Loss dataset metadata", - "description": "Metadata that is specific to datasets that describe the losses associated with people, infrastructure, housing, production capacities and other tangible human assets due to the occurence of one or more hazards.", + "description": "Metadata that is specific to datasets that describe the losses associated with people, infrastructure, housing, production capacities and other tangible human assets due to the occurrence of one or more hazards.", "required": [ "hazard_type", "cost", @@ -851,7 +851,7 @@ "format": { "title": "Format", "type": "string", - "description": "A human-readable descripton of the file format of the resource, taken from the open [data formats codelist]((https://rdl-standard.readthedocs.io/en/{{version}}/references/codelists/#data_formats).", + "description": "A human-readable description of the file format of the resource, taken from the open [data formats codelist](https://rdl-standard.readthedocs.io/en/{{version}}/references/codelists/#data_formats).", "codelist": "data_formats.csv", "openCodelist": true, "minLength": 1 @@ -1373,7 +1373,7 @@ "gazetteerEntries": { "title": "Gazetteer entries", "type": "array", - "description": "Entries from geographical indices or directories describing the geographical area. This field should be used to describe subnational coverage. Use of ISO 3166-2 is recommended.", + "description": "Entries from geographical indices or directories describing the geographical area. This field should be used to describe sub-national coverage. Use of ISO 3166-2 is recommended.", "items": { "$ref": "#/$defs/Gazetteer_entry" }, @@ -1812,12 +1812,12 @@ "occurrence": { "title": "Occurrence", "type": "object", - "description": "The frequency or likelihood of the event happening within a given timeframe.", + "description": "The frequency or likelihood of the event happening within a given time frame.", "properties": { "probabilistic": { "title": "Probabilistic frequency", "type": "object", - "description": "How often the event is expected to occur. Can be Return Period and/or probability. Both fields are provided to allow entry of return period (most common term used across all hazards) and/or probability, which is commonly used for seismic hazard. Probability commonly refers to a probability within 1 year or 50 years, but may be relative to any duration - when `probability` is used, `span` must be specified. You should only use this object when `event_set.analysis_type` = `event_set.analysis_type` = 'probabilistic'", + "description": "How often the event is expected to occur. Can be return period and/or probability. Both fields are provided to allow entry of return period (most common term used across all hazards) and/or probability, which is commonly used for seismic hazard. Probability commonly refers to a probability within 1 year or 50 years, but may be relative to any duration - when `probability` is used, `span` must be specified. You should only use this object when `event_set.analysis_type` = `event_set.analysis_type` = 'probabilistic'", "$ref": "#/$defs/Probabilistic", "minProperties": 1 }, @@ -1827,7 +1827,7 @@ "description": "The period of time over which the event occurred and the associated return period (if any). You should only use this object when `event_set.analysis_type` = 'empirical'", "properties": { "temporal": { - "title": "Temporal occurance", + "title": "Temporal occurrence", "type": "object", "description": "The period of time over which the event occurred.", "$ref": "#/$defs/Period", @@ -1856,7 +1856,7 @@ "thresholds": { "title": "Index thresholds", "type": "array", - "description": "The thresholds used to classify the index value. Each threshold should be a seperate item. Where thresholds are identified by both a number and a descriptor, include the descriptor in brackets, e.g. 1 (low).", + "description": "The thresholds used to classify the index value. Each threshold should be a separate item. Where thresholds are identified by both a number and a descriptor, include the descriptor in brackets, e.g. 1 (low).", "items": { "type": "string", "minLength": 1 @@ -1939,7 +1939,7 @@ }, "type": { "title": "Cost type", - "description": "The type of the cost, from the closed [cost type codelist] (https://rdl-standard.readthedocs.io/en/{{version}}/reference/codelists/#cost_type).", + "description": "The type of the cost, from the closed [cost type codelist](https://rdl-standard.readthedocs.io/en/{{version}}/reference/codelists/#cost_type).", "type": "string", "codelist": "cost_type.csv", "openCodelist": false, @@ -1953,7 +1953,7 @@ "unit": { "title": "Cost unit", "type": "string", - "description": "The unit in which the cost is specified, from the closed [currency codelist] (https://rdl-standard.readthedocs.io/en/{{version}}/reference/codelists/#currency).", + "description": "The unit in which the cost is specified, from the closed [currency codelist](https://rdl-standard.readthedocs.io/en/{{version}}/reference/codelists/#currency).", "codelist": "currency.csv", "openCodelist": false, "enum": [ @@ -2267,7 +2267,7 @@ "Probabilistic": { "title": "Probabilistic frequency", "type": "object", - "description": "How often the event is expected to occur. Can be Return Period and/or probability. Both fields are provided to allow entry of return period (most common term used across all hazards) and/or probability, which is commonly used for seismic hazard. Probability commonly refers to a probability within 1 year or 50 years, but may be relative to any duration - when `probability` is used, `span` must be specified. This object must only be used if `event_set.analysis_type` = 'probabilistic'", + "description": "How often the event is expected to occur. Can be return period and/or probability. Both fields are provided to allow entry of return period (most common term used across all hazards) and/or probability, which is commonly used for seismic hazard. Probability commonly refers to a probability within 1 year or 50 years, but may be relative to any duration - when `probability` is used, `span` must be specified. This object must only be used if `event_set.analysis_type` = 'probabilistic'", "properties": { "return_period": { "title": "Return period", @@ -2294,7 +2294,7 @@ "type": "number", "minimum": 0, "maximum": 1, - "description": "The probability of the event occurring during the time period specified in `.span`, expressed as a number between 0 and 1, e.g. 0.1 represents a 10% likelihood of the event occuring." + "description": "The probability of the event occurring during the time period specified in `.span`, expressed as a number between 0 and 1, e.g. 0.1 represents a 10% likelihood of the event occurring." }, "span": { "title": "Probability span", From 3330f8c43cd2adf69ab6b8bac7d86ccfe4c9e472 Mon Sep 17 00:00:00 2001 From: odscjen Date: Fri, 28 Jul 2023 16:14:25 +0100 Subject: [PATCH 2/4] update codeslist to snake_case formatting --- codelists/closed/frequency_distribution.csv | 4 ++-- codelists/closed/seasonality.csv | 2 +- schema/rdl_schema_0.1.json | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/codelists/closed/frequency_distribution.csv b/codelists/closed/frequency_distribution.csv index 7c4af379..1bbab69a 100644 --- a/codelists/closed/frequency_distribution.csv +++ b/codelists/closed/frequency_distribution.csv @@ -1,4 +1,4 @@ Code,Title,Description poisson,Poisson,Data modelled using a poisson distribution. -negativeBinomial,Negative Binomial,Data modelled using a negative binomial distribution. -userDefined,User defined,Data modelled using a user defined distribution. +negative_binomial,Negative Binomial,Data modelled using a negative binomial distribution. +user_defined,User defined,Data modelled using a user defined distribution. diff --git a/codelists/closed/seasonality.csv b/codelists/closed/seasonality.csv index cf0607f0..e2be6232 100644 --- a/codelists/closed/seasonality.csv +++ b/codelists/closed/seasonality.csv @@ -1,3 +1,3 @@ Code,Title uniform,Uniform -userDefined,User defined +user_defined,User defined diff --git a/schema/rdl_schema_0.1.json b/schema/rdl_schema_0.1.json index 3d91ae5e..2726c144 100644 --- a/schema/rdl_schema_0.1.json +++ b/schema/rdl_schema_0.1.json @@ -1708,8 +1708,8 @@ "openCodelist": false, "enum": [ "poisson", - "negativeBinomial", - "userDefined" + "negative_binomial", + "user_defined" ] }, "seasonality": { @@ -1720,7 +1720,7 @@ "openCodelist": false, "enum": [ "uniform", - "userDefined" + "user_defined" ] }, "calculation_method": { From 28a7ff9cbaf2a682efbcbc7a7dc7071d4e6d89c4 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 31 Jul 2023 15:54:50 +0100 Subject: [PATCH 3/4] update changelog.md --- docs/about/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/about/changelog.md b/docs/about/changelog.md index b15b5ef6..338d6d4a 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -61,6 +61,7 @@ This page lists changes to the Risk Data Library Standard. - [#121](https://github.com/GFDRR/rdl-standard/pull/121) - Create 'frequency_distribution.csv' and 'seasonality.csv' - [#130](https://github.com/GFDRR/rdl-standard/pull/130) - 'hazard_type.csv' add descriptions and hazard category which aligns with UNDRR Hazard taxonomy, and update codes from abbreviations to human-readable words. - [#134](https://github.com/GFDRR/rdl-standard/pull/134) - 'risk_data_type.csv', replace codes with lower-case versions. +- [#164](https://github.com/GFDRR/rdl-standard/pull/164) - replace camelCase codes with snake_case codes in 'frequency_distribution.csv' and 'seasonality.csv' ### Normative documentation From 9f74fa91a785bb7331a29e7d96eb1e13e71107a3 Mon Sep 17 00:00:00 2001 From: odscjen Date: Mon, 31 Jul 2023 15:57:05 +0100 Subject: [PATCH 4/4] update changelog.md --- docs/about/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/about/changelog.md b/docs/about/changelog.md index b15b5ef6..4481ff7b 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -51,6 +51,7 @@ This page lists changes to the Risk Data Library Standard. - Removes `time_start`, `time_end`, `time_year` from `loss`. - Removes `loss_loss_type`, `loss_metric` from `$defs`. - [#127](https://github.com/GFDRR/rdl-standard/pull/127) - Inline `Exposure`, `Hazard_metadata`, `vulnerability`, `Vulnerability_function`, `Fragility_function`, `Occurence`, `Damage_to_loss_function`, `Engineering_demand_function`, `Probability`, `Empirical`, `Deterministic` and `Loss` and rearrange `$defs` +- [#163](https://github.com/GFDRR/rdl-standard/pull/163) - fix typos within rdl_schema_0.1.json ### Codelists