KG hub template for tools to generate knowledge graphs for projects
This template could be used for data ingestion for varied sources.
Components
- Download: The download.yaml contains all the URLs for the source data.
- Transform: The transform_utils contains the code relevant to trnsformations of the raw data into nodes and edges (tsv format)
- Merge: Implementation of the 'merge' function from KGX using merge.yaml as a source file.
Utilities
The code for these are found in the utils folder.
Examples Included
Thes examples have download links and transform codes from other projects.
- Ontology: Sampled from kg-covid-19. Code located here
- Example Transform: Boilerplate code for transforms. Code located here.
The merge.yaml shows merging of the various KGs.
Implementation
Use this template to generate a template in the desired repository and then refactor the string kg_converter
in the project to the desired project name.
Setup
python setup.py install
and python -m pip install -r requirements.txt