Skip to content

MaastrichtU-IDS/into-the-graph

Repository files navigation

🧭 Lightweight linked data browser

Deploy to GitHub Pages CodeQL analysis

Lightweight and fast RDF browser that just need a SPARQL endpoint URL to give a comfortable experience when exploring differents graphs.

Browse a RDF triplestore by providing the SPARQL endpoint URL directly in the browser.

See an example deployment of into-the graph at https://maastrichtu-ids.github.io/into-the-graph.

This RDF linked data browser features:

  • A web-based UI to browse SPARQL endpoints content easily. Stateful URL to resolve a specific URI in a specific SPARQL endpoint can be defined using the uri and endpoint parameters. Tested with RDF4J (Ontotext GraphDB) and Virtuoso SPARQL endpoints.
  • Easily search for concepts in the triplestore. Possibility to change the SPARQL query to define the custom query to use the Search index of different triplestores in settings (Ontotext GraphDB and Virtuoso triplestores documented).
  • Work in progress: insights about the content of the triplestore and its different graphs, using precomputed HCLS descriptives statistics.

HCLS descriptive statistics for a graph can simply be computed and inserted running a docker run command. Follow those instructions to run it. Or check the fair-metadata Python library in development.

Into-the-graph is built with TypeScript , ReactJS, and Material-UI to serve and explore RDF data from any SPARQL endpoint.

This service has been developed and used as part of the Data2Services framework. Data2Services provides tools and guideline to easily integrate multiple structured data sources (CSV, RDB, XML) to a RDF knowledge graph, complying with a defined data model. Checkout the documentation at d2s.semanticscience.org

πŸ‘¨β€πŸ’» Contribute

Contributions are welcome! See the guidelines to contribute.

🎬 Into-the-graph in action

⚠️ Trying to query a HTTP SPARQL endpoint from into-the-graph which is provided through HTTPS might cause issues.

Start browsing various SPARQL endpoints using into-the-graph in one click:

You can even directly use http://maastrichtu-ids.github.io/into-the-graph to browse a locally deployed endpoint! e.g. http://localhost:8890/sparql

πŸ—οΈ Run in development

Requirements: npm and yarn installed.

Clone the repository:

git clone https://github.com/MaastrichtU-IDS/into-the-graph
cd into-the-graph

Install dependencies πŸ“₯

yarn

Run the web app in development at http://localhost:19006

yarn dev

The website should reload automatically at each changes to the code πŸ”ƒ

Upgrade the packages versions in yarn.lock

yarn upgrade perfect-graph unitx-ui unitx

πŸš€ Run in production

This website is automatically deployed by a GitHub Actions worklow to GitHub Pages at https://maastrichtu-ids.github.io/into-the-graph

You can build locally in /web-build folder and serve on http://localhost:5000 πŸ“¦

yarn build
yarn serve

Or run directly using Docker 🐳 (requires docker installed)

docker-compose up

Checkout the docker-compose.yml file to see how we run the Docker image.

πŸ”Ž Search queries

Optimized SPARQL query to perform full text search in different triplestores.

Generic

Support the BioLink model (get rdfs:label and bl:name)

SELECT ?foundUri ?foundLabel WHERE {?foundUri ?p ?foundLabel . VALUES ?p {<http://www.w3.org/2000/01/rdf-schema#label> <https://w3id.org/biolink/vocab/name>} . FILTER(isLiteral(?foundLabel)) FILTER contains(?foundLabel, '$TEXT_TO_SEARCH')} LIMIT 5

GraphDB

See GraphDB full text search documentation to create a search index (uses Apache Lucene under the hood).

PREFIX luc: <http://www.ontotext.com/owlim/lucene#> SELECT ?foundUri ?foundLabel { ?foundLabel luc:searchIndex '$TEXT_TO_SEARCH*' . ?foundUri ?p ?foundLabel . } LIMIT 100

Order by Lucene score

PREFIX luc: <http://www.ontotext.com/owlim/lucene#> SELECT ?foundUri ?foundLabel { ?foundLabel luc:searchIndex '$TEXT_TO_SEARCH*' ; luc:score ?score . ?foundUri ?p ?foundLabel . } ORDER BY ?score LIMIT 100

DBpedia Virtuoso

SELECT ?foundUri ?foundLabel WHERE {?foundUri <http://www.w3.org/2000/01/rdf-schema#label> ?foundLabel . ?foundLabel bif:contains '$TEXT_TO_SEARCH' . } LIMIT 200

OpenCitation

SELECT ?foundUri ?foundLabel WHERE {?foundUri ?p ?foundLabel . VALUES ?p {<http://purl.org/spar/cito/hasCitationCreationDate> <http://purl.org/spar/cito/hasCitationTimeSpan>} . FILTER(str(?foundLabel) =  '$TEXT_TO_SEARCH')} LIMIT 5

Text operations really slow on OpenCitation SPARQL, so we do a full match (for date mainly).