Book Image

Mastering Gephi Network Visualization

Book Image

Mastering Gephi Network Visualization

Overview of this book

Table of Contents (19 chapters)
Mastering Gephi Network Visualization
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Creating dynamic GEXF files


While Gephi can be used to create GEXF files, it can be advantageous in many cases to have the file already prepared prior to importing data into Gephi. For any reader acquainted with XML, the formatting and structure will appear very familiar. If you aren't an XML expert, we'll walk through some of the GEXF basics to help you get started.

The code in this section is based on the examples from the http://gexf.net/format/ site, which provides a general primer for how to structure the data. At a very basic level, the GEXF file is designed to represent a single graph, although that graph might contain many nodes and edges. For a very basic example with two nodes and a single edge between them, the GEXF code would look like this:

<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">
    <meta lastmodifieddate="2009-03-20">
        <creator>Gexf.net</creator>
        <description>A Web network...