Giter VIP home page Giter VIP logo

zbmed-semtec.github.io's Introduction

Semantic technologies team at ZB MED

Combining semantic technologies and data analytics

We are a multidisciplinary Research and Development team combining semantic technologies and data analytics. We work on the development of softare components and services to support and improve research on information retrieval, data science and literature-based knowledge discovery with a particular focus on reproducibility. Our areas of application include the evaluation of experimental retrieval and recommendation systems, practical support to FAIR+R principles for software and data science, and data analytics from the combination of ontologies and literature-extracted data in the Life Sciences domain.

Here you will find information about our team as well as the projects we work on together with the research artifacts that we have produced.

The Semantic Technologies team is part of the Knowledge Management group at ZB MED Information Centre for Life Sciences.

If you are interested in working with us, please visit the Current Vacancies pages. If you are a bachelor student interested in doing their Praxisprojekt with us, feel free to contact us at anytime.

Developer Documentation

This documentation provides an overview of the Python code used to convert metadata JSON files from subfolders under the /metadata directory into Markdown files under the /docs directory, Each Markdown file is named after the original subfolder in the /metadata directory. The content of these new Markdown files is created by appending the content of each JSON file that was previously located in the subfolder. The metadata is presented as tables for each JSON file in the new generated Markdown files.

Getting Started

To run the code, follow these steps:

  1. Ensure you have Python installed on your system.
  2. Ensure that you have the necessary dependencies installed. In this case, you can find the full list of dependencies in the requirement.txt You can use the following command to install the dependencies directly pip install -r requirement.txt
  3. Make sure to execute the code while being in the \zbmed-semtec.github.io\ path.
  4. The script will start executing, converting JSON files to Markdown files.

Code Overview

The Python code provided performs the following tasks divided in functions:

  1. fromMetadatatoDocs(): Copies subfolders from the "metadata" directory to the "docs" directory, converting JSON files to Markdown files.
  2. generateMDTableFromJSON(jsonData, outputFile, FolderName, jsonFile): Generates a Markdown file from JSON data. It uses Subfunctions 2.1. renderProperty(name, value): Renders property values as HTML. 2.2. renderInnerTable(obj): Renders a nested table as HTML. 2.3. renderInnerList(lst): Renders a nested list as HTML.
    2.4. appendScriptToMDFile(mdFile): Appends a script to a Markdown file.
  3. AnotherJsonInSubfolder(jsonData, outputFile, jsonFile): Same as **generateMDTableFromJSON only for Appending further JSON file to a current Markdown file.
  4. appendScriptToMDFile(jsonFile, mdFile): Appending the JSON as script.
  5. getCurrentGitUrl(): Getting the current Git repository.
  6. complexDataInList(data): Converts complex JSON element into a single element list.
  7. createTableLink(data): Creates a link for the table with @id URL.
  8. categorizePeople(): Categorize team members into current and former team members and append them to the associated arrays.
  9. def generateCategorizePeopleTable(currentTeamData, formerTeamData, outputFile, folderName):: Generates Markdown tables for the categorized arrays of current and former team members.
  10. def processProjectData(fromMetadata, toDocs):: Process JSON data for the "project" and generate a Markdown file.

Output

After the code has been executed successfully, a new Markdown file is created with the the same name as the subfolder from /metadata. The Markdown file contains the contents of all JSON files that were presented in the subfolder in /metadata and it presents them as HTML Tables. One table for each JSON file on the same Page.

zbmed-semtec.github.io's People

Contributors

honeyl3 avatar ljgarcia avatar rohitharavinder avatar

Watchers

 avatar  avatar

Forkers

honeyl3

zbmed-semtec.github.io's Issues

Developer story: How to use the team pages repo

As a developer, I wan to know how the team pages repo work. For instance, what technology is used to create the pages (markdocs and GitHub actions) and how are the pages created (dynamically from the metadata folder using the createPage.py, and statically adding pages directly to docs folder). I also want to know how I should run the createPage.py and what to do next (it has to run from the repo root due the to relative paths it uses and then there should be a commit of the created files so the GitHub actions are triggered and the pages are created).

Task: add a new section to the readme.me "Developer documentation" covering the points above, use subsections to better organize the text.

Developer story: I want the json-ld to be embedded in the rendering page

As a developer, whenever a json from the /metadata folder is converted into a page in the /docs folder, I want the json to be embedded in the rendering page.

For the sample.json example, when the sample.md is created, (see issue #4), at the end of the sample.md, the following code should be added:

<script type="application/ld+json">
{ 
    "@context": "https://schema.org", 
    "@type": "Dataset",
    "@id": "https://github.com/BioSchemas/github-markup-example/blob/main/data/sample.csv",
    "http://purl.org/dc/terms/conformsTo": "https://bioschemas.org/profiles/Dataset/0.4-DRAFT", 

    "description": "Toy data used as an example on how to add Bioschemas markup to your data",
    "identifier": "https://github.com/BioSchemas/github-markup-example/blob/main/data/sample.csv",
    "keywords":  [
      {
        "@type": "DefinedTerm", 
        "@id": "http://edamontology.org/data_0006", 
        "name": "Data"
      },
      "Sample data"
    ], 
    "license": "https://creativecommons.org/licenses/by/4.0/",
    "name": "Hello fruit data",
    "url": "https://bioschemas.org/github-markup-example/data.html" 
}
</script>

See example at https://zbmed-semtec.github.io/bioschemas-github-markup-example/data.html (you need to use developer tools to see the code)

User story: I want to see a table with the dataset information

As a user, I do not want to see the json code but a page with a table with the information for a dataset.

  • The properties "@type", "@id", "@context", and "http://purl.org/dc/terms/conformsTo" will not be rendered
  • The title of the page would be "Dataset information"
  • Under the title there would be a link with the text "Click here to access this dataset" and the link would be the url in the "@id" property
  • The table would have one column with the name of the property and another with the value of the property
  • The table will support second nested properties using a list with direct elements and inner tables if needed (for JSON objects, i.e., identified because they are surrounded by {} brackets)
  • Whenever there is a nested "@id", there will be a link "Click here for more information on this object" and a link using the url in the "@id" property, indicate the type before the link
  • Use different row backgrounds for odd and even columns, similar to https://www.researchobject.org/packaging_data_with_ro-crate/files/rainfall-1.2.1/ro-crate-preview.html, in the example I used styles, see what styles for tables exist and what looks nice, maybe use a second style for the inner tables
  • Anything that looks like a URL should be clickable and open in another tab

For the the sample.json, a file sample.md under /docs/datasets would be created and it would look like

Image

And the corresponding code looks like:

<h1>Dataset metadata</h1>
<p><a href="https://github.com/BioSchemas/github-markup-example/blob/main/data/sample.csv" target="_blank">Click here to get the metadata for this object in JSON-LD</a></p>
<table class="blueTable">
<tbody>
  <tr>
    <td>description</td>
    <td>Toy data used as an example on how to add Bioschemas markup to your data</td>
  </tr>
  <tr>
    <td>identifier</td>
    <td><a href="https://github.com/BioSchemas/github-markup-example/blob/main/data/sample.csv" target="_blank">https://github.com/BioSchemas/github-markup-example/blob/main/data/sample.csv</a></td>
  </tr>
  <tr>
    <td>keywords</td>
    <td>
      <ul>
        <li>
          <table class="blueTable">
          <tbody>
            <tr>
              <td colspan="2">DefinedTerm - <a href="http://edamontology.org/data_0006" target="_blank">Click here for more information on this object</a></td>
            </tr>
            <tr>
              <td>name</td>
              <td>Data</td>
            </tr>
          </tbody>
          </table>
        </li>
        <li>Sample data</li>
      </ul>
    </td>
  </tr>
  <tr>
    <td>license</td>
    <td><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">https://creativecommons.org/licenses/by/4.0/</a></td>
  </tr>
  <tr>
    <td>name</td>
    <td>Hello fruit data</td>
  </tr>
  <tr>
    <td>url</td>
    <td><a href="https://bioschemas.org/github-markup-example/data.html" target="_blank">https://bioschemas.org/github-markup-example/data.html</a></td>
  </tr>
</tbody>
</table>

User story: Redundant information in pages

As a user, I can imagine that former tam members are all alumni of ZB MED and current team member are all members of members of ZB MED. There is no need to repeat this information.

To cover this case, let's create a list of properties not to be processed. ``alumniOf``` should be in that list and not be rendered at all.

Developer story: styling the inner table

As a developer, I would like to improve the styling of the inner table, by adding extra spacing between the rows, use horizontal lines or try to use floating divs.

Developer Story: Replace the link above the table

As a Developer I want replace the text "Download JSON-LD" and the corresponding link with a link to the JSON file that serves as the data source for the table. Also I wanted to add an icon to it

User story: Have an overview of what's going on in the SemTec team

As a researcher visiting the pages of the SemTec team, I want to get an overview of what's going on there in terms of: projects and results.

For this we need to create a folder structure under the docs folder (the one used by the pages) as follows:

  • Projects
  • Datasets
  • Software
  • Vocabularies
  • People
  • Collaborations

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.