Skip to content
Novus Examples
gexf3.9 KB

Social Network Graph (GEXF)

The same 12-person social network in GEXF 1.3 (Gephi's native format) — node attributes and weighted edges. The format twin of the GraphML file, for testing Gephi imports and GraphML↔GEXF conversion.

Preview — first 50 linesgexf
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://gexf.net/1.3" version="1.3">
  <meta lastmodifieddate="2026-01-01">
    <creator>Novus Examples</creator>
    <description>Synthetic social network — 12 people, two communities</description>
  </meta>
  <graph mode="static" defaultedgetype="undirected">
    <attributes class="node">
      <attribute id="age" title="age" type="integer"/>
      <attribute id="community" title="community" type="string"/>
    </attributes>
    <nodes>
      <node id="0" label="Ada">
        <attvalues>
          <attvalue for="age" value="29"/>
          <attvalue for="community" value="A"/>
        </attvalues>
      </node>
      <node id="1" label="Ben">
        <attvalues>
          <attvalue for="age" value="34"/>
          <attvalue for="community" value="A"/>
        </attvalues>
      </node>
      <node id="2" label="Chen">
        <attvalues>
          <attvalue for="age" value="41"/>
          <attvalue for="community" value="A"/>
        </attvalues>
      </node>
      <node id="3" label="Dara">
        <attvalues>
          <attvalue for="age" value="26"/>
          <attvalue for="community" value="A"/>
        </attvalues>
      </node>
      <node id="4" label="Ede">
        <attvalues>
          <attvalue for="age" value="38"/>
          <attvalue for="community" value="A"/>
        </attvalues>
      </node>
      <node id="5" label="Faye">
        <attvalues>
          <attvalue for="age" value="31"/>
          <attvalue for="community" value="B"/>
        </attvalues>
      </node>
      <node id="6" label="Gus">
        <attvalues>
111 lines total — download for the full file.

Specifications

Nodes
12
Edges
21
Directed
false
Format
GEXF 1.3 (Gephi)

What is a .gexf file?

GEXF (Graph Exchange XML Format) is an XML format for graphs created for the Gephi network-analysis tool. It describes nodes and edges with attributes and also supports dynamic (time-evolving) graphs and visual properties like position and colour. It is a common interchange format alongside GraphML.

How to use this file

Use an example GEXF file to test network importers and visualisers (especially Gephi), and converters between GEXF and GraphML, or to check that node/edge attributes and weights are parsed correctly.

How to use this file for testing

“Social Network Graph (GEXF)” is a deterministic Novus Examples fixture for Graph data, Conversion testing, Data import. Node/edge datasets in GraphML and GEXF (directed and undirected, with attributes and weights) — for testing network importers, layout tools, and graph converters.

Documented properties for this file: 12 nodes · 21 edges · GEXF 1.3 (Gephi). Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Data fixtures document their exact quirks — delimiters, encodings, null handling, schema, and row counts — in the spec table. Point your parser or importer at the file and assert it handles the documented edge cases; clean and deliberately-messy siblings make before/after diffs straightforward.

Code examples

import networkx as nx  # pip install networkx

G = nx.read_gexf("social-network.gexf")
print(G.number_of_nodes(), "nodes", G.number_of_edges(), "edges")

Generated by generation/data_graphs.py. Free for any use, no attribution required — license.