Skip to content

A Python implementation of YARRRML Mapper and SPARQL Querying for Opendatasfot-API data.

License

Notifications You must be signed in to change notification settings

benj-moreau/ods-yarrrml-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ODS-YARRRML-Toolkit

A Python3 implementation of YARRRML Mapper and SPARQL Querying for OpenDataSoft-API data.

Installation

First, clone the repository:

git clone https://github.com/benjimor/ods-yarrrml-toolkit.git

Then, assuming you already have Python3 and Pip installed, install the dependencies:

Running in a virtual environment is recommended

pip3 install -r requirements.txt

Run It

Transform an ODS API result (JSON) into RDF

Transform an ODS json api result file into an RDF (ttl) file using a YARRRML Mapping with the following command:

python3 YARRRMLMapper.py <source> <destination> <mapping>

example:

Files are in root directory of this project

python3 YARRRMLMapper.py example/rap_world_data.json example/rdf_result_data.ttl example/rap_world_mapping.yml

Query the resulting file using with SPARQL

Query the resulting ttl file with a SPARQL query using the following command:

python3 SPARQL.py <source> <query>

example:

Files are in root directory of this project

python3 SPARQL.py example/rdf_result_data.ttl example/query.sparql

About

A Python implementation of YARRRML Mapper and SPARQL Querying for Opendatasfot-API data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages