diff --git a/.github/workflows/metadata-test.yml b/.github/workflows/metadata-test.yml new file mode 100644 index 00000000..93b7fc84 --- /dev/null +++ b/.github/workflows/metadata-test.yml @@ -0,0 +1,39 @@ +# https://github.com/actions/runner +# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions#understanding-the-workflow-file +# https://docs.github.com/pt/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions +# https://github.com/actions/virtual-environments#available-environments +# ubuntu-latest, ubuntu-18.04, or ubuntu-16.04 +# windows-latest or windows-2019 +# macos-latest or macos-10.15 +name: Automated tests + +on: + push: + branches: [ develop, master] + pull_request: + branches: [ develop, master ] + +jobs: + test: + runs-on: ubuntu-latest + env: + TOXENV: py3 + name: metadata-tests + strategy: + matrix: + python-version: + - 3.6 + - 3.7 + steps: + - name: Check out source repository + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test metadata + run: tox -v \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 851472bc..8e00af06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,22 @@ Here is a template for new release sections ### Changed +## [1.5.0] - Release + +### Added +- Add keys for linked data compatibility: ``@context``, ``@id``, ``subject``, ``is_about``, ``value_reference`` +- Add context.json file + +### Changed +- Delete future directory +- Clarify instructions for dealing with non-applicable keys (null) and missing values ("todo") +- Make key 13.2 ``timeseries`` a list +- Relocate development information from README.md to CONTRIBUTING.md +- Add licence information to README.md +- Update all .json files to v1.5.0 +- reintroduce automated tests (CI) by switching form travis-ci to github actions [PR#63] +- Updated schema.json for v1.5.0 now includes the new key "title" which describes the title of the curent field [PR#56] adapted from [PR#43] + ## [1.4.1] - Minor release 2021-01-14 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2456fc1f..47746f3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,12 +48,35 @@ it through first). #### Step 3: Run tests locally -To run tests locally, install the dependencies +To run tests locally, + +1. create virtualenv in root folder of repo + +```bash +python -m venv venv +``` + +2. Activate virtualenv + + Linux: + + ```bash + . venv/bin/activate + ``` + + Windows: + + ```bash + . venv/Scripts/activate + ``` + +3. Install requirements + ```bash pip install -r requirements.txt ``` -1. Integration/unit tests +4. Integration/unit tests ```bash pytest ``` @@ -61,7 +84,7 @@ pip install -r requirements.txt ```bash tox -v ``` -2. Linting tests +5. Linting tests ```bash flake8 ``` @@ -98,3 +121,15 @@ In the `.travis.yml` file are many options commented out, you can have very complexe schemes to test on many different python versions etc. For more information look at Travis [doc](https://docs.travis-ci.com/user/languages/python/) for python. + +### If a Python interpreter version is missing: + +Linux (Ubuntu): + +``` +sudo add-apt-repository ppa:deadsnakes/ppa +sudo apt-get update +# Install only missing interpreters: +sudo apt-get install python3.6 +sudo apt-get install python3.7 +``` \ No newline at end of file diff --git a/README.md b/README.md index 6e0323e8..c2c793eb 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,25 @@ -OpenEnergyPlatform +[![Build Status](https://travis-ci.org/OpenEnergyPlatform/oemetadata.svg?branch=develop)](https://travis-ci.org/OpenEnergyPlatform/oemetadata) -# Open Energy Family - Metadata +OpenEnergyMetadata +OpenEnergyPlatform -OEF metadata schemata, examples and templates package +# Open Energy Family - Open Energy Metadata (OEM) + +Open Energy Metadata (OEM) is an energy metadata standard including a template, examples and a metadata schema. +It is an extensive set of metadata based on the tabular data package specifications and the FAIR principles. +The metadata contains multiple fields (keys) in a nested JSON structure. + +You can find the latest version right here: +* [template.json](./metadata/latest/template.json) contains an empty metadata string +* [metadata_key_description.md](./metadata/latest/metadata_key_description.md) contains a description of each metadata key +* [example.json](./metadata/latest/example.json) contains a basic metadata example -[![Build Status](https://travis-ci.org/OpenEnergyPlatform/oemetadata.svg?branch=develop)](https://travis-ci.org/OpenEnergyPlatform/oemetadata) ## License / Copyright -This repository is licensed under [MIT License (MIT)](https://spdx.org/licenses/MIT.html) +This repository is licensed under [MIT License (MIT)](https://spdx.org/licenses/MIT.html)
+The oemetadata is licensed under [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/)
+The oemetadata example and oemetadata template are licensed under [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/) ## Installation @@ -17,77 +28,28 @@ This repository is licensed under [MIT License (MIT)](https://spdx.org/licenses/ ## Usage Examples ``` -from oemetadata.v140.example import OEMETADATA_V140_EXAMPLE - -print(OEMETADATA_V140_EXAMPLE) -``` +from metadata.v150.example import OEMETADATA_v150_EXAMPLE +print(OEMETADATA_v150_EXAMPLE) ``` -from oemetadata.v140.schema import OEMETADATA_V140_SCHEMA -print(OEMETADATA_V140_SCHEMA) ``` +from metadata.v150.schema import OEMETADATA_v150_SCHEMA +print(OEMETADATA_v150_SCHEMA) ``` -from oemetadata.v140.template import OEMETADATA_V140_TEMPLATE -print(OEMETADATA_V140_TEMPLATE) ``` +from metadata.v150.template import OEMETADATA_v150_TEMPLATE -## Open Energy Metadata description - -The OEMeta data contains multiple fields/keys in a nested JSON data structure. We [describe](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/latest/metadata_key_description.md) -each field/key and update the description for each release if necessary! - -## Development - -### Example for activating virtualenv and install development dependencies: - -1. Create virtualenv in root folder of repo - -`python -m venv venv` - -2. Activate virtualenv - - Linux: - - `. venv/bin/activate` - - Windows: - - `. venv/Scripts/activate` - -3. Install requirements - -`pip install -r requirements.txt` - -### Run tests locally (after above steps): - -Short: - -`pytest` - -Complete: - -`tox -v` - -### If a Python interpreter version is missing: - -Linux (Ubuntu): - -``` -sudo add-apt-repository ppa:deadsnakes/ppa -sudo apt-get update -# Install only missing interpreters: -sudo apt-get install python3.6 -sudo apt-get install python3.7 +print(OEMETADATA_v150_TEMPLATE) ``` -### Contributing +## Contributing For further contributing infos and conventions see: [CONTRIBUTING.md](./CONTRIBUTING.md) -### Make PyPI release: +## Make PyPI release: First bump version in setup.py, then: diff --git a/metadata/future/README.md b/metadata/future/README.md deleted file mode 100644 index 3b068b1d..00000000 --- a/metadata/future/README.md +++ /dev/null @@ -1,9 +0,0 @@ -OpenEnergyPlatform - -# Open Energy - Metadata Current - -This version of the OEM represents the current version of the OEM. This includes all developments that -staged for the next/future release. Note that this version may not be fully integrated into the OEP, we -recommend that you use the version presented in the oemetadata-latest-release folder. - -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CHANGELOG.md). \ No newline at end of file diff --git a/metadata/future/json-ld/turbine_metadata.jsonld b/metadata/future/json-ld/turbine_metadata.jsonld deleted file mode 100644 index 92dd700b..00000000 --- a/metadata/future/json-ld/turbine_metadata.jsonld +++ /dev/null @@ -1,451 +0,0 @@ -{ - "@context": "https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld", - "name": "wind_turbine_library", - "title": "Wind Turbine Library", - "id": "https://openenergy-platform.org/dataedit/view/supply/wind_turbine_library", - "@id": "https://databus.dbpedia.org/denis/lod-geoss-example/api-example/2021-05-10/api-example_type=turbineData.json", - "description": "A collection of the most common wind turbines with information on capacity, power curves and other parameters available from specification sheets", - "subject": "oeo:OEO_00000448", - "language": [ - "en-GB", - "en-US", - "de-DE" - ], - "keywords": [ - "windpower, wind, powercurve, electricity" - ], - "publicationDate": "2019-08-13", - "context": { - "homepage": "https://openfredproject.wordpress.com/", - "documentation": null, - "sourceCode": null, - "contact": "Christian.Hofmann@rl-institut.de", - "grantNo": "0324006A", - "fundingAgency": "Bundesministerium für Wirtschaft und Energie", - "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", - "publisherLogo": "https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png" - }, - "spatial": { - "location": null, - "extent": null, - "resolution": null - }, - "temporal": { - "referenceDate": "2018-11-01", - "timeseries": { - "start": null, - "end": null, - "resolution": null, - "alignment": null, - "aggregationType": null - } - }, - "sources": [ - { - "title": "Enercon GmbH", - "description": "Wind energy company, Website offering wind turbine powercurves", - "path": "https://www.enercon.de/en/products/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "windenergie-im-binnenland.de", - "description": "Website offering windenergy powercurves by turbuine type", - "path": "http://www.windenergie-im-binnenland.de/powercurve.php", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "Nordex SE", - "description": "Wind turbine provider, Website offering wind turbine powercurves", - "path": "http://www.nordex-online.com/de/produkte-service/windenergieanlagen/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "wind-turbine-models.com", - "description": "Portal about wind-power turbines and types, Website offering wind turbine powercurves", - "path": "https://www.wind-turbine-models.com/turbines", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "thewindpower.net", - "description": "Wind energy market intelligence, Website offering wind turbine powercurves", - "path": "https://www.thewindpower.net/index.php", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "Acciona S.A.", - "description": "Infrastructure and renewable energy provider, Website offering wind turbine powercurves", - "path": "https://www.acciona-energia.com/areas-of-activity/wind-power/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "Vestas Wind Systems A/S", - "description": "Wind turbine provider", - "path": "https://www.vestas.com/en/products", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "GE Renewable Energy", - "description": "Renewable powerplant provider, Website offering wind turbine powercurves", - "path": "https://www.ge.com/renewableenergy/wind-energy", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "Senvion S.A.", - "description": "Wind turbine provider, Website offering wind turbine powercurves", - "path": "https://www.senvion.com/global/en/products-services/wind-turbines/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "VENSYS Energy AG", - "description": "Wind turbine provider, Website offering wind turbine powercurves", - "path": "https://www.vensys.de/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "eno energy GmbH", - "description": "Wind turbine provider, Website offering wind turbine powercurves", - "path": "https://www.eno-energy.com", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - }, - { - "title": "MHI Vestas Offshore Wind A/S", - "description": "Wind turbine provider, Website offering wind turbine powercurves", - "path": "http://www.mhivestasoffshore.com/products-services/", - "licenses": [ - { - "name": null, - "title": null, - "path": null, - "instruction": null, - "attribution": null - } - ] - } - ], - "licenses": [ - { - "name": "ODbL-1.0", - "title": "Open Data Commons Open Database License 1.0", - "path": "https://opendatacommons.org/licenses/odbl/1.0/", - "instruction": "You are free: To Share, To Create, To Adapt; As long as you: Attribute, Share-Alike, Keep open!", - "attribution": "© Reiner Lemoine Institut" - } - ], - "contributors": [ - { - "title": "Malte Petersen", - "email": null, - "date": "2018-11-01", - "object": null, - "comment": "Prepared the dataset" - }, - { - "title": "Christian Hofmann", - "email": "christian.hofmann@rl-institut.de", - "date": "2019-04-09", - "object": "Upload, Metadata", - "comment": "reworked, fixed, added metadata and uploaded everything" - }, - { - "title": "Jonas Huber", - "email": "jonas.huber@rl-institut.de", - "date": "2019-08-05", - "object": "Metadata", - "comment": "Update string to metadata v1.4" - }, - { - "title": "Ludee", - "email": null, - "date": "2020-03-23", - "object": "Metadata", - "comment": "Update and publish metadata" - } - ], - "resources": [ - { - "profile": "tabular-data-resource", - "name": "supply.turbine_library", - "path": "https://openenergy-platform.org/dataedit/view/supply/turbine_library", - "format": "PostgreSQL", - "encoding": "UTF-8", - "schema": { - "fields": [ - { - "name": "id", - "description": "unambiguous unique number for table entry", - "type": "bigint", - "unit": null - }, - { - "name": "turbine_id", - "description": "unambiguous unique number for turbine", - "type": "bigint", - "unit": null - }, - { - "name": "name", - "description": "Turbine name as in product description of manufacturer", - "type": "text", - "unit": null - }, - { - "name": "turbine_type", - "description": "Turbine name for all manufacturers in a consistent Format", - "type": "text", - "unit": null - }, - { - "name": "installed_capacity", - "description": "installed capacity of turbine", - "type": "bigint", - "about": "oeo:OEO_00230002", - "unit": "kW" - }, - { - "name": "rotor_diameter", - "description": "diameter of installed rotor", - "type": "numeric", - "unit": "m" - }, - { - "name": "rotor_area", - "description": "Area covered by rotating rotor", - "type": "numeric", - "unit": "m²" - }, - { - "name": "hub_height", - "description": "Height of turbine hub. Several possible heights separated by semicolon ", - "type": "text", - "unit": "m" - }, - { - "name": "max_speed_drive", - "description": "maximum rotational speed", - "type": "numeric", - "unit": "revolutions per minute" - }, - { - "name": "wind_class_iec", - "description": "wind class conforming to IEC Standard", - "type": "text", - "unit": null - }, - { - "name": "wind_zone_dibt", - "description": "Suitable wind zone(s) according to DIBt", - "type": "text", - "unit": null - }, - { - "name": "power_density", - "description": "Nominal power per rotor area", - "type": "numeric", - "unit": "W/m²" - }, - { - "name": "power_density_2", - "description": "Reciprocal nominal power per rotor area", - "type": "numeric", - "unit": "m²/kW" - }, - { - "name": "calculated", - "description": "Boolean information if specifications were calculated rather than measured", - "type": "boolean", - "unit": null - }, - { - "name": "has_power_curve", - "description": "Boolean information whether power curve is available", - "type": "boolean", - "unit": null - }, - { - "name": "power_curve_wind_speeds", - "description": "List of wind speeds in accordance with list of values for power curve. The two colums represent the power curve for each turbine", - "type": "text", - "unit": "m/s" - }, - { - "name": "power_curve_values", - "description": "List of power values in accordance to wind speeds of power_curve_wind_speeds", - "type": "text", - "unit": "kW" - }, - { - "name": "has_cp_curve", - "description": "Boolean information whether power coefficient curve is available", - "type": "boolean", - "unit": null - }, - { - "name": "power_coefficient_curve_wind_speeds", - "description": "List of wind speeds in accordance with list of values for power coefficient curve. The two colums represent the power coefficient curve for each turbine", - "type": "text", - "unit": "m/s" - }, - { - "name": "power_coefficient_curve_values", - "description": "List of power coefficient values in accordance to wind speeds of power_coefficient_curve_wind_speeds", - "type": "text", - "unit": "kW" - }, - { - "name": "has_ct_curve", - "description": "Boolean information whether thrust coefficient curve is available", - "type": "boolean", - "unit": null - }, - { - "name": "thrust_coefficient_curve_wind_speeds", - "description": "List of wind speeds in accordance with list of values for thrust coefficient curve. The two colums represent the thrust coefficient curve for each turbine", - "type": "text", - "unit": "m/s" - }, - { - "name": "thrust_coefficient_curve_values", - "description": "List of thrust coefficient values in accordance to wind speeds of thrust_coefficient_curve_wind_speeds", - "type": "text", - "unit": "kW" - }, - { - "name": "source", - "description": "Source of the information within a particular row", - "type": "text", - "unit": null - } - ], - "primaryKey": [ - "id" - ], - "foreignKeys": [ - { - "fields": [ - null - ], - "reference": { - "resource": null, - "fields": [ - null - ] - } - } - ] - }, - "dialect": { - "delimiter": "fixme", - "decimalSeparator": "." - } - } - ], - "review": { - "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues/26", - "badge": "Silver" - }, - "metaMetadata": { - "metadataVersion": "OEP-1.4.0", - "metadataLicense": { - "name": "CC0-1.0", - "title": "Creative Commons Zero v1.0 Universal", - "path": "https://creativecommons.org/publicdomain/zero/1.0/" - } - }, - "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", - "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", - "units": "Use a space between numbers and units (100 m)", - "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", - "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" - } -} \ No newline at end of file diff --git a/metadata/future/template.json b/metadata/future/template.json deleted file mode 100644 index 1c7a7e8e..00000000 --- a/metadata/future/template.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "name": "", - "title": "", - "id": "", - "description": "", - "language": [ - "" - ], - "keywords": [ - "" - ], - "publicationDate": "", - "context": { - "homepage": "", - "documentation": "", - "sourceCode": "", - "contact": "", - "grantNo": "", - "fundingAgency": "", - "fundingAgencyLogo": "", - "publisherLogo": "" - }, - "spatial": { - "location": "", - "extent": "", - "resolution": "" - }, - "temporal": { - "referenceDate": "", - "timeseries": { - "start": "", - "end": "", - "resolution": "", - "alignment": "", - "aggregationType": "" - } - }, - "sources": [ - { - "title": "", - "description": "", - "path": "", - "licenses": [ - { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" - } - ] - }, - { - "title": "", - "description": "", - "path": "", - "licenses": [ - { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" - } - ] - } - ], - "licenses": [ - { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" - } - ], - "contributors": [ - { - "title": "", - "email": "", - "date": "", - "object": "", - "comment": "" - }, - { - "title": "", - "email": "", - "date": "", - "object": "", - "comment": "" - } - ], - "resources": [ - { - "profile": "", - "name": "", - "path": "", - "format": "", - "encoding": "", - "schema": { - "fields": [ - { - "name": "", - "description": "", - "type": "", - "unit": "" - }, - { - "name": "", - "description": "", - "type": "", - "unit": "" - } - ], - "primaryKey": [ - "" - ], - "foreignKeys": [ - { - "fields": [ - "" - ], - "reference": { - "resource": "", - "fields": [ - "" - ] - } - } - ] - }, - "dialect": { - "delimiter": "", - "decimalSeparator": "." - } - } - ], - "review": { - "path": "", - "badge": "" - }, - "metaMetadata": { - "metadataVersion": "OEP-1.4.0", - "metadataLicense": { - "name": "CC0-1.0", - "title": "Creative Commons Zero v1.0 Universal", - "path": "https://creativecommons.org/publicdomain/zero/1.0/" - } - }, - "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", - "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", - "units": "Use a space between numbers and units (100 m)", - "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", - "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" - } -} \ No newline at end of file diff --git a/metadata/latest/README.md b/metadata/latest/README.md index 6386be5d..dee9fa23 100644 --- a/metadata/latest/README.md +++ b/metadata/latest/README.md @@ -1,8 +1,16 @@ -OpenEnergyPlatform +OpenEnergyMetadata +OpenEnergyPlatform -# Open Energy - Metadata Latest-Release + +# Open Energy Metadata (OEM) - Latest-Release This version of the OEM represents the latest released version. This release is fully integrated into the OEP. -For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/CHANGELOG.md). +The OEM contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/CHANGELOG.md). diff --git a/metadata/latest/context.jsonld b/metadata/latest/context.json similarity index 100% rename from metadata/latest/context.jsonld rename to metadata/latest/context.json diff --git a/metadata/latest/example.json b/metadata/latest/example.json index e21d72e8..07dde3c2 100644 --- a/metadata/latest/example.json +++ b/metadata/latest/example.json @@ -1,8 +1,9 @@ { - "name": "oep_metadata_table_example_v141", - "title": "Good example title", - "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v141", + "name": "oep_metadata_table_example_v150", + "title": "Example title for metadata example - Version 1.5.0", + "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v150", "description": "example metadata for example data", + "subject": null, "language": [ "en-GB", "en-US", @@ -14,15 +15,15 @@ "template", "test" ], - "publicationDate": "2018-06-12", + "publicationDate": "2021-11-15", "context": { - "homepage": "https://reiner-lemoine-institut.de/szenariendb/", - "documentation": "https://github.com/OpenEnergyPlatform/organisation/wiki/metadata", - "sourceCode": "https://github.com/OpenEnergyPlatform/examples/tree/master/metadata", + "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", + "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/master", "contact": "https://github.com/Ludee", - "grantNo": "03ET4057", + "grantNo": "03EI1005", "fundingAgency": "Bundesministerium für Wirtschaft und Energie", - "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", + "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3", "publisherLogo": "https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png" }, "spatial": { @@ -32,13 +33,21 @@ }, "temporal": { "referenceDate": "2016-01-01", - "timeseries": { + "timeseries": [{ "start": "2017-01-01T00:00+01", "end": "2017-12-31T23:00+01", "resolution": "1 h", "alignment": "left", "aggregationType": "sum" + }, + { + "start": "2018-01-01T00:00+01", + "end": "2019-06-01T23:00+01", + "resolution": "15 min", + "alignment": "right", + "aggregationType": "sum" } + ] }, "sources": [ { @@ -184,13 +193,20 @@ "date": "2019-07-09", "object": "metadata", "comment": "Release metadata version OEP-1.3.0" + }, + { + "title": "Ludee", + "email": null, + "date": "2021-11-15", + "object": "metadata", + "comment": "Release metadata version OEP-1.5.0" } ], "resources": [ { "profile": "tabular-data-resource", - "name": "model_draft.oep_metadata_table_example_v141", - "path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v141", + "name": "model_draft.oep_metadata_table_example_v150", + "path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v150", "format": "PostgreSQL", "encoding": "UTF-8", "schema": { @@ -199,24 +215,40 @@ "name": "id", "description": "Unique identifier", "type": "serial", + "is_about": null, + "value_reference": null, + "unit": null + }, + { + "name": "name", + "description": "Example name", + "type": "text", + "is_about": null, + "value_reference": null, "unit": null }, { "name": "year", "description": "Reference year", "type": "integer", + "is_about": null, + "value_reference": null, "unit": null }, { "name": "value", "description": "Example value", "type": "double precision", + "is_about": null, + "value_reference": null, "unit": "MW" }, { "name": "geom", "description": "Geometry", "type": "geometry(Point, 4326)", + "is_about": null, + "value_reference": null, "unit": null } ], @@ -243,12 +275,14 @@ } } ], + "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/30887e4cd7dabc316d1ee674791f0cc815277e38/metadata/latest/context.json", "review": { - "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/wiki", + "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "platin" }, "metaMetadata": { - "metadataVersion": "OEP-1.4.1", + "metadataVersion": "OEP-1.5.0", "metadataLicense": { "name": "CC0-1.0", "title": "Creative Commons Zero v1.0 Universal", @@ -256,12 +290,13 @@ } }, "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", + "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata)", "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "units": "Use a space between numbers and units (100 m)", "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" + "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/master/data-review/manual/review_manual.md)", + "null": "If not applicable use: null", + "todo": "If a value is not yet available, use: todo" } } \ No newline at end of file diff --git a/metadata/latest/example.py b/metadata/latest/example.py index 6a1960dd..75f18fe1 100644 --- a/metadata/latest/example.py +++ b/metadata/latest/example.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V141_EXAMPLE = json.loads(f.read()) + OEMETADATA_V150_EXAMPLE = json.loads(f.read()) diff --git a/metadata/latest/metadata_key_description.md b/metadata/latest/metadata_key_description.md index c46ca0a1..53e82bfc 100644 --- a/metadata/latest/metadata_key_description.md +++ b/metadata/latest/metadata_key_description.md @@ -2,98 +2,105 @@ ## Open Energy Metadata Description -This pages describes the OEP Metadata version 1.4.1 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v141/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v141/example.json) of a metadata string. +This pages describes the OEP Metadata version 1.5.0. You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v150/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v150/example.json) of the metadata string. ### Table with all Metadata keys and a short description |#|Key |Description |Example | |---|---|---|---| -| 1 | name | File name or database table name | oep_metadata_table_example_v14 | +| 1 | name | File name or database table name | oep_metadata_table_example_v15 | | 2 | title | Human readable title | Metadata Example Table | | 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | | 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | | 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | -| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | -| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | -| 8 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || -| 8.1 | homepage | URL of Project | https://openenergy-platform.org/ | -| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | -| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | -| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | -| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | -| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | -| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | -| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | -| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | -| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | -| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | -| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | -| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 10.2 | timeseries | Object || -| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | -| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | -| 11 | sources | List of Objects. Each object has all name-value-pairs || -| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | -| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | -| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | -| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | -| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 11.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | -| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | -| 12.1 | name | SPDX identifier | ODbL-1.0 | -| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 12.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | -| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | -| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | -| 13.2 | email | E-mail address of the contributor | contact@example.com | -| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | -| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | -| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | -| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | -| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | -| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | -| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | -14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | -| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | -| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || -| 14.6.1.1 | name | Name string unique within its scope. | year | -| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | -| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'none' | MW | -| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | -| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | -| 14.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 14.6.3.2 | reference | The reference to the foreign table. | | -| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | -| 14.6.3.2.2 | fields | The foreign resource column | version | -| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are "none". || -| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 14.7.2 | decimalSeparator | Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be "." or ",". | . | -| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | -| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || -| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | -| 16.2 | metadataLicense | Object describing the license of the provided metadata || -| 16.2.1 | name | SPDX identifier | CC0-1.0 | -| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | -| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | -| 17 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || -| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | -| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | -| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 17.7 | ... | Feel free to add more descriptive comments. Like "none" | If a field is not applicable just enter "none" | +| 6 | subject | Reference the topic of the resource in ontology terms | | +| 7 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | +| 8 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | +| 9 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || +| 9.1 | homepage | URL of Project | https://openenergy-platform.org/ | +| 9.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | +| 9.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | +| 9.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | +| 9.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | +| 9.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | +| 9.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | +| 10 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | +| 10.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | +| 10.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | +| 11 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | +| 11.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | timeseries | Object || +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | +| 12 | sources | List of Objects. Each object has all name-value-pairs || +| 12.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | +| 12.2 | description | Free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | +| 12.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | +| 12.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 12.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | +| 13 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | +| 13.1 | name | SPDX identifier | ODbL-1.0 | +| 13.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 13.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | +| 14 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | +| 14.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | +| 14.2 | email | E-mail address of the contributor | contact@example.com | +| 14.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | +| 14.5 | comment | Free text comment on what's been done | Fixed a typo in the title | +| 15 | resources | The Data Resource format describes a data resource as an individual file or table. | | +| 15.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | +| 15.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | +| 15.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | +| 15.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | +| 15.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | +| 15.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || +| 15.6.1.1 | name | Name string unique within its scope. | year | +| 15.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | +| 15.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | +| 15.6.1.4 | is_about | Ontology URI to describe the column header | | +| 15.6.1.5 | value_reference | Ontology URI for an extended description of the values in the column | | +| 15.6.1.6 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | +| 15.6.3.2 | reference | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table) | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column | version | +| 15.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. || +| 15.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be "." or ",". | . | +| 16 | @id | Uniform Resource Identifier (URI) that links the resource via the dpedia databus | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms | https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld | +| 18. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | +| 19 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || +| 19.1 | metadataVersion | Type and version number of the metadata | OEP-1.5 | +| 19.2 | metadataLicense | Object describing the license of the provided metadata || +| 19.2.1 | name | SPDX identifier | CC0-1.0 | +| 19.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | +| 20 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || +| 20.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | +| 20.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | +| 20.7 | null | If a field is not applicable just enter: null | null | +| 20.8 | todo | If an applicable value is not yet available and will be inserted later on, use: "todo" | "todo" | +| 20.9 | ... | Feel free to add more descriptive comments. | | diff --git a/metadata/latest/schema.json b/metadata/latest/schema.json index c0d2412a..e4b521b0 100644 --- a/metadata/latest/schema.json +++ b/metadata/latest/schema.json @@ -1,36 +1,66 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v141/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.1", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json", + "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", "type": "object", "properties": { + "@context": { + "description": "Explanation of metadata keys in ontology terms. Example: https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld", + "type": [ + "string", + "null" + ], + "title": "@context" + }, "name": { - "description": "File name or database table name. Example: oep_metadata_table_example_v14", + "description": "File name or database table name. Example: oep_metadata_table_example_v15", "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Human readable title. Example: Metadata Example Table", "type": [ "string", "null" - ] + ], + "title": "Title" }, "id": { "description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). Example: https://example.com", "type": [ "string", "null" - ] + ], + "title": "Id", + "readonly": true + }, + "@id": { + "description": "Uniform Resource Identifier (URI) that links the resource via the databus", + "type": [ + "string", + "null" + ], + "title": "@Id", + "readonly": true }, "description": { "description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata. Example: Example table used to illustrate the metadata structure and meaning", "type": [ "string", "null" - ] + ], + "title": "Description" + }, + "subject": { + "description": "Reference the topic of the resource in ontology terms", + "type": [ + "string", + "null" + ], + "title": "Subject" }, "language": { "description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47). Example: [en-GB, de-DE, fr-FR]", @@ -39,8 +69,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Language" + }, + "title": "Language" }, "keywords": { "description": "An array of string keywords to assist users searching for the package in catalogs. Example: [example, template, test]", @@ -49,15 +81,19 @@ "type": [ "string", "null" - ] - } + ], + "title": "Keyword" + }, + "title": "Keyword" }, "publicationDate": { "description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD). Example: 2019-02-06", "type": [ "string", "null" - ] + ], + "title": "Publication date", + "format": "date" }, "context": { "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", @@ -68,59 +104,72 @@ "type": [ "string", "null" - ] + ], + "title": "Homepage", + "format": "uri" }, "documentation": { "description": "URL of project documentation. Example: https://github.com/OpenEnergyPlatform/metadata/wiki/Metadata-Description", "type": [ "string", "null" - ] + ], + "title": "Documentation" }, "sourceCode": { "description": "Url of project source code. Example: https://github.com/OpenEnergyPlatform", "type": [ "string", "null" - ] + ], + "title": "Source code" }, "contact": { "description": "Reference to the creator or maintainer of the data set. Example: contact@example.com", "type": [ "string", "null" - ] + ], + "title": "E-Mail contact", + "format": "email" }, "grantNo": { "description": "In a publicly funded Project: the identifying grant number. Example: 01AB2345", "type": [ "string", "null" - ] + ], + "title": "Grant no" }, "fundingAgency": { "description": "In a funded Project: The name of the funding agency. Example: Bundesministerium für Wirtschaft und Energie", "type": [ "string", "null" - ] + ], + "title": "Funding agency" }, "fundingAgencyLogo": { "description": "In a publicly funded Project: A link to the Logo of the funding agency. Example: https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", "type": [ "string", "null" - ] + ], + "title": "Funding agency logo", + "format": "uri" }, "publisherLogo": { "description": "Link to the logo of the publishing institution. Example: https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png", "type": [ "string", "null" - ] + ], + "title": "Publisher logo", + "format": "uri" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Context" }, "spatial": { "description": "Object. Contains name-value-pairs describing the spatial context of the contained data.", @@ -131,24 +180,28 @@ "type": [ "string", "null" - ] + ], + "title": "Location" }, "extent": { "description": "Covered area. May be the name of a region, or the geometry of a bounding box. Example: Europe", "type": [ "string", "null" - ] + ], + "title": "Extent" }, "resolution": { "description": "Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. Example: 30 m", "type": [ "string", "null" - ] + ], + "title": "Resolution" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Spatial" }, "temporal": { "description": "Temporal object. Time period covered in the data. Temporal information should either contain a \"referenceDate\" or the keys describing a time series; in rare cases both. Use null for the ones that don't apply.", @@ -159,7 +212,9 @@ "type": [ "string", "null" - ] + ], + "title": "Reference date", + "format": "date" }, "timeseries": { "description": "Times series object in temporal object, contains start, end, resolution, alignment and aggregation type properties.", @@ -170,41 +225,50 @@ "type": [ "string", "null" - ] + ], + "title": "Start", + "format": "date-time" }, "end": { "description": "The end point in time of a time series. Example: 2019-02-07T10:12:04+00:00", "type": [ "string", "null" - ] + ], + "title": "End", + "format": "date-time" }, "resolution": { "description": "The time span between individual points of information in a time series. Example: 30 s", "type": [ "string", "null" - ] + ], + "title": "Resolution" }, "alignment": { "description": "Indicator whether stamps in a time series are left, right or middle. \"null\" if there is no time series. Example: left", "type": [ "string", "null" - ] + ], + "title": "Alignment" }, "aggregationType": { "description": "Indicates whether the values are a sum, average or current. Example: sum", "type": [ "string", "null" - ] + ], + "title": "Aggregation type" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Timeseries" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Temporal" }, "sources": { "description": "List of source objects. Each object has all name-value-pairs.", @@ -218,21 +282,25 @@ "type": [ "string", "null" - ] + ], + "title": "Title" }, "description": { "description": "Free text description of the data set. Example: Scientific climate change report by the UN", "type": [ "string", "null" - ] + ], + "title": "Description" }, "path": { "description": "URL to original source. Example: https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf", "type": [ "string", "null" - ] + ], + "title": "Path", + "format": "uri" }, "licenses": { "description": "The license(s) under which the source(s) is/are provided. List of objects.", @@ -246,42 +314,51 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "A link to the license. Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" - ] + ], + "title": "Path" }, "instruction": { "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", "type": [ "string", "null" - ] + ], + "title": "Instruction" }, "attribution": { "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" - ] + ], + "title": "Attribution" } - } - } + }, + "title": "Licenses" + }, + "title": "Licenses" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Sources" + }, + "title": "Sources" }, "licenses": { "description": "The license(s) under which the described package is provided. List of objects.", @@ -295,39 +372,46 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" - ] + ], + "title": "Path" }, "instruction": { "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", "type": [ "string", "null" - ] + ], + "title": "Instruction" }, "attribution": { "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" - ] + ], + "title": "Attribution" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Licenses" + }, + "title": "Licenses" }, "contributors": { "description": "The people or organizations who contributed to this data package. List of objects.", @@ -341,39 +425,48 @@ "type": [ "string", "null" - ] + ], + "title": "Title" }, "email": { "description": "E-mail address of the contributor. Example: contact@example.com", "type": [ "string", "null" - ] + ], + "title": "Email", + "format": "email" }, "date": { "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" - ] + ], + "title": "Date", + "format": "date" }, "object": { "description": "Target of contribution. Which part of the package was supplied/changed. Example: Metadata", "type": [ "string", "null" - ] + ], + "title": "Object" }, "comment": { "description": "Free text comment on what's been done. Example: Fixed a typo in the title", "type": [ "string", "null" - ] + ], + "title": "Comment" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Contributors" + }, + "title": "Contributors" }, "resources": { "description": "Resources, described as a list of data resource format objects.", @@ -387,35 +480,52 @@ "type": [ "string", "null" - ] + ], + "title": "Profile", + "options": { + "hidden": true + } }, "name": { "description": "A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus \".\", \"-\" and \"_\". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. Example: sandbox.example_table", "type": [ "string", "null" - ] + ], + "title": "Name" }, "path": { "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" - ] + ], + "title": "Path", + "options": { + "hidden": true + } }, "format": { "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" - ] + ], + "title": "Format", + "options": { + "hidden": true + } }, "encoding": { "description": "Specifies the character encoding of the resource's data file. The values should be one of the \"Preferred MIME Names\" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. Example: UTF-8", "type": [ "string", "null" - ] + ], + "title": "Encoding", + "options": { + "hidden": true + } }, "schema": { "description": "Object containing fields, primary key and for foreign keys. Describes the structure of the present data.", @@ -433,32 +543,58 @@ "type": [ "string", "null" - ] + ], + "title": "Name", + "readonly": true }, "description": { "description": "Free-text describing the field. Example: Reference year for which the data were collected.", "type": [ "string", "null" - ] + ], + "title": "Description" }, "type": { "description": "Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. Example: geometry(Point, 4326)", "type": [ "string", "null" - ] + ], + "title": "Type", + "readonly": true + }, + "is_about": { + "description": "Ontology URI to describe the column header", + "type": [ + "string", + "null" + ], + "title": "Is about", + "format": "uri" + }, + "value_reference": { + "description": "Ontology URI for an extended description of the values in the column", + "type": [ + "string", + "null" + ], + "title": "Value reference", + "format": "uri" }, "unit": { - "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"none\". Example: MW", + "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"null\". Example: MW", "type": [ "string", "null" - ] + ], + "title": "Unit" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Field" + }, + "title": "Field" }, "primaryKey": { "description": "A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. Example: id", @@ -467,8 +603,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Primary key" + }, + "title": "Primary key" }, "foreignKeys": { "description": "List of foreign keys.", @@ -484,8 +622,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Field" + }, + "title": "Fields" }, "reference": { "description": "The reference to the foreign table.", @@ -496,7 +636,8 @@ "type": [ "string", "null" - ] + ], + "title": "Resource" }, "fields": { "description": "The foreign resource column. List of fields. Example: version", @@ -505,21 +646,27 @@ "type": [ "string", "null" - ] - } + ], + "title": "Field" + }, + "title": "Field" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Reference" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Foreign Key" + }, + "title": "Foreign Keys" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Schema" }, "dialect": { - "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"none\".", + "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"null\".", "type": "object", "properties": { "delimiter": { @@ -527,21 +674,29 @@ "type": [ "string", "null" - ] + ], + "title": "Delimiter" }, "decimalSeparator": { "description": "Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be \".\" or \",\". Example: .", "type": [ "string", "null" - ] + ], + "title": "Decimal separator" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Dialect", + "options": { + "hidden": true + } } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Resource" + }, + "title": "Resource" }, "review": { "description": "Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness.", @@ -552,28 +707,35 @@ "type": [ "string", "null" - ] + ], + "title": "Path" }, "badge": { "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", "type": [ "string", "null" - ] + ], + "title": "Badge" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Review", + "options": { + "hidden": true + } }, "metaMetadata": { "description": "Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata.", "type": "object", "properties": { "metadataVersion": { - "description": "Type and version number of the metadata. Example: OEP-1.4", + "description": "Type and version number of the metadata. Example: OEP-1.5", "type": [ "string", "null" - ] + ], + "title": "Metadata version" }, "metadataLicense": { "description": "Object describing the license of the provided metadata.", @@ -584,27 +746,35 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) license title. Example: Creative Commons Zero v1.0 Universal", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "Url or path string, that is a fully qualified HTTP address. Example: https://creativecommons.org/publicdomain/zero/1.0/", "type": [ "string", "null" - ] + ], + "title": "Path" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Metadata license" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Meta metadata", + "options": { + "hidden": true + } }, "_comment": { "description": "Object. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged.", @@ -615,51 +785,67 @@ "type": [ "string", "null" - ] + ], + "title": "Metadata" }, "dates": { "description": "Comment on data/time format. Example: Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "type": [ "string", "null" - ] + ], + "title": "Dates" }, "units": { "description": "Comment on units. Example: If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m)", "type": [ "string", "null" - ] + ], + "title": "Units" }, "languages": { "description": "Comment on language format. Example: Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "type": [ "string", "null" - ] + ], + "title": "Languages" }, "licenses": { "description": "Reference to license format. Example: License name must follow the SPDX License List (https://spdx.org/licenses/)", "type": [ "string", "null" - ] + ], + "title": "Licenses" }, "review": { "description": "Reference to review documentation. Example: Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", "type": [ "string", "null" - ] + ], + "title": "Review" }, "null": { - "description": "Feel free to add more descriptive comments. Like \"none\". Example: If a field is not applicable just enter \"none\"", + "description": "Feel free to add more descriptive comments. Like \"null\". Example: If a field is not applicable just enter \"null\"", "type": [ "string", "null" - ] + ], + "title": "Null" + }, + "todo": { + "description": "If an applicable value is not yet available and will be inserted later on use: 'todo' ", + "type": [ + "string", + "null" + ], + "title": "Todo" } - } + }, + "title": "_comment" } }, "additionalProperties": false diff --git a/metadata/latest/schema.py b/metadata/latest/schema.py index d694d543..c7689409 100644 --- a/metadata/latest/schema.py +++ b/metadata/latest/schema.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V141_SCHEMA = json.loads(f.read()) + OEMETADATA_V150_SCHEMA = json.loads(f.read()) diff --git a/metadata/latest/template.json b/metadata/latest/template.json index b3488341..a7665872 100644 --- a/metadata/latest/template.json +++ b/metadata/latest/template.json @@ -1,146 +1,161 @@ { - "name": "", - "title": "", - "id": "", - "description": "", + "name": null, + "title": null, + "id": null, + "description": null, + "subject": null, "language": [ - "" + null ], "keywords": [ - "" + null ], - "publicationDate": "", + "publicationDate": null, "context": { - "homepage": "", - "documentation": "", - "sourceCode": "", - "contact": "", - "grantNo": "", - "fundingAgency": "", - "fundingAgencyLogo": "", - "publisherLogo": "" + "homepage": null, + "documentation": null, + "sourceCode": null, + "contact": null, + "grantNo": null, + "fundingAgency": null, + "fundingAgencyLogo": null, + "publisherLogo": null }, "spatial": { - "location": "", - "extent": "", - "resolution": "" + "location": null, + "extent": null, + "resolution": null }, "temporal": { - "referenceDate": "", - "timeseries": { - "start": "", - "end": "", - "resolution": "", - "alignment": "", - "aggregationType": "" + "referenceDate": null, + "timeseries": [{ + "start": null, + "end": null, + "resolution": null, + "alignment": null, + "aggregationType": null + }, + { + "start": null, + "end": null, + "resolution": null, + "alignment": null, + "aggregationType": null } + ] }, "sources": [ { - "title": "", - "description": "", - "path": "", + "title": null, + "description": null, + "path": null, "licenses": [ { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null } ] }, { - "title": "", - "description": "", - "path": "", + "title": null, + "description": null, + "path": null, "licenses": [ { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null } ] } ], "licenses": [ { - "name": "", - "title": "", - "path": "", - "instruction": "", - "attribution": "" + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null } ], "contributors": [ { - "title": "", - "email": "", - "date": "", - "object": "", - "comment": "" + "title": null, + "email": null, + "date": null, + "object": null, + "comment": null }, { - "title": "", - "email": "", - "date": "", - "object": "", - "comment": "" + "title": null, + "email": null, + "date": null, + "object": null, + "comment": null } ], "resources": [ { - "profile": "", - "name": "", - "path": "", - "format": "", - "encoding": "", + "profile": null, + "name": null, + "path": null, + "format": null, + "encoding": null, "schema": { "fields": [ { - "name": "", - "description": "", - "type": "", - "unit": "" + "name": null, + "description": null, + "type": null, + "is_about": null, + "value_reference": null, + "unit": null }, { - "name": "", - "description": "", - "type": "", - "unit": "" + "name": null, + "description": null, + "type": null, + "is_about": null, + "value_reference": null, + "unit": null } ], "primaryKey": [ - "" + null ], "foreignKeys": [ { "fields": [ - "" + null ], "reference": { - "resource": "", + "resource": null, "fields": [ - "" + null ] } } ] }, "dialect": { - "delimiter": "", + "delimiter": null, "decimalSeparator": "." } } ], + "@id": null, + "@context": null, "review": { - "path": "", - "badge": "" + "path": null, + "badge": null }, "metaMetadata": { - "metadataVersion": "OEP-1.4.1", + "metadataVersion": "OEP-1.5.0", "metadataLicense": { "name": "CC0-1.0", "title": "Creative Commons Zero v1.0 Universal", @@ -148,12 +163,13 @@ } }, "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", + "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata)", "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "units": "Use a space between numbers and units (100 m)", "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" + "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/master/data-review/manual/review_manual.md)", + "null": "If not applicable use: null", + "todo": "If a value is not yet available, use: todo" } } \ No newline at end of file diff --git a/metadata/latest/template.py b/metadata/latest/template.py index f6cdcc39..f584abe1 100644 --- a/metadata/latest/template.py +++ b/metadata/latest/template.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V141_TEMPLATE = json.loads(f.read()) + OEMETADATA_V150_TEMPLATE = json.loads(f.read()) diff --git a/metadata/v130/example.json b/metadata/v130/example.json index 45331c0a..b75c72aa 100644 --- a/metadata/v130/example.json +++ b/metadata/v130/example.json @@ -1,5 +1,5 @@ { - "title": "Good example title", + "title": "Example title for metadata example - Version 1.3.0", "description": "example metadata for example data", "language": [ "eng", diff --git a/metadata/v140/example.json b/metadata/v140/example.json index 50a603f3..8df75db6 100644 --- a/metadata/v140/example.json +++ b/metadata/v140/example.json @@ -1,6 +1,6 @@ { "name": "oep_metadata_table_example_v140", - "title": "Good example title", + "title": "Example title for metadata example - Version 1.4.0", "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v140", "description": "example metadata for example data", "language": [ @@ -17,7 +17,7 @@ "publicationDate": "2018-06-12", "context": { "homepage": "https://reiner-lemoine-institut.de/szenariendb/", - "documentation": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/latest/metadata_key_description.md", + "documentation": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/v140/metadata_key_description.md", "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata", "contact": "https://github.com/Ludee", "grantNo": "03ET4057", diff --git a/metadata/v141/example.json b/metadata/v141/example.json index e21d72e8..2e03dfd7 100644 --- a/metadata/v141/example.json +++ b/metadata/v141/example.json @@ -1,6 +1,6 @@ { "name": "oep_metadata_table_example_v141", - "title": "Good example title", + "title": "Example title for metadata example - Version 1.4.1", "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v141", "description": "example metadata for example data", "language": [ @@ -17,12 +17,12 @@ "publicationDate": "2018-06-12", "context": { "homepage": "https://reiner-lemoine-institut.de/szenariendb/", - "documentation": "https://github.com/OpenEnergyPlatform/organisation/wiki/metadata", - "sourceCode": "https://github.com/OpenEnergyPlatform/examples/tree/master/metadata", + "documentation": "https://github.com/OpenEnergyPlatform/oemetadata/blob/develop/metadata/v141/metadata_key_description.md", + "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata", "contact": "https://github.com/Ludee", "grantNo": "03ET4057", "fundingAgency": "Bundesministerium für Wirtschaft und Energie", - "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", + "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3", "publisherLogo": "https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png" }, "spatial": { @@ -244,7 +244,7 @@ } ], "review": { - "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/wiki", + "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "platin" }, "metaMetadata": { @@ -256,12 +256,12 @@ } }, "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", + "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata)", "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "units": "Use a space between numbers and units (100 m)", "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" + "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/master/data-review/manual/review_manual.md)", + "null": "If not applicable use: null" } } \ No newline at end of file diff --git a/metadata/v141/metadata_key_description.md b/metadata/v141/metadata_key_description.md index c545db2c..63aca87f 100644 --- a/metadata/v141/metadata_key_description.md +++ b/metadata/v141/metadata_key_description.md @@ -70,14 +70,14 @@ This pages describes the OEP Metadata version 1.4.1 You can have a look at an em | 14.6.1.1 | name | Name string unique within its scope. | year | | 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | | 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'none' | MW | +| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | | 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | | 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | | 14.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | | 14.6.3.2 | reference | The reference to the foreign table. | | | 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | | 14.6.3.2.2 | fields | The foreign resource column | version | -| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are "none". || +| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are `null`. || | 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | | 14.7.2 | decimalSeparator | Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be "." or ",". | . | | 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | @@ -96,4 +96,4 @@ This pages describes the OEP Metadata version 1.4.1 You can have a look at an em | 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | | 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | | 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 17.7 | ... | Feel free to add more descriptive comments. Like "none" | If a field is not applicable just enter "none" | \ No newline at end of file +| 17.7 | ... | Feel free to add more descriptive comments. Like null | If a field is not applicable just enter: null | \ No newline at end of file diff --git a/metadata/v141/schema.json b/metadata/v141/schema.json index c0d2412a..236e353e 100644 --- a/metadata/v141/schema.json +++ b/metadata/v141/schema.json @@ -450,7 +450,7 @@ ] }, "unit": { - "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"none\". Example: MW", + "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"null\". Example: MW", "type": [ "string", "null" @@ -519,7 +519,7 @@ "additionalProperties": false }, "dialect": { - "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"none\".", + "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"null\".", "type": "object", "properties": { "delimiter": { @@ -653,7 +653,7 @@ ] }, "null": { - "description": "Feel free to add more descriptive comments. Like \"none\". Example: If a field is not applicable just enter \"none\"", + "description": "Feel free to add more descriptive comments. Like \"null\". Example: If a field is not applicable just enter \"null\"", "type": [ "string", "null" diff --git a/metadata/v150/README.md b/metadata/v150/README.md new file mode 100644 index 00000000..e99ef3b9 --- /dev/null +++ b/metadata/v150/README.md @@ -0,0 +1,16 @@ +OpenEnergyMetadata +OpenEnergyPlatform + + +# Open Energy Metadata (OEM) - Latest-Release + +This version of the OEM represents the latest released version. This release is fully integrated +into the OEP. + +The OEM contains the following files: + +* [template.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/v150/template.json) contains an empty metadata string with all fields. +* [metadata_key_description.md](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/v150/metadata_key_description.md) contains a full description of each metadata key and an example. +* [example.json](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/v150/example.json) contains a basic metadata example. + +For further information see the [Changelog](https://github.com/OpenEnergyPlatform/oemetadata/blob/master/CHANGELOG.md). diff --git a/metadata/future/__init__.py b/metadata/v150/__init__.py similarity index 100% rename from metadata/future/__init__.py rename to metadata/v150/__init__.py diff --git a/metadata/future/json-ld/context.jsonld b/metadata/v150/context.json similarity index 94% rename from metadata/future/json-ld/context.jsonld rename to metadata/v150/context.json index 741ee259..99d901da 100644 --- a/metadata/future/json-ld/context.jsonld +++ b/metadata/v150/context.json @@ -7,6 +7,7 @@ "xsd": "http://www.w3.org/2001/XMLSchema#", "oeo": "http://openenergy-platform.org/ontology/oeo/", "csvw": "http://www.w3.org/ns/csvw#", + "obo":"http://purl.obolibrary.org/obo/", "title": { "@id": "dct:title", "@type": "xsd:string" @@ -48,7 +49,7 @@ "@type": "xsd:string" }, "about": { - "@id": "http://purl.obolibrary.org/obo/IAO_0000136", + "@id": "obo:IAO_0000136", "@type": "@id" } } diff --git a/metadata/future/example.json b/metadata/v150/example.json similarity index 78% rename from metadata/future/example.json rename to metadata/v150/example.json index 613099b2..07dde3c2 100644 --- a/metadata/future/example.json +++ b/metadata/v150/example.json @@ -1,8 +1,9 @@ { - "name": "oep_metadata_table_example_v140", - "title": "Good example title", - "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v140", + "name": "oep_metadata_table_example_v150", + "title": "Example title for metadata example - Version 1.5.0", + "id": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v150", "description": "example metadata for example data", + "subject": null, "language": [ "en-GB", "en-US", @@ -14,15 +15,15 @@ "template", "test" ], - "publicationDate": "2018-06-12", + "publicationDate": "2021-11-15", "context": { - "homepage": "https://reiner-lemoine-institut.de/szenariendb/", - "documentation": "https://github.com/OpenEnergyPlatform/organisation/wiki/metadata", - "sourceCode": "https://github.com/OpenEnergyPlatform/examples/tree/master/metadata", + "homepage": "https://reiner-lemoine-institut.de/lod-geoss/", + "documentation": "https://openenergy-platform.org/tutorials/jupyter/OEMetadata/", + "sourceCode": "https://github.com/OpenEnergyPlatform/oemetadata/tree/master", "contact": "https://github.com/Ludee", - "grantNo": "03ET4057", + "grantNo": "03EI1005", "fundingAgency": "Bundesministerium für Wirtschaft und Energie", - "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", + "fundingAgencyLogo": "https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=normal&v=3", "publisherLogo": "https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png" }, "spatial": { @@ -32,13 +33,21 @@ }, "temporal": { "referenceDate": "2016-01-01", - "timeseries": { + "timeseries": [{ "start": "2017-01-01T00:00+01", "end": "2017-12-31T23:00+01", "resolution": "1 h", "alignment": "left", "aggregationType": "sum" + }, + { + "start": "2018-01-01T00:00+01", + "end": "2019-06-01T23:00+01", + "resolution": "15 min", + "alignment": "right", + "aggregationType": "sum" } + ] }, "sources": [ { @@ -184,13 +193,20 @@ "date": "2019-07-09", "object": "metadata", "comment": "Release metadata version OEP-1.3.0" + }, + { + "title": "Ludee", + "email": null, + "date": "2021-11-15", + "object": "metadata", + "comment": "Release metadata version OEP-1.5.0" } ], "resources": [ { "profile": "tabular-data-resource", - "name": "model_draft.oep_metadata_table_example_v140", - "path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v140", + "name": "model_draft.oep_metadata_table_example_v150", + "path": "http://openenergyplatform.org/dataedit/view/model_draft/oep_metadata_table_example_v150", "format": "PostgreSQL", "encoding": "UTF-8", "schema": { @@ -199,24 +215,40 @@ "name": "id", "description": "Unique identifier", "type": "serial", + "is_about": null, + "value_reference": null, + "unit": null + }, + { + "name": "name", + "description": "Example name", + "type": "text", + "is_about": null, + "value_reference": null, "unit": null }, { "name": "year", "description": "Reference year", "type": "integer", + "is_about": null, + "value_reference": null, "unit": null }, { "name": "value", "description": "Example value", "type": "double precision", + "is_about": null, + "value_reference": null, "unit": "MW" }, { "name": "geom", "description": "Geometry", "type": "geometry(Point, 4326)", + "is_about": null, + "value_reference": null, "unit": null } ], @@ -243,12 +275,14 @@ } } ], + "@id": "https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00", + "@context": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/30887e4cd7dabc316d1ee674791f0cc815277e38/metadata/latest/context.json", "review": { - "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/wiki", + "path": "https://github.com/OpenEnergyPlatform/data-preprocessing/issues", "badge": "platin" }, "metaMetadata": { - "metadataVersion": "OEP-1.4.0", + "metadataVersion": "OEP-1.5.0", "metadataLicense": { "name": "CC0-1.0", "title": "Creative Commons Zero v1.0 Universal", @@ -256,12 +290,13 @@ } }, "_comment": { - "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", + "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/oemetadata)", "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "units": "Use a space between numbers and units (100 m)", "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", - "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", - "null": "If not applicable use (null)" + "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/blob/master/data-review/manual/review_manual.md)", + "null": "If not applicable use: null", + "todo": "If a value is not yet available, use: todo" } } \ No newline at end of file diff --git a/metadata/future/example.py b/metadata/v150/example.py similarity index 66% rename from metadata/future/example.py rename to metadata/v150/example.py index 1c939064..75f18fe1 100644 --- a/metadata/future/example.py +++ b/metadata/v150/example.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "example.json"), "rb") as f: - OEMETADATA_V140_EXAMPLE = json.loads(f.read()) + OEMETADATA_V150_EXAMPLE = json.loads(f.read()) diff --git a/metadata/future/metadata_key_description.md b/metadata/v150/metadata_key_description.md similarity index 50% rename from metadata/future/metadata_key_description.md rename to metadata/v150/metadata_key_description.md index f613a040..53e82bfc 100644 --- a/metadata/future/metadata_key_description.md +++ b/metadata/v150/metadata_key_description.md @@ -2,98 +2,105 @@ ## Open Energy Metadata Description -This pages describes the OEP Metadata version 1.4.0 You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v140/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v140/example.json) of a metadata string. +This pages describes the OEP Metadata version 1.5.0. You can have a look at an empty [template](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v150/template.json) and a filled out [example](https://github.com/OpenEnergyPlatform/metadata/blob/master/metadata/v150/example.json) of the metadata string. ### Table with all Metadata keys and a short description |#|Key |Description |Example | |---|---|---|---| -| 1 | name | File name or database table name | oep_metadata_table_example_v14 | +| 1 | name | File name or database table name | oep_metadata_table_example_v15 | | 2 | title | Human readable title | Metadata Example Table | | 3 | id | Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). | https://example.com | | 4 | description | A description of the package. It should be usable as summary information for the entire package that is described by the metadata. | Example table used to illustrate the metadata structure and meaning | | 5 | language | Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47) | [en-GB, de-DE, fr-FR] | -| 6 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | -| 7 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | -| 8 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || -| 8.1 | homepage | URL of Project | https://openenergy-platform.org/ | -| 8.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | -| 8.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | -| 8.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | -| 8.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | -| 8.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | -| 8.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | -| 8.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | -| 9 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | -| 9.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | -| 9.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | -| 9.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | -| 10 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | -| 10.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | -| 10.2 | timeseries | Object || -| 10.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | -| 10.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | -| 10.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | -| 10.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | -| 10.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | -| 11 | sources | List of Objects. Each object has all name-value-pairs || -| 11.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | -| 11.2 | description | Free text description of the data set. | Scientific climate change report by the UN | -| 11.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | -| 11.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | -| 11.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | -| 11.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 11.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 11.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 11.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | -| 12 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | -| 12.1 | name | SPDX identifier | ODbL-1.0 | -| 12.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | -| 12.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | -| 12.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | -| 12.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | -| 13 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | -| 13.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | -| 13.2 | email | E-mail address of the contributor | contact@example.com | -| 13.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | -| 13.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | -| 13.5 | comment | Free text comment on what's been done | Fixed a typo in the title | -| 14 | resources | The Data Resource format describes a data resource as an individual file or table. | | -| 14.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | -| 14.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | -| 14.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | -| 14.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | -14.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | -| 14.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | -| 14.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || -| 14.6.1.1 | name | Name string unique within its scope. | year | -| 14.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | -| 14.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | -| 14.6.1.4 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'none' | MW | -| 14.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | -| 14.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | -| 14.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | -| 14.6.3.2 | reference | The reference to the foreign table. | | -| 14.6.3.2.1 | resource | The foreign resource (table) | schema.table | -| 14.6.3.2.2 | fields | The foreign resource column | version | -| 14.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are "none". || -| 14.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | -| 14.7.2 | decimalSeparator | Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be "." or ",". | . | -| 15. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | -| 15.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | -| 15.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | -| 16 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || -| 16.1 | metadataVersion | Type and version number of the metadata | OEP-1.4 | -| 16.2 | metadataLicense | Object describing the license of the provided metadata || -| 16.2.1 | name | SPDX identifier | CC0-1.0 | -| 16.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | -| 16.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | -| 17 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || -| 17.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | -| 17.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | -| 17.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | -| 17.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | -| 17.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | -| 17.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | -| 17.7 | ... | Feel free to add more descriptive comments. Like "none" | If a field is not applicable just enter "none" | \ No newline at end of file +| 6 | subject | Reference the topic of the resource in ontology terms | | +| 7 | keywords | An Array of string keywords to assist users searching for the package in catalogs. | [example, template, test] | +| 8 | publicationDate | Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD) | 2019-02-06 | +| 9 | context | Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset. || +| 9.1 | homepage | URL of Project | https://openenergy-platform.org/ | +| 9.2 | documentation | URL of the projects source code | https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description | +| 9.3 | sourceCode | URL of Project | https://github.com/OpenEnergyPlatform | +| 9.4 | contact | Reference to the creator or maintainer of the data set | contact@example.com | +| 9.5 | grantNo | In a publicly funded Project: the identifying grant number | 01AB2345 | +| 9.6 | fundingAgency | In a funded Project: The name of the funding agency | Bundesministerium für Wirtschaft und Energie | +| 9.7 | fundingAgencyLogo | In a publicly funded Project: A link to the Logo of the funding agency | https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2 | +| 9.8 | publisherLogo | Link to the logo of the publishing institution | https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png | +| 10 | spatial | Object. Contains name-value-pairs describing the spatial context of the contained data. | | +| 10.1 | location | In the case of data where the location can be described as a point. May come as coordinates, URI or addresses with street, house number and zip code | 52.433509, 13.535855 | +| 10.2 | extent | Covered area. May be the name of a region, or the geometry of a bounding box. | Europe | +| 10.3 | resolution | Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. | 30 m | +| 11 | temporal | Object. Time period covered in the data. Temporal information should either contain a "referenceDate" or the keys describing a time series; in rare cases both. Use `null` for the ones that don't apply. | | +| 11.1 | referenceDate | Base year, month or day. Point in time for which the data is meant to be accurate. A census will generally have a reference year. A satellite image will have a reference date. Date Format is ISO 8601. | 2016-01-01 | +| 11.2 | timeseries | Object || +| 11.2.1 | start | The beginning point in time of a time series. | 2019-02-06T10:12:04+00:00 | +| 11.2.2 | end | The end point in time of a time series. | 2019-02-07T10:12:04+00:00 | +| 11.2.3 | resolution | The time span between individual points of information in a time series. | 30 s | +| 11.2.4 | alignment | Indicator whether stamps in a time series are left, right or middle. `null` if there is no time series. | left | +| 11.2.5 | aggregationType | Indicates whether the values are a sum, average or current. | sum | +| 12 | sources | List of Objects. Each object has all name-value-pairs || +| 12.1 | title | Human readable title of the source, e.g. document title or organisation name | IPCC Fifth Assessment Report | +| 12.2 | description | Free text description of the data set. | Scientific climate change report by the UN | +| 12.3 | path | URL to original source | https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf | +| 12.4 | licenses | List of Objects. Each object has all name-value-pairs. The license(s) under which the source is provided. | | +| 12.4.1 | name | [SPDX](https://spdx.org/licenses/) identifier | ODbL-1.0 | +| 12.4.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 12.4.3 | path | A link to the license | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 12.4.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 12.4.5 | attribution | copyrightholder of the source | © Intergovernmental Panel on Climate Change 2014 | +| 13 | licenses | The license(s) under which the described package is provided. List of Objects. Each object has all name-value-pairs | | +| 13.1 | name | SPDX identifier | ODbL-1.0 | +| 13.2 | title | Official (human readable) title | Open Data Commons Open Database License 1.0 | +| 13.3 | path | A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). | https://opendatacommons.org/licenses/odbl/1-0/index.html | +| 13.4 | instruction | short description of rights and restrictions | You are free to share and change, but you must attribute, and share derivations under the same license. | +| 13.5 | attribution | copyrightholder of the produced data set | © Reiner Lemoine Institut | +| 14 | contributors | The people or organizations who contributed to this Data Package. This has to be a list. Each object refers to one contributor. Every contributor must have a title and property. A path, email, role and organization properties are optional extras. | | +| 14.1 | title | Name/title of the contributor (name for a person, name or title for an organization) | Jon Doe | +| 14.2 | email | E-mail address of the contributor | contact@example.com | +| 14.3 | date | Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. | 2016-06-16 | +| 14.4 | object | Target of contribution. Which part of the package was supplied/changed | Metadata | +| 14.5 | comment | Free text comment on what's been done | Fixed a typo in the title | +| 15 | resources | The Data Resource format describes a data resource as an individual file or table. | | +| 15.1 | profile | A string identifying the profile of this descriptor as per the profiles specification. This information is retained in order to comply with the "Tabular Data Package" standard. If at all in doubt the value should read "tabular-data-resource". | tabular-data-resource | +| 15.2 | name | A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus ".", "-" and "_". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. | sandbox.example_table | +| 15.3 | path | A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. | https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads | +| 15.4 | format | 'csv', 'xls', 'json' etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to 'PostgreSQL', since the data there are stored in a data base. | csv | +| 15.5 | encoding | Specifies the character encoding of the resource's data file. The values should be one of the "Preferred MIME Names" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. | UTF-8 | +| 15.6 | schema | Object containing fields and primary key. Describes the structure of the present data. | | +| 15.6.1 | fields | List of objects. Every object describes a column and provides name, description, type and unit. || +| 15.6.1.1 | name | Name string unique within its scope. | year | +| 15.6.1.2 | description | Free-text describing the field. | Reference year for which the data were collected. | +| 15.6.1.3 | type | Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. | geometry(Point, 4326) | +| 15.6.1.4 | is_about | Ontology URI to describe the column header | | +| 15.6.1.5 | value_reference | Ontology URI for an extended description of the values in the column | | +| 15.6.1.6 | unit | Unit, preferably SI-Unit, that values in this field are mapped to. If 'unit' doesn't apply to a field, use 'null' | MW | +| 15.6.2 | primaryKey | A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. | id | +| 15.6.3 | foreignKeys | A foreign key is a field that refers to a column in another table. | | +| 15.6.3.1 | fields | The column in the table that is constrainted by the foreign key. | version | +| 15.6.3.2 | reference | The reference to the foreign table. | | +| 15.6.3.2.1 | resource | The foreign resource (table) | schema.table | +| 15.6.3.2.2 | fields | The foreign resource column | version | +| 15.7 | dialect | Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are 'null'. || +| 15.7.1 | delimiter | Specifies the character sequence which should separate fields (aka columns). Common characters are "," (comma), "." (point) and "\t" (tab). | , | +| 15.7.2 | decimalSeparator | Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be "." or ",". | . | +| 16 | @id | Uniform Resource Identifier (URI) that links the resource via the dpedia databus | https://databus.dbpedia.org/kurzum/mastr/bnetza-mastr/01.04.00 | +| 17 | @context | Explanation of metadata keys in ontology terms | https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld | +| 18. | review | Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness. | | +| 18.1 | path | A URL or path string, that should be a permanent http(s) address directly linking to the documented review. | https://www.example.com | +| 18.2 | badge | A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. | Platin | +| 19 | metaMetadata | Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata. || +| 19.1 | metadataVersion | Type and version number of the metadata | OEP-1.5 | +| 19.2 | metadataLicense | Object describing the license of the provided metadata || +| 19.2.1 | name | SPDX identifier | CC0-1.0 | +| 19.2.2 | title | Official (human readable) license title | Creative Commons Zero v1.0 Universal | +| 19.2.3 | path | Url or path string, that is a fully qualified HTTP address | https://creativecommons.org/publicdomain/zero/1.0/ | +| 20 | _comment| Array of objects. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged. || +| 20.1 | metadata | Reference to the metadata documentation in use. | "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)" | +| 20.2 | dates | Comment on data/time format | Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh) | +| 20.3 | units | Comment on units | If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m) | +| 20.4 | languages | Comment on language format | Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE) | +| 20.5 | licenses | Reference to license format | License name must follow the SPDX License List (https://spdx.org/licenses/) | +| 20.6 | review | Reference to review documentation | Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki) | +| 20.7 | null | If a field is not applicable just enter: null | null | +| 20.8 | todo | If an applicable value is not yet available and will be inserted later on, use: "todo" | "todo" | +| 20.9 | ... | Feel free to add more descriptive comments. | | diff --git a/metadata/future/schema.json b/metadata/v150/schema.json similarity index 73% rename from metadata/future/schema.json rename to metadata/v150/schema.json index ab2d3fae..a87f5fff 100644 --- a/metadata/future/schema.json +++ b/metadata/v150/schema.json @@ -1,36 +1,66 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v140/schema.json", - "description": "Open Energy Plaftorm (OEP) metadata schema v1.4.0", + "$id": "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json", + "description": "Open Energy Plaftorm (OEP) metadata schema v1.5.0", "type": "object", "properties": { + "@context": { + "description": "Explanation of metadata keys in ontology terms. Example: https://raw.githubusercontent.com/LOD-GEOSS/databus-snippets/master/oep_metadata/context.jsonld", + "type": [ + "string", + "null" + ], + "title": "@context" + }, "name": { - "description": "File name or database table name. Example: oep_metadata_table_example_v14", + "description": "File name or database table name. Example: oep_metadata_table_example_v15", "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Human readable title. Example: Metadata Example Table", "type": [ "string", "null" - ] + ], + "title": "Title" }, "id": { "description": "Uniform Resource Identifier (URI) that unambiguously identifies the resource. This can be a URL on the data set. It can also be a Digital Object Identifier (DOI). Example: https://example.com", "type": [ "string", "null" - ] + ], + "title": "Id", + "readonly": true + }, + "@id": { + "description": "Uniform Resource Identifier (URI) that links the resource via the databus", + "type": [ + "string", + "null" + ], + "title": "@Id", + "readonly": true }, "description": { "description": "A description of the package. It should be usable as summary information for the entire package that is described by the metadata. Example: Example table used to illustrate the metadata structure and meaning", "type": [ "string", "null" - ] + ], + "title": "Description" + }, + "subject": { + "description": "Reference the topic of the resource in ontology terms", + "type": [ + "string", + "null" + ], + "title": "Subject" }, "language": { "description": "Language used within the described data structures (e.g. titles, descriptions). The language key can be repeated if more languages are used. Standard: IETF (BCP47). Example: [en-GB, de-DE, fr-FR]", @@ -39,8 +69,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Language" + }, + "title": "Language" }, "keywords": { "description": "An array of string keywords to assist users searching for the package in catalogs. Example: [example, template, test]", @@ -49,15 +81,19 @@ "type": [ "string", "null" - ] - } + ], + "title": "Keyword" + }, + "title": "Keyword" }, "publicationDate": { "description": "Date of publishing. Date Format is ISO 8601 (YYYY-MM-DD). Example: 2019-02-06", "type": [ "string", "null" - ] + ], + "title": "Publication date", + "format": "date" }, "context": { "description": "Object. Contains name-value-pairs that describe the general setting, evironment or project leading to the creation or maintenance of this dataset.", @@ -68,59 +104,72 @@ "type": [ "string", "null" - ] + ], + "title": "Homepage", + "format": "uri" }, "documentation": { "description": "URL of project documentation. Example: https://github.com/OpenEnergyPlatform/metadata/wiki/Metadata-Description", "type": [ "string", "null" - ] + ], + "title": "Documentation" }, "sourceCode": { "description": "Url of project source code. Example: https://github.com/OpenEnergyPlatform", "type": [ "string", "null" - ] + ], + "title": "Source code" }, "contact": { "description": "Reference to the creator or maintainer of the data set. Example: contact@example.com", "type": [ "string", "null" - ] + ], + "title": "E-Mail contact", + "format": "email" }, "grantNo": { "description": "In a publicly funded Project: the identifying grant number. Example: 01AB2345", "type": [ "string", "null" - ] + ], + "title": "Grant no" }, "fundingAgency": { "description": "In a funded Project: The name of the funding agency. Example: Bundesministerium für Wirtschaft und Energie", "type": [ "string", "null" - ] + ], + "title": "Funding agency" }, "fundingAgencyLogo": { "description": "In a publicly funded Project: A link to the Logo of the funding agency. Example: https://www.innovation-beratung-foerderung.de/INNO/Redaktion/DE/Bilder/Titelbilder/titel_foerderlogo_bmwi.jpg?__blob=poster&v=2", "type": [ "string", "null" - ] + ], + "title": "Funding agency logo", + "format": "uri" }, "publisherLogo": { "description": "Link to the logo of the publishing institution. Example: https://reiner-lemoine-institut.de//wp-content/uploads/2015/09/rlilogo.png", "type": [ "string", "null" - ] + ], + "title": "Publisher logo", + "format": "uri" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Context" }, "spatial": { "description": "Object. Contains name-value-pairs describing the spatial context of the contained data.", @@ -131,24 +180,28 @@ "type": [ "string", "null" - ] + ], + "title": "Location" }, "extent": { "description": "Covered area. May be the name of a region, or the geometry of a bounding box. Example: Europe", "type": [ "string", "null" - ] + ], + "title": "Extent" }, "resolution": { "description": "Pixel size in case of a regular raster image. Reference to administrative level or other spatial division that is present as the smallest spatially distinguished unit size. Example: 30 m", "type": [ "string", "null" - ] + ], + "title": "Resolution" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Spatial" }, "temporal": { "description": "Temporal object. Time period covered in the data. Temporal information should either contain a \"referenceDate\" or the keys describing a time series; in rare cases both. Use null for the ones that don't apply.", @@ -159,52 +212,63 @@ "type": [ "string", "null" - ] + ], + "title": "Reference date", + "format": "date" }, "timeseries": { "description": "Times series object in temporal object, contains start, end, resolution, alignment and aggregation type properties.", - "type": "object", + "type": "array", "properties": { "start": { "description": "The beginning point in time of a time series. Example: 2019-02-06T10:12:04+00:00", "type": [ "string", "null" - ] + ], + "title": "Start", + "format": "date-time" }, "end": { "description": "The end point in time of a time series. Example: 2019-02-07T10:12:04+00:00", "type": [ "string", "null" - ] + ], + "title": "End", + "format": "date-time" }, "resolution": { "description": "The time span between individual points of information in a time series. Example: 30 s", "type": [ "string", "null" - ] + ], + "title": "Resolution" }, "alignment": { "description": "Indicator whether stamps in a time series are left, right or middle. \"null\" if there is no time series. Example: left", "type": [ "string", "null" - ] + ], + "title": "Alignment" }, "aggregationType": { "description": "Indicates whether the values are a sum, average or current. Example: sum", "type": [ "string", "null" - ] + ], + "title": "Aggregation type" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Timeseries" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Temporal" }, "sources": { "description": "List of source objects. Each object has all name-value-pairs.", @@ -218,21 +282,25 @@ "type": [ "string", "null" - ] + ], + "title": "Title" }, "description": { "description": "Free text description of the data set. Example: Scientific climate change report by the UN", "type": [ "string", "null" - ] + ], + "title": "Description" }, "path": { "description": "URL to original source. Example: https://www.ipcc.ch/site/assets/uploads/2018/02/ipcc_wg3_ar5_full.pdf", "type": [ "string", "null" - ] + ], + "title": "Path", + "format": "uri" }, "licenses": { "description": "The license(s) under which the source(s) is/are provided. List of objects.", @@ -246,42 +314,51 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "A link to the license. Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" - ] + ], + "title": "Path" }, "instruction": { "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", "type": [ "string", "null" - ] + ], + "title": "Instruction" }, "attribution": { "description": "Copyrightholder of the source. Example: © Intergovernmental Panel on Climate Change 2014", "type": [ "string", "null" - ] + ], + "title": "Attribution" } - } - } + }, + "title": "Licenses" + }, + "title": "Licenses" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Sources" + }, + "title": "Sources" }, "licenses": { "description": "The license(s) under which the described package is provided. List of objects.", @@ -295,39 +372,46 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) title. Example: Open Data Commons Open Database License 1.0", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "A url-or-path string, that is a fully qualified HTTP address, or a relative POSIX path (see the url-or-path definition in Data Resource for details). Example: https://opendatacommons.org/licenses/odbl/1-0/index.html", "type": [ "string", "null" - ] + ], + "title": "Path" }, "instruction": { "description": "Short description of rights and restrictions. Example: You are free to share and change, but you must attribute, and share derivations under the same license.", "type": [ "string", "null" - ] + ], + "title": "Instruction" }, "attribution": { "description": "Copyrightholder of the produced data set. Example: © Reiner Lemoine Institut", "type": [ "string", "null" - ] + ], + "title": "Attribution" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Licenses" + }, + "title": "Licenses" }, "contributors": { "description": "The people or organizations who contributed to this data package. List of objects.", @@ -341,39 +425,48 @@ "type": [ "string", "null" - ] + ], + "title": "Title" }, "email": { "description": "E-mail address of the contributor. Example: contact@example.com", "type": [ "string", "null" - ] + ], + "title": "Email", + "format": "email" }, "date": { "description": "Date of the contribution. If the contribution took more than a day, use the date of the final contribiution. Date Format is ISO 8601. Example: 2016-06-16", "type": [ "string", "null" - ] + ], + "title": "Date", + "format": "date" }, "object": { "description": "Target of contribution. Which part of the package was supplied/changed. Example: Metadata", "type": [ "string", "null" - ] + ], + "title": "Object" }, "comment": { "description": "Free text comment on what's been done. Example: Fixed a typo in the title", "type": [ "string", "null" - ] + ], + "title": "Comment" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Contributors" + }, + "title": "Contributors" }, "resources": { "description": "Resources, described as a list of data resource format objects.", @@ -387,35 +480,52 @@ "type": [ "string", "null" - ] + ], + "title": "Profile", + "options": { + "hidden": true + } }, "name": { "description": "A resource MUST contain a name unique to amongst all resources in this data package. To comply with the data package standard it must consist of only lowercase alphanumeric character plus \".\", \"-\" and \"_\". It may not start with a number. In a database this will be the name of the table within its containing schema. It would be usual for the name to correspond to the file name (minus the file-extension) of the data file the resource describes. Example: sandbox.example_table", "type": [ "string", "null" - ] + ], + "title": "Name" }, "path": { "description": "A url-or-path string, that should be a permanent http(s) address or other path directly linking to the resource. Example: directly linking to the resource. https://openenergy-platform.org/dataedit/view/openstreetmap/osm_deu_roads", "type": [ "string", "null" - ] + ], + "title": "Path", + "options": { + "hidden": true + } }, "format": { "description": "\"csv\", \"xls\", \"json\" etc. would be expected to be the standard file extension for this type of resource. When you upload your data to the OEDB, in the shown metadata string, the format will be changed accordingly to \"PostgreSQL\", since the data there are stored in a database. Example: csv", "type": [ "string", "null" - ] + ], + "title": "Format", + "options": { + "hidden": true + } }, "encoding": { "description": "Specifies the character encoding of the resource's data file. The values should be one of the \"Preferred MIME Names\" for a character encoding registered with IANA. If no value for this key is specified then the default is UTF-8. Example: UTF-8", "type": [ "string", "null" - ] + ], + "title": "Encoding", + "options": { + "hidden": true + } }, "schema": { "description": "Object containing fields, primary key and for foreign keys. Describes the structure of the present data.", @@ -433,32 +543,58 @@ "type": [ "string", "null" - ] + ], + "title": "Name", + "readonly": true }, "description": { "description": "Free-text describing the field. Example: Reference year for which the data were collected.", "type": [ "string", "null" - ] + ], + "title": "Description" }, "type": { "description": "Data type of the field. In case of a geom-column in a database, also indicate the shape and CRS. Example: geometry(Point, 4326)", "type": [ "string", "null" - ] + ], + "title": "Type", + "readonly": true + }, + "is_about": { + "description": "Ontology URI to describe the column header", + "type": [ + "string", + "null" + ], + "title": "Is about", + "format": "uri" + }, + "value_reference": { + "description": "Ontology URI for an extended description of the values in the column", + "type": [ + "string", + "null" + ], + "title": "Value reference", + "format": "uri" }, "unit": { - "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"none\". Example: MW", + "description": "Unit, preferably SI-Unit, that values in this field are mapped to. If \"unit\" doesn't apply to a field, use \"null\". Example: MW", "type": [ "string", "null" - ] + ], + "title": "Unit" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Field" + }, + "title": "Field" }, "primaryKey": { "description": "A primary key is a field or set of fields that uniquely identifies each row in the table. It's recorded as a list of strings, since it is possible to define the primary key as made up of several columns. Example: id", @@ -467,8 +603,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Primary key" + }, + "title": "Primary key" }, "foreignKeys": { "description": "List of foreign keys.", @@ -484,8 +622,10 @@ "type": [ "string", "null" - ] - } + ], + "title": "Field" + }, + "title": "Fields" }, "reference": { "description": "The reference to the foreign table.", @@ -496,7 +636,8 @@ "type": [ "string", "null" - ] + ], + "title": "Resource" }, "fields": { "description": "The foreign resource column. List of fields. Example: version", @@ -505,21 +646,27 @@ "type": [ "string", "null" - ] - } + ], + "title": "Field" + }, + "title": "Field" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Reference" } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Foreign Key" + }, + "title": "Foreign Keys" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Schema" }, "dialect": { - "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"none\".", + "description": "Object. A CSV Dialect defines a simple format to describe the various dialects of CSV files in a language agnostic manner. In case of a database, the values in the containing fields are \"null\".", "type": "object", "properties": { "delimiter": { @@ -527,21 +674,29 @@ "type": [ "string", "null" - ] + ], + "title": "Delimiter" }, "decimalSeparator": { "description": "Symbol used to separate the integer part from the fractional part of a number written in decimal form. Depending on language and region this symbol can be \".\" or \",\". Example: .", "type": [ "string", "null" - ] + ], + "title": "Decimal separator" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Dialect", + "options": { + "hidden": true + } } }, - "additionalProperties": false - } + "additionalProperties": false, + "title": "Resource" + }, + "title": "Resource" }, "review": { "description": "Data uploaded through the OEP needs to go through review. The review will cover the areas described here: https://github.com/OpenEnergyPlatform/data-preprocessing/wiki and carried out by a team of the platform. The review itself is documented at the specified path and a badge is rewarded with regards to completeness.", @@ -552,28 +707,35 @@ "type": [ "string", "null" - ] + ], + "title": "Path" }, "badge": { "description": "A badge of either Bronze, Silver, Gold or Platin is used to label the given metadata based on its quality. Example: Platin", "type": [ "string", "null" - ] + ], + "title": "Badge" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Review", + "options": { + "hidden": true + } }, "metaMetadata": { "description": "Object. Description about the metadata themselves, their format, version and license. These fields should already be provided when you’re filling out your metadata.", "type": "object", "properties": { "metadataVersion": { - "description": "Type and version number of the metadata. Example: OEP-1.4", + "description": "Type and version number of the metadata. Example: OEP-1.5", "type": [ "string", "null" - ] + ], + "title": "Metadata version" }, "metadataLicense": { "description": "Object describing the license of the provided metadata.", @@ -584,27 +746,35 @@ "type": [ "string", "null" - ] + ], + "title": "Name" }, "title": { "description": "Official (human readable) license title. Example: Creative Commons Zero v1.0 Universal", "type": [ "string", "null" - ] + ], + "title": "Title" }, "path": { "description": "Url or path string, that is a fully qualified HTTP address. Example: https://creativecommons.org/publicdomain/zero/1.0/", "type": [ "string", "null" - ] + ], + "title": "Path" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Metadata license" } }, - "additionalProperties": false + "additionalProperties": false, + "title": "Meta metadata", + "options": { + "hidden": true + } }, "_comment": { "description": "Object. The “_comment”-section is used as a self-description of the final metadata-file. It is text, intended for humans and can include a link to the metadata documentation(s), required value formats and similar remarks. The comment section has no fix structure or mandatory values, but a useful self-description, similar to the one depicted here, is encouraged.", @@ -615,51 +785,67 @@ "type": [ "string", "null" - ] + ], + "title": "Metadata" }, "dates": { "description": "Comment on data/time format. Example: Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", "type": [ "string", "null" - ] + ], + "title": "Dates" }, "units": { "description": "Comment on units. Example: If you must use units in cells (which is discouraged), leave a space between numbers and units (100 m)", "type": [ "string", "null" - ] + ], + "title": "Units" }, "languages": { "description": "Comment on language format. Example: Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", "type": [ "string", "null" - ] + ], + "title": "Languages" }, "licenses": { "description": "Reference to license format. Example: License name must follow the SPDX License List (https://spdx.org/licenses/)", "type": [ "string", "null" - ] + ], + "title": "Licenses" }, "review": { "description": "Reference to review documentation. Example: Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", "type": [ "string", "null" - ] + ], + "title": "Review" }, "null": { - "description": "Feel free to add more descriptive comments. Like \"none\". Example: If a field is not applicable just enter \"none\"", + "description": "Feel free to add more descriptive comments. Like \"null\". Example: If a field is not applicable just enter \"null\"", "type": [ "string", "null" - ] + ], + "title": "Null" + }, + "todo": { + "description": "If an applicable value is not yet available and will be inserted later on use: 'todo' ", + "type": [ + "string", + "null" + ], + "title": "Todo" } - } + }, + "title": "_comment" } }, "additionalProperties": false diff --git a/metadata/future/schema.py b/metadata/v150/schema.py similarity index 66% rename from metadata/future/schema.py rename to metadata/v150/schema.py index 27e5a63a..c7689409 100644 --- a/metadata/future/schema.py +++ b/metadata/v150/schema.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "schema.json"), "rb") as f: - OEMETADATA_V140_SCHEMA = json.loads(f.read()) + OEMETADATA_V150_SCHEMA = json.loads(f.read()) diff --git a/metadata/v150/template.json b/metadata/v150/template.json new file mode 100644 index 00000000..11f3a6af --- /dev/null +++ b/metadata/v150/template.json @@ -0,0 +1,175 @@ +{ + "name": null, + "title": null, + "id": null, + "description": null, + "subject": null, + "language": [ + null + ], + "keywords": [ + null + ], + "publicationDate": null, + "context": { + "homepage": null, + "documentation": null, + "sourceCode": null, + "contact": null, + "grantNo": null, + "fundingAgency": null, + "fundingAgencyLogo": null, + "publisherLogo": null + }, + "spatial": { + "location": null, + "extent": null, + "resolution": null + }, + "temporal": { + "referenceDate": null, + "timeseries": [{ + "start": null, + "end": null, + "resolution": null, + "alignment": null, + "aggregationType": null + }, + { + "start": null, + "end": null, + "resolution": null, + "alignment": null, + "aggregationType": null + } + ] + }, + "sources": [ + { + "title": null, + "description": null, + "path": null, + "licenses": [ + { + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null + } + ] + }, + { + "title": null, + "description": null, + "path": null, + "licenses": [ + { + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null + } + ] + } + ], + "licenses": [ + { + "name": null, + "title": null, + "path": null, + "instruction": null, + "attribution": null + } + ], + "contributors": [ + { + "title": null, + "email": null, + "date": null, + "object": null, + "comment": null + }, + { + "title": null, + "email": null, + "date": null, + "object": null, + "comment": null + } + ], + "resources": [ + { + "profile": null, + "name": null, + "path": null, + "format": null, + "encoding": null, + "schema": { + "fields": [ + { + "name": null, + "description": null, + "type": null, + "is_about": null, + "value_reference": null, + "unit": null + }, + { + "name": null, + "description": null, + "type": null, + "is_about": null, + "value_reference": null, + "unit": null + } + ], + "primaryKey": [ + null + ], + "foreignKeys": [ + { + "fields": [ + null + ], + "reference": { + "resource": null, + "fields": [ + null + ] + } + } + ] + }, + "dialect": { + "delimiter": null, + "decimalSeparator": "." + } + } + ], + "@id": null, + "@context": null, + "review": { + "path": null, + "badge": null + }, + "metaMetadata": { + "metadataVersion": "OEP-1.5.0", + "metadataLicense": { + "name": "CC0-1.0", + "title": "Creative Commons Zero v1.0 Universal", + "path": "https://creativecommons.org/publicdomain/zero/1.0/" + } + }, + "_comment": { + "metadata": "Metadata documentation and explanation (https://github.com/OpenEnergyPlatform/organisation/wiki/metadata)", + "dates": "Dates and time must follow the ISO8601 including time zone (YYYY-MM-DD or YYYY-MM-DDThh:mm:ss±hh)", + "units": "Use a space between numbers and units (100 m)", + "languages": "Languages must follow the IETF (BCP47) format (en-GB, en-US, de-DE)", + "licenses": "License name must follow the SPDX License List (https://spdx.org/licenses/)", + "review": "Following the OEP Data Review (https://github.com/OpenEnergyPlatform/data-preprocessing/wiki)", + "null": "If not applicable use: null", + "todo": "If a value is not yet available, use: todo" + } +} \ No newline at end of file diff --git a/metadata/future/template.py b/metadata/v150/template.py similarity index 66% rename from metadata/future/template.py rename to metadata/v150/template.py index 380306df..f584abe1 100644 --- a/metadata/future/template.py +++ b/metadata/v150/template.py @@ -2,4 +2,4 @@ import os with open(os.path.join(os.path.dirname(__file__), "template.json"), "rb") as f: - OEMETADATA_V140_TEMPLATE = json.loads(f.read()) + OEMETADATA_V150_TEMPLATE = json.loads(f.read()) diff --git a/setup.py b/setup.py index c4c06faa..bf666a35 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name="oemetadata", - version="1.1.0", + version="1.5.0", description="Open Energy Platform (OEP) - metadata schemas, examples and templates package", long_description=long_description, long_description_content_type="text/markdown", @@ -21,7 +21,7 @@ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.9", ], keywords="JSON metadata schema open energy platform oep", packages=find_packages(exclude=["tests"]), diff --git a/tests/metadata/v150/__init__.py b/tests/metadata/v150/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/metadata/v150/test_example.py b/tests/metadata/v150/test_example.py new file mode 100644 index 00000000..018c9bd2 --- /dev/null +++ b/tests/metadata/v150/test_example.py @@ -0,0 +1,10 @@ +def test_if_example_json_loads_successfully(): + from metadata.v150.example import OEMETADATA_V150_EXAMPLE + + +def test_example_against_schema_which_should_succeed(): + import jsonschema + from metadata.v150.example import OEMETADATA_V150_EXAMPLE + from metadata.v150.schema import OEMETADATA_V150_SCHEMA + + assert jsonschema.validate(OEMETADATA_V150_EXAMPLE, OEMETADATA_V150_SCHEMA) == None diff --git a/tests/metadata/v150/test_schema.py b/tests/metadata/v150/test_schema.py new file mode 100644 index 00000000..e0155f8e --- /dev/null +++ b/tests/metadata/v150/test_schema.py @@ -0,0 +1,28 @@ +def test_if_schema_json_loads_successfully(): + try: + from metadata.v150.schema import OEMETADATA_V150_SCHEMA + except Warning: + print("Metadata Schema v1.5.0 cant load. Check if the files are missing!") + + +def test_if_schema_json_has_correct_schema_and_id_set(): + from metadata.v150.schema import OEMETADATA_V150_SCHEMA + import string + + def get_string(s): + return string.printable + s + string.printable + + assert get_string(OEMETADATA_V150_SCHEMA["$schema"]) == get_string("http://json-schema.org/draft-07/schema#") + + # https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json + assert get_string(OEMETADATA_V150_SCHEMA["$id"]) == get_string( + "https://raw.githubusercontent.com/OpenEnergyPlatform/oemetadata/master/oemetadata/v150/schema.json" + ) + + +def test_schema_against_metaschema_which_should_succeed(): + import jsonschema + from metadata.v150.schema import OEMETADATA_V150_SCHEMA + from metadata.metaschema.draft07.schema import OEMETADATA_METASCHEMA_DRAFT07_SCHEMA + + assert jsonschema.validate(OEMETADATA_V150_SCHEMA, OEMETADATA_METASCHEMA_DRAFT07_SCHEMA) is None diff --git a/tests/metadata/v150/test_template.py b/tests/metadata/v150/test_template.py new file mode 100644 index 00000000..f6fe4067 --- /dev/null +++ b/tests/metadata/v150/test_template.py @@ -0,0 +1,10 @@ +def test_if_template_json_loads_successfully(): + from metadata.v150.template import OEMETADATA_V150_TEMPLATE + + +def test_template_against_schema_which_should_succeed(): + import jsonschema + from metadata.v150.template import OEMETADATA_V150_TEMPLATE + from metadata.v150.schema import OEMETADATA_V150_SCHEMA + + assert jsonschema.validate(OEMETADATA_V150_TEMPLATE, OEMETADATA_V150_SCHEMA) == None diff --git a/tox.ini b/tox.ini index 82d5522c..bc4a826e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = {py36,py37} +envlist = py39 skipsdist = True [testenv]