diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c178037..188dcda5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Update documentation and README [(#209)](https://github.com/OpenEnergyPlatform/oemetadata/pull/209) - Move old metadata versions to folder [(#209)](https://github.com/OpenEnergyPlatform/oemetadata/pull/209) +- Update JSON schema from (draft-07) to (Draft 2020-12) [(#212)](https://github.com/OpenEnergyPlatform/oemetadata/pull/212) +- Update all tests [(#212)](https://github.com/OpenEnergyPlatform/oemetadata/pull/212) +- Separate `timeseries - resolution` into `resolutionValue` and `resolutionUnit` [(#213)](https://github.com/OpenEnergyPlatform/oemetadata/pull/213) - Rename URI from `path` to `@id` [(#214)](https://github.com/OpenEnergyPlatform/oemetadata/pull/214) ### Removed diff --git a/docs/metadata/index.md b/docs/metadata/index.md index 41b5d8ec..737050a7 100644 --- a/docs/metadata/index.md +++ b/docs/metadata/index.md @@ -5,10 +5,10 @@ It is an extensive set of metadata based on the [Data Package Standard 2.0](http It is made to facilitate findability, accessibility, interoperability, and reusability (FAIR) of data.
A badge system prioritises the keys and serves as a measure of the completeness and quality of the metadata entries. +The metadata schema is defined in [JSON schema](https://json-schema.org/) version 2020-12.
The metadata contains keys in a nested JSON structure.
-The metadata standard includes the following files - -- [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete schema. +The metadata standard includes the following files: +- [`schema.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/schema.json) contains the complete metadata schema. - [`metadata_key_description.md`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/metadata_key_description.md) contains a full description of each metadata key. - [`template.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/template.json) contains an empty metadata string with all fields. - [`example.json`](https://github.com/OpenEnergyPlatform/oemetadata/blob/production/metadata/latest/example.json) contains a basic metadata example. diff --git a/docs/metadata/metadata_mappings.md b/docs/metadata/metadata_mappings.md index 4b2e5868..2ed1f659 100644 --- a/docs/metadata/metadata_mappings.md +++ b/docs/metadata/metadata_mappings.md @@ -15,7 +15,7 @@ | 11 | languages | Gold | language | optional | [dcat:Distribution / dcterms:language](http://purl.org/dc/terms/language) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-sprache | | 12 | \*\*subject\*\* | | subject | | Datapackage | | | 13 | name | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | -| 14 | path | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | +| 14 | @id | Platinum | | recommended | dcat:Dataset / dcat:theme | https://www.dcat-ap.de/def/dcatde/3.0/spec/#kv-data-theme | | 15 | keywords | Silver | subject | recommended | dcat:Dataset / dcat:keyword | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-schlagwort | | 16 | publicationDate | Bronze | date | optional | dcat:Distribution / dcterms:issued | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-veroffentlichungsdatum | | 17 | \*\*embargoPeriod\*\* | | | | Datapackage | | @@ -51,70 +51,71 @@ | 47 | \*\*timeseries\*\* | | | | Datapackage | | | 48 | start | Silver | | optional | dcterms:PeriodOfTime / time:hasBeginning | https://www.dcat-ap.de/def/dcatde/3.0/spec/#zeitraum-anfang | | 49 | end | Silver | | optional | dcterms:PeriodOfTime / time:hasEnd | https://www.dcat-ap.de/def/dcatde/3.0/spec/#zeitraum-ende | -| 50 | resolution | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | -| 51 | alignment | Gold | | optional | OEP | | -| 52 | aggregationType | Gold | | optional | OEP | | -| 53 | \*\*sources\*\* | | source | | Datapackage | | -| 54 | title | Bronze | | optional | BibTeX title | | -| 55 | author | Bronze | | optional | BibTeX author | | -| 56 | description | Bronze | | optional | BibTeX note | | -| 57 | publicationYear | Bronze | | optional | BibTeX year | | -| 58 | path | Bronze | | optional | BibTeX howpublished | | -| 59 | \*\*licenses\*\* | | | | Datapackage | | -| 60 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | -| 61 | title | Bronze | | optional | OEP | | -| 62 | path | Bronze | | optional | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | -| 63 | instruction | Bronze | | optional | OEP | | -| 64 | attribution | Bronze | | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | -| 65 | copyrightStatement | Bronze | | optional | [dcat:Distribution / dcterms:rights](http://purl.org/dc/terms/accessRights) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-rechte | -| 66 | \*\*licenses\*\* | | rights | | Datapackage | | -| 67 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | -| 68 | title | Bronze | | optional | OEP | | -| 69 | path | Bronze | | mandatory | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | -| 70 | instruction | Bronze | | optional | OEP | | -| 71 | attribution | Bronze | creator | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | -| 72 | \*\*contributors\*\* | | contributor | | Datapackage | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | -| 73 | title | Bronze | | optional | foaf:name | | -| 74 | path | Bronze | | optional | dcat:Dataset / dcterms:contributor | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | -| 75 | organization | Bronze | | optional | foaf:Organization | | -| 76 | roles | Bronze | | optional | dcat:Relationship / dcat:hadRole | https://www.dcat-ap.de/def/dcatde/3.0/spec/#beziehung-rolle | -| 77 | date | Bronze | date | recommended | [dcat:Distribution / dcterms:modified](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum | -| 78 | object | Bronze | | optional | OEP | | -| 79 | comment | Bronze | | optional | OEP | | -| 80 | type | Gold | | | Datapackage | | -| 81 | format | Gold | format | recommended | [dcat:Distribution / dcterms:format](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format | -| 82 | encoding | Gold | | optional | OEP | | -| 83 | \*\*schema\*\* | | | | Datapackage | | -| 84 | \*\*fields\*\* | | | | Datapackage | | -| 85 | name | Iron | | optional | OEP | | -| 86 | description | Silver | | optional | OEP | | -| 87 | type | Iron | | optional | OEP | | -| 88 | nullable | Iron | | optional | OEP | | -| 89 | unit | Silver | | optional | OEP | | -| 90 | \*\*isAbout\*\* | | | | Datapackage | | -| 91 | name | Platinum | | optional | OEP | | -| 92 | path | Platinum | | optional | OEP | | -| 93 | \*\*valueReference\*\* | | | | Datapackage | | -| 94 | value | Platinum | | optional | OEP | | -| 95 | name | Platinum | | optional | OEP | | -| 96 | path | Platinum | | optional | OEP | | -| 97 | primaryKey | Iron | | optional | OEP | | -| 98 | \*\*foreignKeys\*\* | | relation | | Datapackage | | -| 99 | fields | Iron | | optional | OEP | | -| 100 | \*\*reference\*\* | | | | Datapackage | | -| 101 | resource | Iron | | optional | OEP | | -| 102 | fields | Iron | | optional | OEP | | -| 103 | \*\*dialect\*\* | | | | Datapackage | | -| 104 | delimiter | Iron | | optional | OEP | | -| 105 | decimalSeparator | Iron | | optional | OEP | | -| 106 | @id | Platinum | identifier | optional | OEP | | -| 107 | @context | Platinum | | optional | dcat:Distribution / dcterms:conformsTo | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-konform-zu-standard | -| 108 | \*\*review\*\* | | | | Datapackage | | -| 109 | path | | | optional | OEP | | -| 110 | badge | | | optional | OEP | | -| 111 | \*\*metaMetadata\*\* | | | | Datapackage | | -| 112 | metadataVersion | | | optional | OEP | | -| 113 | \*\*metadataLicense\*\* | | | optional | OEP | | -| 114 | name | | | optional | OEP | | -| 115 | title | | | optional | OEP | | -| 116 | path | | | optional | OEP | | \ No newline at end of file +| 50 | resolutionValue | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | +| 51 | resolutionUnit | Silver | | optional | [dcat:Distribution / dcat:temporalResolution](http://www.w3.org/ns/dcat#temporalResolution) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-zeitliche-auflosung | +| 52 | alignment | Gold | | optional | OEP | | +| 53 | aggregationType | Gold | | optional | OEP | | +| 54 | \*\*sources\*\* | | source | | Datapackage | | +| 55 | title | Bronze | | optional | BibTeX title | | +| 56 | author | Bronze | | optional | BibTeX author | | +| 57 | description | Bronze | | optional | BibTeX note | | +| 58 | publicationYear | Bronze | | optional | BibTeX year | | +| 59 | path | Bronze | | optional | BibTeX howpublished | | +| 60 | \*\*licenses\*\* | | | | Datapackage | | +| 61 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | +| 62 | title | Bronze | | optional | OEP | | +| 63 | path | Bronze | | optional | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | +| 64 | instruction | Bronze | | optional | OEP | | +| 65 | attribution | Bronze | | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | +| 66 | copyrightStatement | Bronze | | optional | [dcat:Distribution / dcterms:rights](http://purl.org/dc/terms/accessRights) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-rechte | +| 67 | \*\*licenses\*\* | | rights | | Datapackage | | +| 68 | name | Bronze | | optional | OEP | https://spdx.org/licenses/ | +| 69 | title | Bronze | | optional | OEP | | +| 70 | path | Bronze | | mandatory | [dcat:Distribution / dcterms:license](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-lizenz | +| 71 | instruction | Bronze | | optional | OEP | | +| 72 | attribution | Bronze | creator | optional | [dcat:Distribution / dcatde:licenseAttributionByText](http://dcat-ap.de/def/dcatde/licenseAttributionByText) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-namensnennungstext-by-clauses | +| 73 | \*\*contributors\*\* | | contributor | | Datapackage | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | +| 74 | title | Bronze | | optional | foaf:name | | +| 75 | path | Bronze | | optional | dcat:Dataset / dcterms:contributor | https://www.dcat-ap.de/def/dcatde/3.0/spec/#datensatz-bearbeiter | +| 76 | organization | Bronze | | optional | foaf:Organization | | +| 77 | roles | Bronze | | optional | dcat:Relationship / dcat:hadRole | https://www.dcat-ap.de/def/dcatde/3.0/spec/#beziehung-rolle | +| 78 | date | Bronze | date | recommended | [dcat:Distribution / dcterms:modified](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-aktualisierungsdatum | +| 79 | object | Bronze | | optional | OEP | | +| 80 | comment | Bronze | | optional | OEP | | +| 82 | type | Gold | | | Datapackage | | +| 83 | format | Gold | format | recommended | [dcat:Distribution / dcterms:format](https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format) | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-format | +| 84 | encoding | Gold | | optional | OEP | | +| 85 | \*\*schema\*\* | | | | Datapackage | | +| 86 | \*\*fields\*\* | | | | Datapackage | | +| 87 | name | Iron | | optional | OEP | | +| 88 | description | Silver | | optional | OEP | | +| 89 | type | Iron | | optional | OEP | | +| 90 | nullable | Iron | | optional | OEP | | +| 91 | unit | Silver | | optional | OEP | | +| 92 | \*\*isAbout\*\* | | | | Datapackage | | +| 93 | name | Platinum | | optional | OEP | | +| 94 | @id | Platinum | | optional | OEP | | +| 95 | \*\*valueReference\*\* | | | | Datapackage | | +| 96 | value | Platinum | | optional | OEP | | +| 97 | name | Platinum | | optional | OEP | | +| 98 | @id | Platinum | | optional | OEP | | +| 99 | primaryKey | Iron | | optional | OEP | | +| 100 | \*\*foreignKeys\*\* | | relation | | Datapackage | | +| 101 | fields | Iron | | optional | OEP | | +| 102 | \*\*reference\*\* | | | | Datapackage | | +| 103 | resource | Iron | | optional | OEP | | +| 104 | fields | Iron | | optional | OEP | | +| 105 | \*\*dialect\*\* | | | | Datapackage | | +| 106 | delimiter | Iron | | optional | OEP | | +| 107 | decimalSeparator | Iron | | optional | OEP | | +| 108 | @id | Platinum | identifier | optional | OEP | | +| 109 | @context | Platinum | | optional | dcat:Distribution / dcterms:conformsTo | https://www.dcat-ap.de/def/dcatde/3.0/spec/#distribution-konform-zu-standard | +| 110 | \*\*review\*\* | | | | Datapackage | | +| 111 | path | | | optional | OEP | | +| 112 | badge | | | optional | OEP | | +| 113 | \*\*metaMetadata\*\* | | | | Datapackage | | +| 114 | metadataVersion | | | optional | OEP | | +| 115 | \*\*metadataLicense\*\* | | | optional | OEP | | +| 116 | name | | | optional | OEP | | +| 117 | title | | | optional | OEP | | +| 118 | path | | | optional | OEP | | \ No newline at end of file diff --git a/metadata/v20/v20/build_source/schemas/spatial.json b/metadata/v20/v20/build_source/schemas/spatial.json index 51a4bd16..fc2becf9 100644 --- a/metadata/v20/v20/build_source/schemas/spatial.json +++ b/metadata/v20/v20/build_source/schemas/spatial.json @@ -63,18 +63,18 @@ "title": "Extent URI" }, "resolutionValue": { - "description": "The value of the resolution.", + "description": "The value of the spatial resolution.", "type": ["string", "null"], "examples": ["100"], "badge": "Silver", - "title": "Resolution Value" + "title": "Spatial Resolution Value" }, "resolutionUnit": { - "description": "The unit of the resolution.", + "description": "The unit of the spatial resolution.", "type": ["string", "null"], "examples": ["m"], "badge": "Silver", - "title": "Resolution Unit" + "title": "Spatial Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", diff --git a/metadata/v20/v20/build_source/schemas/temporal.json b/metadata/v20/v20/build_source/schemas/temporal.json index 45612e8c..bf8a008b 100644 --- a/metadata/v20/v20/build_source/schemas/temporal.json +++ b/metadata/v20/v20/build_source/schemas/temporal.json @@ -37,12 +37,19 @@ "title": "Timeseries End", "format": "date-time" }, - "resolution": { - "description": "The time span between individual information points in a time series.", + "resolutionValue": { + "description": "The time span between individual information points in a time series. The value of the resolution.", + "type": ["string", "null"], + "examples": ["15"], + "badge": "Silver", + "title": "Timeseries Resolution Value" + }, + "resolutionUnit": { + "description": "The unit of the temporal resolution.", "type": ["string", "null"], - "examples": ["30 s"], + "examples": ["min"], "badge": "Silver", - "title": "Timeseries Resolution" + "title": "Timeseries Resolution Unit" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", diff --git a/metadata/v20/v20/example.json b/metadata/v20/v20/example.json index 82894131..553c141d 100644 --- a/metadata/v20/v20/example.json +++ b/metadata/v20/v20/example.json @@ -75,7 +75,8 @@ { "start": "2020-01-01T00:00:00+00:00", "end": "2020-01-01T23:59:30+00:00", - "resolution": "30 s", + "resolutionValue": "15", + "resolutionUnit": "min", "alignment": "left", "aggregationType": "current" } diff --git a/metadata/v20/v20/metadata_key_description.md b/metadata/v20/v20/metadata_key_description.md index 31bdbfeb..045b8a5d 100644 --- a/metadata/v20/v20/metadata_key_description.md +++ b/metadata/v20/v20/metadata_key_description.md @@ -97,8 +97,8 @@ If a value is not yet available, use: `ToDo`. | 1.2 | **extent** | An object that describes a covered area or region. | | | | 1.2.1 | name | The name of the region. | Berlin | Silver | | 1.2.2 | @id | A URI reference for the region. | https://www.wikidata.org/wiki/Q64 | Platinum | -| 1.2.3 | resolutionValue | The value of the resolution. | 100 | Silver | -| 1.2.4 | resolutionUnit | The unit of the resolution. | m | Silver | +| 1.2.3 | resolutionValue | The value of the spatial resolution. | 100 | Silver | +| 1.2.4 | resolutionUnit | The unit of the spatial resolution. | m | Silver | | 1.2.5 | boundingBox | The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N]. | [13.08825, 52.33859, 13.76104, 52.6754] | Gold | | 1.2.6 | crs | The Coordinate Reference System, specified as an EPSG code. | EPSG:4326 | Gold | @@ -110,9 +110,10 @@ If a value is not yet available, use: `ToDo`. | 1.2 | **timeseries** | An array that describes the timeseries. | | | | 1.2.1 | start | The start time of a time series. | 2020-01-01T00:00:00+00:00 | Silver | | 1.2.2 | end | The temporal end point of a time series. | 2020-01-01T23:59:30+00:00 | Silver | -| 1.2.3 | resolution | The time span between individual information points in a time series. | 30 s | Silver | -| 1.2.4 | alignment | An indicator of whether timestamps in a time series are to the left, right or in the centre. | left | Silver | -| 1.2.5 | aggregationType | An indicator of whether the values are a sum, an average or a current value. | current | Silver | +| 1.2.3 | resolutionValue | The time span between individual information points in a time series. The value of the resolution. | 30 s | Silver | +| 1.2.4 | resolutionUnit | The unit of the temporal resolution. | 30 s | Silver | +| 1.2.5 | alignment | An indicator of whether timestamps in a time series are to the left, right or in the centre. | left | Silver | +| 1.2.6 | aggregationType | An indicator of whether the values are a sum, an average or a current value. | current | Silver | ### Resource - Sources Keys | # | Key | Description | Example | Badge | diff --git a/metadata/v20/v20/schema.json b/metadata/v20/v20/schema.json index bd0fc0bc..6380313e 100644 --- a/metadata/v20/v20/schema.json +++ b/metadata/v20/v20/schema.json @@ -515,7 +515,7 @@ "title": "Extent URI" }, "resolutionValue": { - "description": "The value of the resolution.", + "description": "The value of the spatial resolution.", "type": [ "string", "null" @@ -524,10 +524,10 @@ "100" ], "badge": "Silver", - "title": "Resolution Value" + "title": "Spatial Resolution Value" }, "resolutionUnit": { - "description": "The unit of the resolution.", + "description": "The unit of the spatial resolution.", "type": [ "string", "null" @@ -536,7 +536,7 @@ "m" ], "badge": "Silver", - "title": "Resolution Unit" + "title": "Spatial Resolution Unit" }, "boundingBox": { "description": "The covered area specified by the coordinates of a bounding box. The format is [minLon, minLat, maxLon, maxLat] or [W,S,E,N].", @@ -624,17 +624,29 @@ "title": "Timeseries End", "format": "date-time" }, - "resolution": { - "description": "The time span between individual information points in a time series.", + "resolutionValue": { + "description": "The time span between individual information points in a time series. The value of the resolution.", "type": [ "string", "null" ], "examples": [ - "30 s" + "15" ], "badge": "Silver", - "title": "Timeseries Resolution" + "title": "Timeseries Resolution Value" + }, + "resolutionUnit": { + "description": "The unit of the temporal resolution.", + "type": [ + "string", + "null" + ], + "examples": [ + "min" + ], + "badge": "Silver", + "title": "Timeseries Resolution Unit" }, "alignment": { "description": "An indicator of whether timestamps in a time series are to the left, right or in the centre.", diff --git a/metadata/v20/v20/template.json b/metadata/v20/v20/template.json index 64a7d7e2..b02ffe4e 100644 --- a/metadata/v20/v20/template.json +++ b/metadata/v20/v20/template.json @@ -68,7 +68,8 @@ { "start": "", "end": "", - "resolution": "", + "resolutionValue": "", + "resolutionUnit": "", "alignment": "", "aggregationType": "" }