Git Product home page Git Product logo

gephi-toolkit-demos's Introduction

Gephi - The Open Graph Viz Platform

build Downloads Downloads Translation progress

Gephi is an award-winning open-source platform for visualizing and manipulating large graphs. It runs on Windows, Mac OS X and Linux. Localization is available in English, French, Spanish, Japanese, Russian, Brazilian Portuguese, Chinese, Czech, German and Romanian.

  • Fast Powered by a built-in OpenGL engine, Gephi is able to push the envelope with very large networks. Visualize networks up to a million elements. All actions (e.g. layout, filter, drag) run in real-time.

  • Simple Easy to install and get started. An UI that is centered around the visualization. Like Photoshop™ for graphs.

  • Modular Extend Gephi with plug-ins. The architecture is built on top of Apache Netbeans Platform and can be extended or reused easily through well-written APIs.

Download Gephi for Windows, Mac OS X and Linux and consult the release notes. Example datasets can be found on our wiki.

Gephi

Install and use Gephi

Download and Install Gephi on your computer.

Get started with the Quick Start and follow the Tutorials. Load a sample dataset and start to play with the data.

If you run into any trouble or have questions consult our discussions.

Latest releases

Stable

Development builds

Development builds are generated regularly. Current version is 0.11.0-SNAPSHOT

Developer Introduction

Gephi is developed in Java and uses OpenGL for its visualization engine. Built on the top of Netbeans Platform, it follows a loosely-coupled, modular architecture philosophy. Gephi is split into modules, which depend on other modules through well-written APIs. Plugins can reuse existing APIs, create new services and even replace a default implementation with a new one.

Consult the Javadoc for an overview of the APIs.

Requirements

  • Java JDK 11 (or later)

  • Apache Maven version 3.6.3 or later

Checkout and Build the sources

  • Fork the repository and clone

      git clone [email protected]:username/gephi.git
    
  • Run the following command or open the project in an IDE

      mvn -T 4 clean install
    
  • Once built, one can test running Gephi

      cd modules/application
      mvn nbm:cluster-app nbm:run-platform
    

Note that while Gephi can be built using JDK 11 or later, it currently requires JDK 11 to run.

Create Plug-ins

Gephi is extensible and lets developers create plug-ins to add new features, or to modify existing features. For example, you can create a new layout algorithm, add a metric, create a filter or a tool, support a new file format or database, or modify the visualization.

Gephi Toolkit

The Gephi Toolkit project packages essential Gephi modules (Graph, Layout, Filters, IO…) in a standard Java library which any Java project can use for getting things done. It can be used on a server or command-line tool to do the same things Gephi does but automatically.

Localization

We use Weblate for localization. Follow the guidelines on the wiki for more details how to contribute.

Icons

Gephi uses icons from various sources. The icons are licensed under the CC BY 3.0 license.

All icons can be found in the DesktopIcons module, organised by module name.

License

Gephi main source code is distributed under the dual license CDDL 1.0 and GNU General Public License v3. Read the Legal FAQs to learn more.

Copyright 2011 Gephi Consortium. All rights reserved.

The contents of this file are subject to the terms of either the GNU General Public License Version 3 only ("GPL") or the Common Development and Distribution License ("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://gephi.github.io/developers/license/ or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License files at /cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]"

If you wish your version of this file to be governed by only the CDDL or only the GPL Version 3, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 3] license." If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 3 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 3 code and therefore, elected the GPL Version 3 license, then the option applies only if the new code is made subject to such option by the copyright holder.

gephi-toolkit-demos's People

Contributors

eduramiba avatar mbastian avatar neil-rubens avatar shibacow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gephi-toolkit-demos's Issues

Toolkit example code is written for 0.8.x and does not run in 0.9.1 without modifications

The Gephi Toolkit Examples appear to be written for 0.8.x and requires modifications to run under 0.9.1. Does anyone know when the example code will be updated for the API changes made in 0.9.1?

It is exasperating to attempt to run sample code only to find subtle parts not supported any longer and not being able to find which pieces have been changed. Magnified by the fact that these samples are geared for specifically for new developers with ZERO knowledge of how to program in Gephi.

Errors building the Demo in VSCode

I need to display dynamic graphs in my application, and looking at Gephi as a solution. I cloned the demos, but am getting the following errors:

"message": "The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Double. Fix the build path then try building this project",
Type java.lang.Double is indirectly referenced from required .class files but cannot be resolved since the declaring package java.lang exported from module java.base conflicts with a package accessible from module <unnamed>
The type java.lang.Double cannot be resolved. It is indirectly referenced from required .class files

Demo doesn't work

The demo won't even start.

I am getting those errors when trying to run PreviewJFrame.java:

Exception in thread "main" java.lang.NoClassDefFoundError: it/unimi/dsi/fastutil/objects/Object2IntMap
	at org.gephi.io.importer.impl.ImportContainerFactoryImpl.newContainer(ImportContainerFactoryImpl.java:52)
	at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:174)
	at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:228)
	at org.gephi.io.importer.impl.ImportControllerImpl.importFile(ImportControllerImpl.java:146)
	at org.gephi.toolkit.demos.PreviewJFrame.script(PreviewJFrame.java:56)
	at org.gephi.toolkit.demos.PreviewJFrame.main(PreviewJFrame.java:100)
Caused by: java.lang.ClassNotFoundException: it.unimi.dsi.fastutil.objects.Object2IntMap
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more

I am assuming this is somewhat related to the problem stated in #3 , despite the fact that the last commitmessages claim to have updated everything?

Unable to import GraphML (.gml) file for preview

I tried to call the PreviewJFrame script in https://github.com/gephi/gephi-toolkit-demos/blob/master/src/main/java/org/gephi/toolkit/demos/PreviewJFrame.java

directly using the below .gml file, but on executing, it shows # Nodes loaded:0 # Edges loaded: 0, when actually my toy file contains 1 node as can be seen.

I have attached the .gml file for reproducing here below:

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
<graph id="G" edgedefault="directed">
<node id="n0" labels=":Host"><data key="labels">:Host</data><data key="portName">H1</data><data key="maxInDeg">0</data><data key="available">0</data><data key="maxOutDeg">0</data></node>
</graph>
</graphml>

Filter graph by partition

I'm trying to filter a graph by partition using the toolkit 0.9.1.
Running the example, the filter by partition does not work.

//Filter, keep partition 'Blogarama'. Build partition with 'source' column in the data NodePartitionFilter partitionFilter = new NodePartitionFilter(graphModel.getNodeTable().getColumn("source"), appearanceModel); partitionFilter.unselectAll(); partitionFilter.addPart("Blogarama"); Query query2 = filterController.createQuery(partitionFilter); GraphView view2 = filterController.filter(query2); graphModel.setVisibleView(view2);

There is something wrong in the query parameters?
many thanx

How can I output the filtered graph using the toolkit 0.9.1

I'm trying to filter a graph by node degree using the toolkit 0.9.1.
The number of nodes is ok after filtered, but after exporting the graph, I can find the filtered nodes in the gexf file.
So how I can output the filtered graph?
Thanks.

    GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
    FilterController filterController = Lookup.getDefault().lookup(FilterController.class);
    DegreeRangeFilter degreeFilter = new DegreeRangeFilter();
    degreeFilter.init(graphModel.getGraph());
    degreeFilter.setRange(new Range(1, Integer.MAX_VALUE));     //Remove isolated nodes
    Query query = filterController.createQuery(degreeFilter);
    GraphView view = filterController.filter(query);
    graphModel.setVisibleView(view);    //Set the filter result as the visible view

    // See if graph is well imported and filtered
    graph = graphModel.getDirectedGraphVisible();
    System.out.println("Nodes: " + graph.getNodeCount());   // number of nodes is ok after filtered
    System.out.println("Edges: " + graph.getEdgeCount())

    ExportController ec = Lookup.getDefault().lookup(ExportController.class)
    ec.exportFile(new File(outputFile)) ;  // filtered nodes is still in outputFile

Filter labels of graph using gephi-toolkit-0.9.1

I would like resulting graph to contain all nodes, but to show labels only for those with degree>1000.
Call of exportToLabelVisible(query) changes labels of nodes to be not visible (node.isVisible() is false), but resulting graph still has labels for all the nodes.

FilterController filterController = Lookup.getDefault().lookup(FilterController.class); 
DegreeRangeFilter degreeFilter = new DegreeRangeFilter(); 
degreeFilter.init(graphModel.getGraph()); 
degreeFilter.setRange(new Range(1000, Integer.MAX_VALUE));     
Query query = filterController.createQuery(degreeFilter); 
       
 
filterController.exportToLabelVisible(query);
//filterController.filterVisible(query);
   
GraphView view = graphModel.getGraphVisible().getView();             
graphModel.setVisibleView(view);
  

PNGExporter pngExporter = (PNGExporter) ec.getExporter("png");
ec.exportFile(new File("FILE.png"), pngExporter);

how to export csv table by gephi-toolkit

recently I'm trying to use gephi-toolkit to do some statistics for several networks,it works fine to import the csv file and do some metrics computation, but if I want to export the csv table like what I do below in the Gephi, I do not find any tutorials and there is not description in the javadoc.

test

since I want to do the same operations for different networks,I want to use gephi-toolkit to implement the same function,but I've checked the demos and google for it but failed to get the result I want.


To describe my question clearer,I post my current code below, now I've tried two methods, one is using the methods of ExporterCSV which only returned me with the matrix in csv file format while what I want is a node csv file and an edge csv file after computing several metrics like betweenness centrality, closeness centrality and so on for each node of each network. And the other method I've tried is using DataTableControllerImpl but it seems that no files has been created, I want to know if there is something wrong with my code, any help is appreciated.

public class Transfer95 {
    public void script() {
        //Init a project - and therefore a workspace
        ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
        pc.newProject();
        Workspace workspace = pc.getCurrentWorkspace();

        //Get controllers and models
        ImportController importController = Lookup.getDefault().lookup(ImportController.class);
        
        //Get models and controllers for this new workspace - will be useful later
        GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();

        //Import file
        Container container,container2;
        try {
            File file_node = new File(getClass().getResource("/resource/season2/club_1_1995.csv").toURI());
            container = importController.importFile(file_node);
            container.getLoader().setEdgeDefault(EdgeDirectionDefault.DIRECTED);   //Force DIRECTED
            container.getLoader().setAllowAutoNode(true);  //create missing nodes
            container.getLoader().setEdgesMergeStrategy(EdgeMergeStrategy.SUM);
            container.getLoader().setAutoScale(true);
            
            File file_edge = new File(getClass().getResource("/resource/season2/transfer_1_1995.csv").toURI());
            container2 = importController.importFile(file_edge);
            container2.getLoader().setEdgeDefault(EdgeDirectionDefault.DIRECTED);   //Force DIRECTED
            container2.getLoader().setAllowAutoNode(true);  //create missing nodes
            container2.getLoader().setEdgesMergeStrategy(EdgeMergeStrategy.SUM);
            container2.getLoader().setAutoScale(true);
            
        } catch (Exception ex) {
            ex.printStackTrace();
            return;
        }

        //Append imported data to GraphAPI
        importController.process(container, new DefaultProcessor(), workspace);
        importController.process(container2, new AppendProcessor(), workspace); //Use AppendProcessor to append to current workspace
        

        //See if graph is well imported
        DirectedGraph graph = graphModel.getDirectedGraph();
        System.out.println("Nodes: " + graph.getNodeCount());
        System.out.println("Edges: " + graph.getEdgeCount());
        
        //count several metrics
        Degree degree=new Degree();
        degree.execute(graph.getModel());      
        System.out.println("Average Degree: "+degree.getAverageDegree());
        
        WeightedDegree weightedDegree=new WeightedDegree();
        weightedDegree.execute(graph.getModel());      
        System.out.println("Average Weighted Degree: "+weightedDegree.getAverageDegree());
        
        ClusteringCoefficient clusteringcoefficient=new ClusteringCoefficient();
        clusteringcoefficient.execute(graph.getModel());      
        System.out.println("Average Clustering Coefficient: "+clusteringcoefficient.getAverageClusteringCoefficient());
        
        GraphDistance graphDistance=new GraphDistance();
        graphDistance.execute(graph.getModel());      
        System.out.println("Average Path Length: "+graphDistance.getPathLength());
        System.out.println("Network Diameter: "+graphDistance.getDiameter());
        
        Modularity modularity=new Modularity();
        modularity.execute(graph.getModel());      
        System.out.println("Modularity: "+modularity.getModularity());
        
        GraphDensity graphDensity=new GraphDensity();
        graphDensity.execute(graph.getModel());      
        System.out.println("Graph Density: "+graphDensity.getDensity());
        
        
        //Export method 1
//        ExportController ec = Lookup.getDefault().lookup(ExportController.class);
//        ExporterCSV exporterCSV=(ExporterCSV)ec.getExporter("csv");
//        try {
////            ec.exportFile(new File("src/resource/output/test_95.csv"));
//            ec.exportFile(new File("src/resource/output/test_95.csv"), exporterCSV);
//        } catch (IOException ex) {
//            ex.printStackTrace();
//            return;
//        }

        //Export method 2
//        Lookup.getDefault().lookup(DataTablesController.class).setDataTablesEventListener(DataTableTopComponent.this);
        DataTablesControllerImpl csvExp=new DataTablesControllerImpl();        
//        Lookup.getDefault().lookup(DataTablesControllerImpl.class).setDataTablesEventListener(csvExp.getDataTablesEventListener());                
//        DataTablesControllerImpl dataTablesController = Lookup.getDefault().lookup(DataTablesController.class);
        csvExp.exportCurrentTable();
       
    }
    
    public static void main(String[] args){
        Transfer95 test=new Transfer95();
        test.script();
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.