The motivation behind this linked data browser was to provide a fast RDF browser that just need a SPARQL endpoint URL to give a comfortable experience when exploring differents triplestores.
This browser supports graphs natively (n-quads), which most RDF linked data browser don't at the moment, this gives a net gain of 33% of informations for each statement! ๐
Browse a RDF triplestore by providing the SPARQL endpoint URL directly in the browser.
See an example deployment of into-the graph at trek.semanticscience.org. Settings can be easily changed to browse various triplestores.
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
andendpoint
parameters - Example to resolve the URI of a Gene-Disease association in the DisGeNET SPARQL endpoint:
- http://trek.semanticscience.org/describe?uri=http://rdf.disgenet.org/resource/gda/DGN06012220986003d9ecac664f0865140b&endpoint=http://rdf.disgenet.org/sparql/
- Tested with RDF4J (GraphDB) and Virtuoso SPARQL endpoints.
- Stateful URL to resolve a specific URI in a specific SPARQL endpoint can be defined using the
- 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 (GraphDB and Virtuoso documented).
- A YASGUI SPARQL query editor.
- A Comunica widget to query Linked Data Fragments with SPARQL and GraphQL.
- 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.
Into-the-graph is built with 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
Start browsing various SPARQL endpoints using into-the-graph in one click:
- A Clinical trial in Bio2RDF:
- A Pathway in PathwayCommons:
- A Protein in NextProt:
- A Gene-Disease association in the DisGeNET SPARQL endpoint:
- A Protein (UniProt) in AgroLD:
- A City in DBpedia
- A Citation in the EU Law OpenCitation corpus
- A Publication in the EU Cellar Law dataset:
- http://trek.semanticscience.org/describe?uri=http://publications.europa.eu/resource/cellar/c721f802-9ce7-11e7-b92d-01aa75ed71a1&endpoint=http://publications.europa.eu/webapi/rdf/sparql
- Browsing not really good due to the use of graphs for entities.
- A City in the LOD SPARQL endpoint
- http://trek.semanticscience.org/describe?uri=http://www.wikidata.org/entity/Q180083&endpoint=http://lod.openlinksw.com/sparql
- Browsing not really good due to the use of graphs for entities.
- A Dataset in OpenEuropa Joinup SPARQL
- A Statistic in the EU Open Data Portal
You will need to go to settings to change the SPARQL endpoint URL permanently.
You can even directly use trek.semanticscience.org to browse a locally deployed endpoint! e.g. http://localhost:8890/sparql
To run into-the-graph for development, the deployed website will be automatically updated at each change to the code.
Install all required dependencies locally:
yarn install
Add a package to the dev environment only:
yarn add my-package --dev
Upgrade all installed packages:
yarn upgrade --latest
yarn dev
Access on http://localhost:19006
We use Docker to deploy into-the-graph in production.
You can use the prebuilt image available on DockerHub.
Pull the image:
docker pull umids/into-the-graph
Run the image:
docker run --rm -it -p 8082:5000 umids/into-the-graph
Access on http://localhost:8082/
Or build it locally, various parameters can be changed before build in settings.json.
docker build -t umids/into-the-graph .
Then run it the same way as for the DockerHub build.
Details about some of the parameters that can be changed in settings:
-
sparql_endpoint
: the SPARQL endpoint to browse -
comunica_url
: Comunica widget URL that will be displayed as an iFrame in the Comunica page- e.g. http://query.linkeddatafragments.org/
- Deploy your own instance of comunica-sparql-widget using Docker.
-
search_query
: the SPARQL query used when doing a search (allow to define SPARQL query using custom search indexes)- The SPARQL query should return
?foundUri
and?foundLabel
as results of the search - Use
$TEXT_TO_SEARCH
to define the emplacement for the search text in the query
- The SPARQL query should return
The following parameters can be changed in settings.json:
-
prefixes
: dictionary of prefixes and the corresponding namespaces used to resolve URIs in the web UI -
default_search_query
: the SPARQL query used when doing a search if an empty string has been passed to theuri
param (allow to show some concepts in the triplestore by default) -
The SPARQL query should return
?foundUri
and?foundLabel
as results of the search- Use
$TEXT_TO_SEARCH
to define the emplacement for the search text in the query
- Use
TODO: pass settings.json at runtime
# Something like
docker run -v $(pwd)/settings.json:/usr/share/nginx/html/settings.json --rm -it -p 8082:80 into-the-graph
Convenience script to git pull
, docker build
and restart docker.
./restart_docker.sh
Access at http://localhost:8082
Optimized search query for different triplestores.
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
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
SELECT ?foundUri ?foundLabel WHERE {?foundUri <http://www.w3.org/2000/01/rdf-schema#label> ?foundLabel . ?foundLabel bif:contains '$TEXT_TO_SEARCH' . } LIMIT 200
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).
Experimental feature, only try it if you know what you are doing!
Install expo-cli
npm install -g expo-cli
See GitHub repository and documentation to build standalone app.
Using bycedric/expo-cli Docker image. On Docker: use yarn start
to build using serve
First you need to have your app built in the
web-build
folder.
# To remove:
docker run --tty --interactive \
--workdir /srv \
--volume $HOME/into-the-graph:/srv \
--env EXPO_CLI_USERNAME=vemonet \
--env EXPO_CLI_PASSWORD=password \
bycedric/expo-cli publish
Don't forget to change the path to the git repository (
$HOME
at the moment).