Note
This repository is under active development. Features, documentation, and structure will change frequently.
A Python module for converting Swiss plant protection product data from CSV format to RDF and publishing it to the LINDAS Linked Data Service.
-
Add variables to
.envUSER=lindas-fsvo-psm PASSWORD=******** GRAPH=https://lindas.admin.ch/foag/psm ENDPOINT=https://stardog.cluster.ldbar.ch/lindas -
Create and activate the conda environment.
conda env create -f environment.yml conda activate psmv-rdf
-
Install the package in editable mode
pip install -e . -
Start the data integration pipeline
python -m service.pipeline
psmv-rdf/
├── .github/
├── data/ # any non-RDF data files
│ ├── raw/ # input CSV files
│ ├── mapping/ # yaml mapping files
│ └── processed/ # intermediately generated CSV files
├── services/
│ └── pipeline.py
├── src/
│ ├── sparql # SPARQL inference rules
│ └── python/ # Python scripts for specific tasks
├── rdf/
│ ├── ontology/ # OWL ontology documentation
│ ├── shapes/ # SHACL shapes, also used as data model documentation
│ ├── data/ # the actual RDF data, split by classes
│ ├── example/ # example turtle files used for reference
│ └── processed/ # any automatically written/derived/merged turtle files
├── tests/
├── docs/ # project documentation
├── .gitignore
├── README.md
└── environment.ymlAll ontology documentation files are written to rdf/ontology.
You may inspect a visual representation of the ontology used here: https://service.tib.eu/webvowl/#iri=https://github.com/BLV-OSAV-USAV/PSMV-RDF/refs/heads/main/rdf/ontology/core.ttl
Are more restricted data model is written in SHACL and can be inspected here.
Project dependencies are listed in pyproject.toml.
- Built with rdflib
- Integrates with LINDAS, the Swiss federal linked data service.
- Orignial ontology and pipeline by Damian Oswald with plant protection pipeline