A project to play with graphs and test some ideas about networks science. Full code is under MIT License.
So far:
- implementing graphs core definitions (central graph, nodes, links, etc)
- random graphs with preferential attachment (Barabasi Albert) and GNP (fixed nodes size, links by probability)
- basic stats: degree distribution, size, etc
- gephi export for data type. Just enough to create data visualizations of graphs, this is not a gexf library with all gexf features
- large structures definition: sets, iterators. Implementations so far are local, but everything is ready for other definitions
- connected component
- walkthroughs
- graph features: graph diameter, etc
- neo4j import and export
- observability: observer over nodes to detect changes (node creation, deletion, or links changes. Even, for some nodes, changes of states)
- gexf import and export (again, not planning a full support for gexf)
- REST endpoint to deal with graphs
- DSL for non technical use (create a random graph, print basic stats, etc)
- Sort of jupyter interface to use that DSL
- Event based changes on graphs, apache kafka sounds like a good option
- Distibute calculation (but, a huge amount of work)
- graph data visualization using a dedicated server (cross project, using d3.js ?)
examples/
contains nice code, to show some use casesgraphs/
is about main definitions.internal/
is about main implementations.- Use of iterators: Some graphs are HUGE, so using iterators is more flexible and efficient than slices (lazy loading / pagination)
internal/local/
: split definitions and local implementations. Local implementations are "in memory" implementations of general definitions
- ValueBasedGraph: nodes holding content (NV type) are linked with values (LV type). Use it when you do not care about the graph structure.
- CentralStructureGraph: linked nodes and you need global operations (all nodes iterations, adjacency matrix, etc)
- PeersStructureGraph: linked nodes but you discover graph from a node. No global operations
So far:
Type | Implementation | Local | Directed |
---|---|---|---|
Value | DirectedValuesGraph | YES | YES |
Central | MapGraph | YES | MIXED |
- Open the
examples/
code and read code to get the purpose of some important classes - Start with general definition of a graph
- Read
graphs/
interfaces if you need more details aboutnodes
,neighbors
orlinks
. There should be no surprise, it is basic definition - Have a look at
graphs_test/
to understand some high level features - Then, you may want to dig into
internal_test/local_test
This part is about links or mentions about graphs / network science related stuff. It just is "hey, look at that if you want, I found it interesting". I don't make money by advertising, I am not in position of any conflict of interest, it is pure personal opinion.
- Neo4j database, community version on premise is an excellent graph database. Neo4j is, to me, very pushy about its cloud solution (Aura).
- Apache GraphX: Not a fan, but it exists and I wanted to mention it. Sounds more like an abandoned POC to me
- NetworkX: perfect for its purpose, easy to use, powerful. If language is not a question, I would recommand Python and NetworkX for sure !
- Gephi is a classic and efficient vizualisation tool for graphs in general, excellent for big graphs
- Barabasi: Networks Science: Author has a style, many ideas, not a lot of details about some key parts. Brilliant, really good to understand complex networks ideas. But... Not for a first read
- Mentzer, Fortunato, Davis: a first course in network science : very good too, covers more topics and is easier, first read material for sure!
- Boullier: Propagations (in french). WHAT A BOOK ! Very clever ideas about propagations and related use of data. A source of inspiration to go further than technical implementations
- FASCINATING phenomenon : percolation
- Russel, Norvig: Artificial intelligence: THE book about AI. But get ready, it is a huge book that goes really in depth. Chapter 3 is excellent about exploration, and explains applications of graphs for walkthroughs