From dd86a49ba160380e95b796f88491cf3f21144bea Mon Sep 17 00:00:00 2001 From: caviri <45425937+caviri@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:29:31 +0200 Subject: [PATCH] feat(Catalog & Web): Initial schema and index.html --- README.md | 93 +++++++++++++++++++++++- catalog/schemas/dataset.json | 96 +++++++++++++++++++++++++ catalog/templates/dataset_template.yaml | 21 ++++++ src/index.html | 33 +++++++++ src/index.json | 92 ++++++++++++++++++++++++ src/script.js | 26 +++++++ src/styles.css | 59 +++++++++++++++ 7 files changed, 418 insertions(+), 2 deletions(-) create mode 100644 catalog/schemas/dataset.json create mode 100644 catalog/templates/dataset_template.yaml create mode 100644 src/index.html create mode 100644 src/index.json create mode 100644 src/script.js create mode 100644 src/styles.css diff --git a/README.md b/README.md index 2be4a30..2da6415 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,91 @@ -# ordfts-hackathon-pneuma-rdi-hub -This is an example of a hackathon project proposing an RDI Hub around the pNeuma project +# PNEUMA RDI Hub + +[![Badge Name](https://example.com/badge-image.png)](https://example.com/badge-link) + +> [!CAUTION] +> This project is not an official RDI Hub by the pNeuma team. It is a prototype created for the hackathon and intended to serve as inspiration. We would like to express our gratitude to the pNeuma team for their support and guidance in this endeavor. + +This is an example of a hackathon project proposing a Research Data Infrastrucre (RDI) Hub prototype around the pNeuma project. The RDI is designed with simplicity in mind, a flexible structure that allows iterative development next to the community, and a low operational cost. For this reasons, the RDI takes advantage of Github techonology in order to host a catalog of research assets, provide a discussion forum, and distribute the content via github pages. + +- [Go here if you wanna know more about the hackathon](https://sdsc-hackathons.ch/) +- [EPFL pNeuma project](https://open-traffic.epfl.ch) + +## Features of this RDI Hub + +- **Catalog of related assets**: These are cards +- **Contributions & revision guidelines**: +- **Automations**: +- **Static landing page**: +- **Blog**: +- **Interative serverless webapps**: +- **Tutorials**: Basic operations + + +This RDI Hub follow the FAIR principles: + +- Findability: It helps to find related assets via the catalog and the static landing page. +- Accesibility: +- Interoperability: The catalog follows the schema located in `./catalog/schemas/` and is available in machine-readable format allowing for easy interaction between tools, programming languages, and frameworks. +- Reproducibility: The mandatory request of D.O.I. of each asset used increase the reproducibility of the results in related + +Besides this, we would like to add more presence to the importance of the governance. With this model the + +## RDI Hub Structure + +This RDI Hub Catalog is organized in: + +- `catalog`: +- `site`: + +The structure can evolve with the time as a function of the community needs. New RDI Hub structures proposals can be made by the community via fork of this repository and requesting a pull request. + + +### Catalog + +This is where the catalog of assets is located. The assets available in this first prototype are: + +- Datasets +- Repositories +- Publications +- Models +- Webapps +- Projects + +Each of these assets type has one basic metadata file requested. + +## How to...? + +### How the community can add a new research asset? + +1. Fork the RDI-Hub. +2. Use the schema template located in `/catalog/schemas` +3. Fill the template with all requested data and start a Pull Request (PR) to this repository. +4. This will open a discussion thread with the community and moderators of the hub. +5. The PR approval will trigger a github action, validating the item added. +6. + + +#### How to add a new project to this Hub? + + +#### How to add a new datasets/model/publication to the Hub? + + +### How the community can add a new research asset type? + +Addidn or editing a research schema is as easy a modifying one of the files located in `/catalog/schemas` + +### How the community can add a new webapp? + +Making use of the last development in webassembly technologies + + +### How the page is built? + +### How is the roadmap organized? + +Open issues are registered in the repository and taken by the community. + +## Develop by + +Develop by SDSC in the frame of the Open Research Data for the Sciences Hackathon in collaboration with the EPFL Open Science office. We thanks the pNeuma Team for the support during the development of this prototype. diff --git a/catalog/schemas/dataset.json b/catalog/schemas/dataset.json new file mode 100644 index 0000000..67df0c0 --- /dev/null +++ b/catalog/schemas/dataset.json @@ -0,0 +1,96 @@ +{ + "version": "1.0.0", + "type": "object", + "properties": { + "dataset_id": { + "type": "string", + "description": "A unique identifier for the dataset" + }, + "title": { + "type": "string", + "description": "The title of the dataset" + }, + "doi": { + "type": "string", + "description": "The DOI of the dataset" + }, + "description": { + "type": "string", + "description": "A brief description of the dataset" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the dataset was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the dataset was last updated" + }, + "data_format": { + "type": "string", + "description": "The format of the dataset (e.g., CSV, JSON, Parquet)" + }, + "tags": { + "type": "array", + "description": "A list of tags or keywords associated with the dataset", + "items": { + "type": "string" + } + }, + "source": { + "type": "string", + "description": "The source or origin of the dataset" + }, + "authors": { + "type": "object", + "description": "The authors or creators of the dataset", + "properties": { + "name": { + "type": "string", + "description": "Name of the author of the dataset" + }, + "orcid": { + "type": "string", + "description": "ORCID of the researcher author of the dataset" + } + }, + "required": ["name"] + }, + "license": { + "type": "string", + "description": "The license under which the dataset is released (e.g., CC BY 4.0, MIT)" + }, + "access_url": { + "type": "string", + "description": "The URL where the dataset can be accessed or downloaded" + }, + "documentation_url": { + "type": "string", + "description": "The URL to the documentation or additional resources for the dataset" + }, + "access_endpoint": { + "type": "string", + "description": "The URL to the documentation or additional resources for the dataset" + }, + "documentation_endpoint": { + "type": "string", + "description": "The URL to the documentation for the api" + } + }, + "required": [ + "dataset_id", + "title", + "doi", + "description", + "created_at", + "data_format", + "size_in_mb", + "source", + "authors", + "license", + "access_url" + ], + "additionalProperties": false +} diff --git a/catalog/templates/dataset_template.yaml b/catalog/templates/dataset_template.yaml new file mode 100644 index 0000000..f6c0244 --- /dev/null +++ b/catalog/templates/dataset_template.yaml @@ -0,0 +1,21 @@ +version: 1.0.0 +dataset_id: "000001" +title: "Data title" +doi: "10.1234/data_doi" +description: "This dataset containsl...." +created_at: "2023-01-01T12:00:00Z" +updated_at: "2023-06-15T12:00:00Z" +data_format: "CSV" +tags: + - tag 1 + - tag 2 + - tag 3 +source: "National Meteorological Organization" +authors: + name: "Dr. Jane Doe" + orcid: "0000-0002-1825-0097" +license: "CC BY 4.0" +access_url: "https://example.com/datasets/...." +documentation_url: "https://example.com/datasets/...." +api_endpoint: "https://example.com/api/...." +api_documentation: "https://example.com/api/...." \ No newline at end of file diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..5acc97c --- /dev/null +++ b/src/index.html @@ -0,0 +1,33 @@ + + + + + + pNeuma RDI Hub Prototype + + + + +

pNeuma RDI Hub Prototype

+ +
+

CAUTION

+

This project is not an official RDI Hub by the pNeuma team. It is a prototype created for the hackathon and intended to serve as inspiration. We would like to express our gratitude to the pNeuma team for their support and guidance in this endeavor.

+
+ +

This is an example of a hackathon project proposing a Research Data Infrastructure (RDI) Hub prototype around the pNeuma project. The RDI is designed with simplicity in mind, a flexible structure that allows iterative development next to the community, and a low operational cost. For these reasons, the RDI takes advantage of GitHub technology in order to host a catalog of research assets, provide a discussion forum, and distribute the content via GitHub Pages.

+ + + +
+ +
+ + + + + diff --git a/src/index.json b/src/index.json new file mode 100644 index 0000000..4ba8eb2 --- /dev/null +++ b/src/index.json @@ -0,0 +1,92 @@ +{ + "index_timestamp": "2024-08-30T12:00:00Z", + "catalog": { + "datasets": [ + { + "version": "1.0.0", + "dataset_id": "123e4567-e89b-12d3-a456-426614174000", + "title": "Global Climate Data 2023", + "doi": "10.1234/global-climate-2023", + "description": "This dataset contains global climate data for the year 2023, including temperature, precipitation, and atmospheric pressure readings from various regions around the world.", + "created_at": "2023-01-01T12:00:00Z", + "updated_at": "2023-06-15T12:00:00Z", + "data_format": "CSV", + "tags": ["climate", "temperature", "precipitation", "atmospheric pressure"], + "source": "National Meteorological Organization", + "authors": { + "name": "Dr. Jane Doe", + "orcid": "0000-0002-1825-0097" + }, + "license": "CC BY 4.0", + "access_url": "https://example.com/datasets/global-climate-2023", + "documentation_url": "https://example.com/datasets/global-climate-2023/documentation", + "access_endpoint": "https://api.example.com/climate/2023/data", + "documentation_endpoint": "https://api.example.com/climate/2023/docs" + }, + { + "version": "1.0.0", + "dataset_id": "223e4567-e89b-12d3-a456-426614174111", + "title": "Regional Climate Data 2022", + "doi": "10.1234/regional-climate-2022", + "description": "This dataset provides detailed climate data for specific regions for the year 2022.", + "created_at": "2022-01-01T12:00:00Z", + "updated_at": "2022-12-15T12:00:00Z", + "data_format": "JSON", + "tags": ["climate", "regional data", "temperature"], + "source": "Regional Weather Stations", + "authors": { + "name": "Dr. John Smith", + "orcid": "0000-0002-3456-7890" + }, + "license": "MIT", + "access_url": "https://example.com/datasets/regional-climate-2022", + "documentation_url": "https://example.com/datasets/regional-climate-2022/documentation", + "access_endpoint": "https://api.example.com/climate/2022/data", + "documentation_endpoint": "https://api.example.com/climate/2022/docs" + }, + { + "version": "1.0.0", + "dataset_id": "323e4567-e89b-12d3-a456-426614174222", + "title": "Global Economic Indicators 2023", + "doi": "10.1234/global-economic-2023", + "description": "This dataset includes global economic indicators such as GDP, inflation rates, and unemployment figures for the year 2023.", + "created_at": "2023-02-01T12:00:00Z", + "updated_at": "2023-07-01T12:00:00Z", + "data_format": "Parquet", + "tags": ["economy", "GDP", "inflation", "unemployment"], + "source": "World Economic Forum", + "authors": { + "name": "Dr. Emily Johnson", + "orcid": "0000-0003-1234-5678" + }, + "license": "CC BY-SA 4.0", + "access_url": "https://example.com/datasets/global-economic-2023", + "documentation_url": "https://example.com/datasets/global-economic-2023/documentation", + "access_endpoint": "https://api.example.com/economy/2023/data", + "documentation_endpoint": "https://api.example.com/economy/2023/docs" + }, + { + "version": "1.0.0", + "dataset_id": "423e4567-e89b-12d3-a456-426614174333", + "title": "Regional Economic Data 2022", + "doi": "10.1234/regional-economic-2022", + "description": "This dataset provides economic data for various regions in 2022, including GDP and unemployment rates.", + "created_at": "2022-03-01T12:00:00Z", + "updated_at": "2022-09-01T12:00:00Z", + "data_format": "CSV", + "tags": ["economy", "regional", "GDP", "unemployment"], + "source": "Regional Economic Offices", + "authors": { + "name": "Dr. Michael Lee", + "orcid": "0000-0004-5678-9101" + }, + "license": "Apache 2.0", + "access_url": "https://example.com/datasets/regional-economic-2022", + "documentation_url": "https://example.com/datasets/regional-economic-2022/documentation", + "access_endpoint": "https://api.example.com/economy/2022/data", + "documentation_endpoint": "https://api.example.com/economy/2022/docs" + } + ] + } + } + \ No newline at end of file diff --git a/src/script.js b/src/script.js new file mode 100644 index 0000000..c279986 --- /dev/null +++ b/src/script.js @@ -0,0 +1,26 @@ +fetch('index.json') + .then(response => response.json()) + .then(data => { + const container = document.querySelector('.dataset-container'); + data.catalog.datasets.forEach(dataset => { + const datasetDiv = document.createElement('div'); + datasetDiv.classList.add('dataset'); + datasetDiv.innerHTML = ` +

${dataset.title}

+

DOI: ${dataset.doi}

+

${dataset.description}

+

Created At: ${dataset.created_at}

+

Updated At: ${dataset.updated_at}

+

Format: ${dataset.data_format}

+

Size: ${dataset.size_in_mb} MB

+

Tags: ${dataset.tags.join(', ')}

+

Source: ${dataset.source}

+

Authors: ${dataset.authors.name} (ORCID: ${dataset.authors.orcid})

+

License: ${dataset.license}

+ Access Dataset + View Documentation + `; + container.appendChild(datasetDiv); + }); + }) + .catch(error => console.error('Error loading datasets:', error)); diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000..a81efec --- /dev/null +++ b/src/styles.css @@ -0,0 +1,59 @@ +body { + font-family: Arial, sans-serif; + margin: 20px; + background-color: #f8f9fa; +} + +h1 { + color: #2c3e50; +} + +p { + font-size: 16px; + color: #34495e; +} + +.caution-box { + background-color: #fef3c7; + border-left: 6px solid #f59e0b; + padding: 10px; + margin: 20px 0; +} + +.dataset-container { + margin-top: 30px; +} + +.dataset { + background-color: #ffffff; + border: 1px solid #d1d5db; + border-radius: 8px; + padding: 15px; + margin-bottom: 20px; +} + +.dataset h2 { + margin-top: 0; +} + +.dataset p { + margin: 5px 0; +} + +.button { + display: inline-block; + padding: 10px 15px; + margin: 5px 0; + font-size: 14px; + color: #ffffff; + background-color: #007bff; + border: none; + border-radius: 5px; + text-align: center; + text-decoration: none; + cursor: pointer; +} + +.button-secondary { + background-color: #6c757d; +}