1. Project metadata#
Projects entries have the top level information about the results you are going to publish. Typically an OSC project corresponds to a project financed by the European Space Agency - Earth Observation programme. Before creating new project, check if your project is not already on the list of onboarded projects. In such case you can use your project entry and only update it where needed.
The project STAC Collection provides a general description of your ESA-funded project - including its official title, short descrption, time span, consortium members involved, related themes, etc.
Metadata of each project is stored in a folder named after their unique id (collectionid). Each folder has one file - collection.json that has all the project information (metadata).
Edit parameters below to specify all the required information. See helper description in the comments inside that code cell.
See example project metadata directly at open science catalogue metadata repository on GitHub to compare the list of required parameters and their format: See example project: WAPOSAL
LICENSE: In this step you are required to select one of the available licenses for all your products generated by the project.
Please have a look at available list of license and pick the one that defines your datasets: osc-licence schemas.
Visit EarthCODE Best Practices to learn more about Open Data & Licensing
If you have doubts which license you should define for your products/workflows, please use the list of licenses by SPDX and select the most appropriate one.
This notebook shows how to create an OSC project entry using the current earthcode API, save it in a local OSC catalog clone, and validate the full catalog.
from datetime import datetime
from pathlib import Path
from earthcode.metadata_input_definitions import ProjectCollectionMetadata
from earthcode.static import create_project_collection
from earthcode.git_add import save_project_collection_to_osc
from earthcode.validator import validate_catalog
# Local OSC clone root path (assumed one folder above repository root)
catalog_root = str(Path("../open-science-catalog-metadata").resolve())
# A custom id of the project, it can be related to the title, i.e. - 4datlantic-ohc. Use dash "-" symbol to separare words in the id"
project_id = ""
# Specify the Title of your project. I.e. - 4DAtlantic-OHC. This should correspond to the title of the project as in the ESA contract.
project_title = ""
# A short description of the project:
project_description = ""
# Project status: pick from - ongoing or completed
project_status = ""
# Overall license for all related data that will be uploaded from the project., i.e. CC-BY-4.0. See the note in the markdown cell above to consult full list of available licenses.
# If you have multiple licenses, you can pick 'various'
project_license = ""
# Define spatial extent of the project study area in epsg:4326
# if you have multiple disjoint study areas, specify the bounding box that covers all of them
# i.e project_s, project_w, project_n, project_e = -180.0, -90.0, 180.0, 90.0
project_s = -180.0
project_w = -90.0
project_n = 180.0
project_e = 90.0
# The project start and end times
project_start_year = 2021
project_start_month = 1
project_start_day = 1
project_end_year = 2021
project_end_month = 12
project_end_day = 31
# Define the links to the project websites
website_link = "" # link to proejct-dedicated website (hosted also on external servers)
eo4society_link = "" # link to the project website on eo4society projects list: Discover the list of published projects here: https://eo4society.esa.int/projects/
# Define project themes, according to OSC ontology. Pick one or more from:
# - atmosphere, cryosphere, land, magnetosphere-ionosphere, oceans, solid-earth.
# See the list here: https://github.com/ESA-EarthCODE/open-science-catalog-metadata/blob/main/themes/catalog.json
project_themes = [""]
# provide the Name and e-mail address to ESA Technical Officer (TO) supporting your project:
to_name = ""
to_email = ""
# List the consortium members in a tuple with format (name, contact_email), for example - ('University A', "contact@universitya.fr")
consortium_members = [("", "")]
Create Project collection#
ℹ️ Note
This function creates a project collection and automatically generates STAC Collection.json and all required STAC links.
It connects the project with related products, themes, and missions, and updates existing entries as needed.
Run the cell below to automatically create new entry.
project_bbox = [[project_w, project_s, project_e, project_n]]
project_metadata = ProjectCollectionMetadata(
project_id=project_id,
project_title=project_title,
project_description=project_description,
project_status=project_status,
project_license=project_license,
project_bbox=project_bbox,
project_start_datetime=datetime(project_start_year, project_start_month, project_start_day),
project_end_datetime=datetime(project_end_year, project_end_month, project_end_day),
project_themes=project_themes,
to_name=to_name,
to_email=to_email,
consortium_members=consortium_members,
website_link=website_link,
eo4society_link=eo4society_link or None,
)
project_collection = create_project_collection(project_metadata)
Validate your entry and save to local fork of open-science-catalog-metadata repository#
There will be two types of checks before accepting your entry into the main OSC:
Automatic verification
Semantic validation
You can see the results of the automatic checks using the library.
catalog_root = Path(catalog_root)
save_project_collection_to_osc(project_collection, catalog_root)
errors, error_files = validate_catalog(catalog_root)
if errors or error_files:
raise AssertionError(f"Catalog validation failed. errors={len(errors)} files={len(error_files)}")
print(f"Saved project: {project_collection.id}")
print("Catalog validation passed.")