Pyrgg
Pyrgg: Python Random Graph Generator - Published in JOSS (2017)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Keywords from Contributors
Scientific Fields
Repository
🔧 Python Random Graph Generator
Basic Info
- Host: GitHub
- Owner: sepandhaghighi
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://www.pyrgg.site
- Size: 9.69 MB
Statistics
- Stars: 215
- Watchers: 2
- Forks: 31
- Open Issues: 3
- Releases: 18
Topics
Metadata Files
README.md
Overview
PyRGG is a user-friendly synthetic random graph generator that is written in Python and supports multiple graph file formats, such as DIMACS-Graph files. It can generate graphs of various sizes and is specifically designed to create input files for a wide range of graph-based research applications, including testing, benchmarking, and performance analysis of graph processing frameworks. PyRGG is aimed at computer scientists who are studying graph algorithms and graph processing frameworks.
| Open Hub | ![]() |
| PyPI Counter | |
| Github Stars |
| Branch | master | dev |
| CI |
| Code Quality |
Installation
PyPI
- Check Python Packaging User Guide
pip install pyrgg==1.8
Source Code
- Download Version 1.8 or Latest Source
pip install .
Conda
- Check Conda Managing Package
conda install -c sepandhaghighi pyrgg
Exe Version
⚠️ Only Windows
⚠️ For PyRGG targeting Windows < 10, the user needs to take special care to include the Visual C++ run-time .dlls(for more information visit here)
- Download Exe-Version 1.8
- Run
PYRGG-1.8.exe
System Requirements
PyRGG will likely run on a modern dual core PC. Typical configuration is:
- Dual Core CPU (2.0 Ghz+)
- 4GB of RAM
⚠️ Note that it may run on lower end equipment though good performance is not guaranteed
Usage
- Open
CMD(Windows) orTerminal(Linux) - Run
pyrggorpython -m pyrgg(or runPYRGG.exe) - Enter data
Engines
PyRGG
| Parameter | Description |
|---|---|
| Vertices Number (n) | The total number of vertices in the graph |
| Min Edge Number | The minimum number of edges connected to each vertex |
| Max Edge Number | The maximum number of edges connected to each vertex |
| Weighted / Unweighted | Specifies whether the graph is weighted or unweighted |
| Min Weight | The minimum weight of the edges (if weighted) |
| Max Weight | The maximum weight of the edges (if weighted) |
| Signed / Unsigned | Specifies whether the edge weights are signed or unsigned |
| Directed / Undirected | Specifies whether the graph is directed or undirected |
| Self Loop / No Self Loop | Specifies whether self-loop is allowed or not |
| Simple / Multigraph | Specifies whether the graph is a simple graph or a multigraph |
Erdős–Rényi-Gilbert
| Parameter | Description |
|---|---|
| Vertices Number (n) | The total number of vertices in the graph |
| Probability (p) | The probability for an edge creation between any two vertices |
| Directed / Undirected | Specifies whether the graph is directed or undirected |
Erdős–Rényi
| Parameter | Description |
|---|---|
| Vertices Number (n) | The total number of vertices in the graph |
| Edge Number (m) | The total number of edges in the graph |
| Directed / Undirected | Specifies whether the graph is directed or undirected |
Stochastic Block Model
| Parameter | Description |
|---|---|
| Vertices Number (n) | The total number of vertices in the graph |
| Block Number (k) | The number of blocks (disjoint subsets) |
| Block Sizes ([|C1|, |C2|, ... |Ck|]) | List of block sizes. The should sum up to n (n = |C1|+|C2|+...+|Ck|). |
| Probability Matrix ([[P11, P12, ..., P1k], ... [Pk1, Pk2, ..., Pkk]]) | Edge probabilities for between and within block connections. For undirected graph only the upper triangular indices would be counted. |
| Directed / Undirected | Specifies whether the graph is directed or undirected |
| Self Loop / No Self Loop | Specifies whether self-loop is allowed or not |
Barabási-Albert
| Parameter | Description |
|---|---|
| Vertices Number (n) | The total number of vertices in the graph |
| Attaching Edge Number (k) | The number of edges to attach to a new node |
Supported Formats
DIMACS
```
p sp
.
.
.
a <head_n> <tail_n> <weight_n>
```
- Document
- Sample 1 (100 Vertices , 3KB)
- Sample 2 (1000 Vertices , 13KB)
- Sample 3 (1000000 Vertices , 7MB)
- Sample 4 (5000000 Vertices , 37MB)
CSV
```
.
.
.
<head_n>,<tail_n>,<weight_n>
```
TSV
```
.
.
.
<head_n> <tail_n> <weight_n>
```
JSON
``` { "properties": { "directed": true, "signed": true, "multigraph": true, "weighted": true, "self_loop": true }, "graph": { "nodes":[ { "id": 1 },
.
.
.
{
"id": n
}
],
"edges":[
{
"source": head_1,
"target": tail_1,
"weight": weight_1
},
.
.
.
{
"source": head_n,
"target": tail_n,
"weight": weight_n
}
]
}
} ```
YAML
``` graph: edges: - source: head1 target: tail1 weight: weight_1
.
.
.
- source: head_n
target: tail_n
weight: weight_n
nodes:
- id: 1
.
.
.
- id: n
properties:
directed: true
multigraph: true
self_loop: true
signed: true
weighted: true
```
Weighted Edge List
```
.
.
.
<head_n> <tail_n> <weight_n>
```
ASP
node(1).
.
.
.
node(n).
edge(head_1,tail_1,weight_1).
.
.
.
edge(head_n,tail_n,weight_n).
Trivial Graph Format
1
.
.
.
n
#
1 2 weight_1
.
.
.
n k weight_n
* Document
* Sample 1 (100 Vertices , 4KB)
* Sample 2 (1000 Vertices , 61KB)
UCINET DL Format
dl
format=edgelist1
n=<number of vertices>
data:
1 2 weight_1
.
.
.
n k weight_n
* Document
* Sample 1 (100 Vertices , 8KB)
* Sample 2 (1000 Vertices , 729KB)
Matrix Market
%%MatrixMarket matrix coordinate real general
<number of vertices> <number of vertices> <number of edges>
<head_1> <tail_1> <weight_1>
.
.
.
<head_n> <tail_n> <weight_n>
* Document
* Sample 1 (100 Vertices , 59KB)
* Sample 2 (1000 Vertices , 1.8MB)
Graph Line
<head_1> <tail_1>:<weight_1> <tail_2>:<weight_2> ... <tail_n>:<weight_n>
<head_2> <tail_1>:<weight_1> <tail_2>:<weight_2> ... <tail_n>:<weight_n>
.
.
.
<head_n> <tail_1>:<weight_1> <tail_2>:<weight_2> ... <tail_n>:<weight_n>
GDF
nodedef>name VARCHAR,label VARCHAR
node_1,node_1_label
node_2,node_2_label
.
.
.
node_n,node_n_label
edgedef>node1 VARCHAR,node2 VARCHAR, weight DOUBLE
node_1,node_2,weight_1
node_1,node_3,weight_2
.
.
.
node_n,node_2,weight_n
GML
``` graph [ multigraph 0 directed 0 node [ id 1 label "Node 1" ] node [ id 2 label "Node 2" ] . . . node [ id n label "Node n" ] edge [ source 1 target 2 value W1 ] edge [ source 2 target 4 value W2 ] . . . edge [ source n target r value Wn ] ]
```
GEXF
<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.2">
<meta lastmodifieddate="2009-03-20">
<creator>PyRGG</creator>
<description>File Name</description>
</meta>
<graph defaultedgetype="directed">
<nodes>
<node id="1" label="Node 1" />
<node id="2" label="Node 2" />
...
</nodes>
<edges>
<edge id="1" source="1" target="2" weight="400" />
...
</edges>
</graph>
</gexf>
Graphviz
graph example
{
node1 -- node2 [weight=W1];
node3 -- node4 [weight=W2];
node1 -- node3 [weight=W3];
.
.
.
}
- Document
- Sample 1 (100 Vertices , 11KB)
- Sample 2 (1000 Vertices , 106KB)
- Online Visualization
Pickle
⚠️ Binary format
Issues & Bug Reports
Just fill an issue and describe it. We'll check it ASAP!
or send an email to info@pyrgg.site.
You can also join our discord server
Cite
If you use PyRGG in your research, we would appreciate citations to the following paper:
bibtex
@article{Haghighi2017,
doi = {10.21105/joss.00331},
url = {https://doi.org/10.21105/joss.00331},
year = {2017},
month = {sep},
publisher = {The Open Journal},
volume = {2},
number = {17},
author = {Sepand Haghighi},
title = {Pyrgg: Python Random Graph Generator},
journal = {The Journal of Open Source Software}
}
| JOSS | |
| Zenodo |
References
1- 9th DIMACS Implementation Challenge - Shortest Paths
2- Problem Based Benchmark Suite
3- MaximalClique - ASP Competition 2013
4- Pitas, Ioannis, ed. Graph-based social media analysis. Vol. 39. CRC Press, 2016.
5- Roughan, Matthew, and Jonathan Tuke. "The hitchhikers guide to sharing graph data." 2015 3rd International Conference on Future Internet of Things and Cloud. IEEE, 2015.
6- Borgatti, Stephen P., Martin G. Everett, and Linton C. Freeman. "Ucinet for Windows: Software for social network analysis." Harvard, MA: analytic technologies 6 (2002).
7- Matrix Market: File Formats
8- Social Network Visualizer
9- Adar, Eytan. "GUESS: a language and interface for graph exploration." Proceedings of the SIGCHI conference on Human Factors in computing systems. 2006.
10- Skiena, Steven S. The algorithm design manual. Springer International Publishing, 2020.
11- Chakrabarti, Deepayan, Yiping Zhan, and Christos Faloutsos. "R-MAT: A recursive model for graph mining." Proceedings of the 2004 SIAM International Conference on Data Mining. Society for Industrial and Applied Mathematics, 2004.
12- Zhong, Jianlong, and Bingsheng He. "An overview of medusa: simplified graph processing on gpus." ACM SIGPLAN Notices 47.8 (2012): 283-284.
13- Ellson, John, et al. "Graphviz and dynagraph—static and dynamic graph drawing tools." Graph drawing software. Springer, Berlin, Heidelberg, 2004. 127-148.
14- Gilbert, Edgar N. "Random graphs." The Annals of Mathematical Statistics 30.4 (1959): 1141-1144.
15- Erdős, Paul, and Alfréd Rényi. "On the strength of connectedness of a random graph." Acta Mathematica Hungarica 12.1 (1961): 261-267.
16- Barabási, Albert-László, and Réka Albert. "Emergence of scaling in random networks." science 286.5439 (1999): 509-512.
Show Your Support
Star This Repo
Give a ⭐️ if this project helped you!
Donate to Our Project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
Owner
- Name: Sepand Haghighi
- Login: sepandhaghighi
- Kind: user
- Location: Aalborg, Denmark
- Company: Denu
- Website: https://www.sepand.tech
- Twitter: sepkjaer20
- Repositories: 124
- Profile: https://github.com/sepandhaghighi
Open Source Enthusiast
JOSS Publication
Pyrgg: Python Random Graph Generator
Tags
graph script generator processing randomGitHub Events
Total
- Release event: 1
- Watch event: 9
- Delete event: 16
- Issue comment event: 6
- Push event: 35
- Pull request review comment event: 14
- Pull request review event: 32
- Pull request event: 38
- Fork event: 2
- Create event: 18
Last Year
- Release event: 1
- Watch event: 9
- Delete event: 16
- Issue comment event: 6
- Push event: 35
- Pull request review comment event: 14
- Pull request review event: 32
- Pull request event: 38
- Fork event: 2
- Create event: 18
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| sepandhaghighi | s****i@y****m | 628 |
| Maxim Ivanov | i****g@g****m | 47 |
| sadrasabouri | s****a@g****m | 44 |
| ahmadsalimi | a****8@g****m | 20 |
| dependabot[bot] | 4****] | 16 |
| dependabot-preview[bot] | 2****] | 14 |
| AmirHosein Rostami | 3****e | 2 |
| The Codacy Badger | b****r@c****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 35
- Total pull requests: 147
- Average time to close issues: 5 months
- Average time to close pull requests: 10 days
- Total issue authors: 6
- Total pull request authors: 7
- Average comments per issue: 0.97
- Average comments per pull request: 1.16
- Merged pull requests: 135
- Bot issues: 0
- Bot pull requests: 23
Past Year
- Issues: 0
- Pull requests: 38
- Average time to close issues: N/A
- Average time to close pull requests: 14 days
- Issue authors: 0
- Pull request authors: 4
- Average comments per issue: 0
- Average comments per pull request: 0.37
- Merged pull requests: 30
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
- sepandhaghighi (26)
- tuxiqae (5)
- sadrasabouri (2)
- ahmadsalimi (1)
- parsanoori (1)
- metiroozmeh (1)
Pull Request Authors
- sepandhaghighi (88)
- sadrasabouri (37)
- dependabot[bot] (19)
- dependabot-preview[bot] (7)
- ivanovmg (6)
- AHReccese (4)
- ahmadsalimi (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 340 last-month
- Total dependent packages: 1
- Total dependent repositories: 3
- Total versions: 18
- Total maintainers: 2
pypi.org: pyrgg
Python Random Graph Generator
- Homepage: https://github.com/sepandhaghighi/pyrgg
- Documentation: https://pyrgg.readthedocs.io/
- License: MIT
-
Latest release: 1.8
published 4 months ago
Rankings
Maintainers (2)
Dependencies
- actions/checkout v1 composite
- sepandhaghighi/conda-package-publish-action v1.2 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- art ==5.7 development
- bandit >=1.5.1 development
- codecov >=2.0.15 development
- flake8 >=3.5.0 development
- networkx >=2.1 development
- pydocstyle >=3.0.0 development
- pydot >=1.2.4 development
- pytest >=4.3.1 development
- pytest-cov >=2.6.1 development
- pyyaml ==6.0 development
- scipy >=1.2.0 development
- setuptools >=40.8.0 development
- vulture >=1.0 development
- art >=0.7
- pyyaml >=3.12


