You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-6Lines changed: 38 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# RDF-to-Gephi
2
2
3
3
Converts RDF knowledge graphs to a [Gephi](https://gephi.org/) GEXF file that can be opened in Gephi. GEXF stands for [Graph Exchange XML Format](https://gexf.net/).
4
-
Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint URL. Can work either in a _"direct and simple conversion"_ mode, turning triples into edges, or using a set of SPARQL queries to define exactly the structure of the nodes and edges that should appear in the Gexf file.
4
+
Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint URL. Can work either in a _"direct and simple conversion"_ mode, turning triples into edges, or using a set of SPARQL queries to define exactly the scope and structure of the nodes and edges that should appear in the Gexf file.
5
5
6
6
## How to run
7
7
@@ -12,7 +12,7 @@ Supports single RDF file, multiple files in a folder, or remote SPARQL endpoint
12
12
5. Run a conversion command, typically the following:
Converts RDF data to GEXF format directly. All literals are considered as attributes, and all triples as edges, except `rdf:type`. `rdfs:label` is used as label.
32
+
33
+
The full options of the command are:
34
+
35
+
```
36
+
direct Converts RDF data to GEXF format directly. All literals are
37
+
considered as attributes, and all triples as edges, except
38
+
rdf:type. rdfsl:label is used as label.
39
+
Usage: direct [options]
40
+
Options:
41
+
-e, --endDateProperty
42
+
URI of the property in the knowledge grapg holding the end date of
43
+
entities
44
+
* -i, --input
45
+
Path to RDF input file, or directory containing RDF files, or URL
46
+
of a SPARQL endpoint.
47
+
* -o, --output
48
+
Path to GEXF output file
49
+
-s, --startDateProperty
50
+
URI of the property holding the start date of entities
51
+
-w, --weight
52
+
Path to a properties file associating properties to weights
53
+
```
54
+
31
55
### SPARQL-based conversion (preferred)
32
56
33
57
The `sparql` commands takes a set of SPARQL queries to build the structure of the Gephi graph. The command synopsis is the following:
34
58
35
59
```
36
-
java -jar target/rdf2gexf-1.0-onejar.jar sparql \
60
+
java -jar rdf2gephi-1.0-onejar.jar sparql \
37
61
--input <file or directory or url of SPARQL endpoint> \
38
62
--edges <SPARQL query file to create edges> \
39
63
--attributes <SPARQL query file to create attributes> \
@@ -49,19 +73,23 @@ The full options of the command are:
49
73
Options:
50
74
-a, --attributes
51
75
Path to the file containing the SPARQL query to retrieve
52
-
attributes, e.g. 'sparql/attribute.rq'
76
+
attributes, e.g. 'sparql/attribute.rq'. The query MUST return 3
77
+
columns: the first one is the subject, the second one is the
78
+
attribute URI, the third one is the attribute value.
53
79
-d, --dates
54
80
Path to the file containing the SPARQL query to retrieve date
55
81
ranges, e.g. 'sparql/dates.rq'
56
82
* -e, --edges
57
83
Path to the file containing the SPARQL query to retrieve edges,
58
-
e.g. 'sparql/edges.rq'
84
+
e.g. 'sparql/edges.rq'. The query MUST return the following
85
+
variables: ?subject, ?edge, ?object
59
86
* -i, --input
60
87
Path to RDF input file, or directory containing RDF files, or URL
61
88
of a SPARQL endpoint.
62
89
-l, --labels
63
90
Path to the file containing the SPARQL query to retrieve labels,
64
-
e.g. 'sparql/labels.rq'
91
+
e.g. 'sparql/labels.rq'. The query MUST return the following
92
+
variables: ?subject, ?label
65
93
* -o, --output
66
94
Path to GEXF output file
67
95
```
@@ -171,6 +199,10 @@ WHERE {
171
199
172
200
TODO
173
201
202
+
## Support for dynamic graphs
203
+
204
+
rdf2gephi supports the creation of dynamic graphs where we can see the evolution of the graph over time.
205
+
TODO
174
206
175
207
## Typical actions in Gephi to view your RDF graph
0 commit comments