/food-claims-kg

🧅 RDF knowledge graph for food health claims

Primary LanguagePythonMIT LicenseMIT

Generate RDF from Google doc

A RDF knowledge graph for food health claims.

Semantic Data Model

The easiest way to explore the knowledge graph is to use the various API calls at http://grlc.io/api-git/MaastrichtU-IDS/food-claims-kg

The SPARQL endpoint is accessible at https://graphdb.dumontierlab.com/repositories/FoodHealthClaimsKG

Check the SPARQL queries

Queries from the grlc API can be checked and changed in the .rq files.

Variables starting with an underscore, e.g. _claimlabel, are asked to the user as parameter of the generated API call.

Run conversion scripts

Scripts run automatically with GitHub Actions at every push to the master branch.

Clone the repository:

git clone https://github.com/MaastrichtU-IDS/food-claims-kg.git
cd food-claims-kg

Install requirements:

pip3 install -r requirements.txt

Download the data:

Link to Google Sheet

mkdir -p data/output
wget -O data/food-claims-kg.xlsx "https://docs.google.com/spreadsheets/d/1RWZ6AlGB8m7PO5kjsbbbeI4ETLwvKLOvkrzOpl8zAM8/export?format=xlsx&id=1RWZ6AlGB8m7PO5kjsbbbeI4ETLwvKLOvkrzOpl8zAM8"

Define API key to query UMLS:

export UMLS_APIKEY=00000000000000

Run the conversion script:

python3 src/convert_to_rdf.py

Create metadata (HCLS statistics)

d2s metadata analyze https://graphdb.dumontierlab.com/repositories/FoodHealthClaimsKG -o metadata.ttl 

Examples of grlc API

API powered by grlc.io 🧅

IRI variable with defaults value (not working for our repo):

String variable:

Enumerate: