Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML batch_1 update #100

Merged
merged 6 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 37 additions & 18 deletions collections/CDS1_temperature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,49 @@ Name: temperature
Title: Global temperature
EodashIdentifier: CDS1_temperature
Subtitle: Global temperature description
Description: CDS1_temperature/CDS.md
Description: CDS1_temperature/CDS1_temperature.md
Themes:
- air
- air
Tags:
- placeholder
Satellite:
- ICEYE
Sensor:
- placeholder
- Copernicus Services
- C3S
- CDS
- Open data
DataSource:
Other:
- ERA5
Agency:
- ESA
License: MIT
- European Commission
- ECMWF
License:
- Url: https://cds.climate.copernicus.eu/api/v2/terms/static/licence-to-use-copernicus-products.pdf
Type: application/pdf
Title: Licence to Use Copernicus Products
Provider:
- Name: Copernicus Climate Change Service
Url: https://cds.climate.copernicus.eu/cdsapp#!/dataset/10.24381/cds.68d2bb30
- Name: Climate Data Store
Url: https://cds.climate.copernicus.eu/cdsapp#!/dataset/10.24381/cds.68d2bb30
Citation:
Citation: |
Muñoz Sabater, J., (2019) was downloaded from the Copernicus Climate Change Service (2021).
The results contain modified Copernicus Climate Change Service information 2020.
Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains.
DOI: 10.24381/cds.68d2bb30
Publication:
- Citation: Zaitchik, B.F., Sweijd, N., Shumake-Guillemot, J. et al. A framework for research linking weather, climate and COVID-19. Nat Commun 11, 5730 (2020).
DOI: 10.1038/s41467-020-19546-7
Image: CDS1_temperature/CDS1_temperature.png
Legend: CDS1_temperature/CDS1_legend.png
Resources:
- Group: Sentinel Hub Resources
- EndPoint: https://services.sentinel-hub.com
Name: Sentinel Hub
Type: byoc
CollectionId: 0b3eebec-30de-4fa6-9cd3-4b252d45d847
LayerId: AWS_VIS_2MTEMPERATURE
- EndPoint: https://services.sentinel-hub.com
Name: Sentinel Hub
Type: byoc
CollectionId: 0b3eebec-30de-4fa6-9cd3-4b252d45d847
LayerId: AWS_VIS_2MTEMPERATURE
Services:
- Endpoint: https://services.sentinel-hub.com/api/v1/statistics
Name: Statistical API
Type: byoc
CollectionId: 0b3eebec-30de-4fa6-9cd3-4b252d45d847
Script: CDS1_temperature/script.js
Image: CDS1_temperature/thumbnail.png
Legend: CDS1_temperature/cm_legend.png
Script: CDS1_temperature/CDS1_temperature.js
50 changes: 37 additions & 13 deletions generators/generate_indicators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,21 +1033,45 @@ def add_collection_information(config, collection, data):
# Add metadata information
# Check license identifier
if "License" in data:
license = lookup.by_id(data["License"])
if license is not None:
collection.license = license.id
if license.sources:
# add links to licenses
for source in license.sources:
collection.links.append(Link(
# Check if list was provided
if isinstance(data["License"], list):
if len(data["License"]) == 1:
collection.license = 'proprietary'
link = Link(
rel="license",
target=data["License"][0]["Url"],
media_type=data["License"][0]["Type"] if "Type" in data["License"][0] else "text/html",
)
if "Title" in data["License"][0]:
link.title = data["License"][0]["Title"]
collection.links.append(link)
elif len(data["License"]) > 1:
collection.license = 'various'
for l in data["License"]:
link = Link(
rel="license",
target=source,
media_type="text/html",
))
target=l["Url"],
media_type="text/html" if "Type" in l else l["Type"],
)
if "Title" in l:
link.title = l["Title"]
collection.links.append(link)
else:
# fallback to proprietary
print("WARNING: License could not be parsed, falling back to proprietary")
collection.license = "proprietary"
license = lookup.by_id(data["License"])
if license is not None:
collection.license = license.id
if license.sources:
# add links to licenses
for source in license.sources:
collection.links.append(Link(
rel="license",
target=source,
media_type="text/html",
))
else:
# fallback to proprietary
print("WARNING: License could not be parsed, falling back to proprietary")
collection.license = "proprietary"
else:
# print("WARNING: No license was provided, falling back to proprietary")
pass
Expand Down
Loading