Package: pyrgg
PyRGG: Python Random Graph GeneratorTable of ContentsOverviewInstallationUsageSupported FormatsExample of UsageSimilar WorksIssues & Bug ReportsContributionReferencesCitingAuthorsLicenseShow Your SupportTodoChangelogCode of ConductOverviewPyrgg is an easy-to-use synthetic random graph generator written in Python which supports various graph file formats includingDIMACS .grfiles.
Pyrgg has the ability to generate graphs of different sizes and is designed to provide input files for broad range of graph-based research applications, including but not limited to testing, benchmarking and performance-analysis of graph processing frameworks.
Pyrgg target audiences are computer scientists who study graph algorithms and graph processing frameworks.Open HubPyPI CounterGithub StarsBranchmasterdevCICode QualityInstallationPyPICheckPython Packaging User Guidepip install pyrgg==1.4(Need root access)Source CodeDownloadVersion 1.4orLatest Sourcepip install .(Need root access)CondaCheckConda Managing Packageconda install -c sepandhaghighi pyrgg(Need root access)Exe Version (Only Windows)DownloadExe-Version 1.4RunPYRGG-1.4.exeSystem RequirementsPyrgg will likely run on a modern dual core PC. Typical configuration is:Dual Core CPU (2.0 Ghz+)4GB of RAMNote that it may run on lower end equipment though good performance is not guaranteed.UsageOpenCMD(Windows) orTerminal(UNIX)Runpyrggorpython -m pyrgg(or runPYRGG.exe)Enter dataSupported FormatsDIMACS(.gr)p sp <number of vertices> <number of edges>
 	a <head_1> <tail_1> <weight_1>

 	.
 	.
 	.
 	
 	a <head_n> <tail_n> <weight_n>Sample 1(100 Vertices , 3KB)Sample 2(1000 Vertices , 13KB)Sample 3(1000000 Vertices , 7MB)Sample 4(5000000 Vertices , 37MB)CSV(.csv)<head_1>,<tail_1>,<weight_1>

 	.
 	.
 	.
 	
 	<head_n>,<tail_n>,<weight_n>Sample 1(100 Vertices , 3KB)Sample 2(1000 Vertices , 51KB)TSV(.tsv)<head_1>	<tail_1>	<weight_1>

 	.
 	.
 	.
 	
 	<head_n>	<tail_n>	<weight_n>Sample 1(100 Vertices , 29KB)Sample 2(1000 Vertices , 420KB)JSON(.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
 		}
 		]
 	}
 }Sample 1(100 Vertices , 26KB)Sample 2(1000 Vertices , 494KB)YAML(.yaml)graph:
 		edges:
 		- source: head_1
 	  	target: tail_1
 	  	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: trueSample 1(30 Vertices , 6KB)Sample 2(100 Vertices , 35KB)Weighted Edge List(.wel)<head_1> <tail_1> <weight_1>
 	
 	.
 	.
 	.
 	
 	<head_n> <tail_n> <weight_n>Sample 1(100 Vertices , 5KB)Sample 2(1000 Vertices , 192KB)ASP(.lp)node(1).
 	.
 	.
 	.
 	node(n).
 	edge(head_1,tail_1,weight_1).
 	.
 	.
 	.
 	edge(head_n,tail_n,weight_n).Sample 1(100 Vertices , 7KB)Sample 2(1000 Vertices , 76KB)Trivial Graph Format(.tgf)1
 	.
 	.
 	.
 	n
 	#
 	1 2 weight_1
 	.
 	.
 	.
 	n k weight_nSample 1(100 Vertices , 4KB)Sample 2(1000 Vertices , 61KB)UCINET DL Format(.dl)dl
 	format=edgelist1
 	n=<number of vertices>
 	data:
 	1 2 weight_1
 	.
 	.
 	.
 	n k weight_nSample 1(100 Vertices , 8KB)Sample 2(1000 Vertices , 729KB)Matrix Market(.mtx)%%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>Sample 1(100 Vertices , 59KB)Sample 2(1000 Vertices , 1.8MB)Graph Line(.gl)<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>Sample 1(100 Vertices , 17KB)Sample 2(1000 Vertices , 2.4MB)GDF(.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_nSample 1(100 Vertices , 21KB)Sample 2(1000 Vertices , 690KB)GML(.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
      ]
    ]Sample 1(100 Vertices , 120KB)Sample 2(1000 Vertices , 2.4MB)GEXF(.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>Sample 1(100 Vertices , 63KB)Sample 2(1000 Vertices , 6.4MB)Graphviz(.gv)graph example 
		{
		node1 -- node2 [weight=W1];
		node3 -- node4 [weight=W2];
		node1 -- node3 [weight=W3];
		.
		.
		.
		}Sample 1(100 Vertices , 11KB)Sample 2(1000 Vertices , 106KB)Online VisualizationPickle(.p)(Binary Format)Sample 1(100 Vertices , 12KB)Sample 2(1000 Vertices , 340KB)Example of UsageGenerate synthetic data for graph processing frameworks (some of them mentioned here) performance-analysisMedusaTotemFrogCuShaGenerate synthetic data for graph benchmark suite likeGAPSimilar WorksRandom Modular Network GeneratorGenerates random graphs with tunable strength of community structurerandomGraphvery simple random graph generator in MATLABGraph1Random Graph Generator with Max capacity paths (C++)Issues & Bug ReportsJust fill an issue and describe it. We'll check it ASAP!
or send an email toinfo@pyrgg.ir.You can also join our discord serverCitingIf you use pyrgg in your research, please cite theJOSS paper;-)@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}
}JOSSZenodoReferences1-9th DIMACS Implementation Challenge - Shortest Paths2-Problem Based Benchmark Suite3-MaximalClique - ASP Competition 20134- 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 Formats8-Social Network Visualizer9- 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.Logo designed byZahra MobasherShow Your SupportStar This RepoGive a ⭐️ if this project helped you!Donate to Our ProjectBitcoin1KtNLEEeUbTEK9PdN6Ya3ZAKXaqoKUuxCyEthereum0xcD4Db18B6664A9662123D4307B074aE968535388LitecoinLdnz5gMcEeV8BAdsyf8FstWDC6uyYR6pgZDogeDDUnKpFQbBqLpFVZ9DfuVysBdr249HxVDhTronTCZxzPZLcJHr2qR3uPUB1tXB6L3FDSSAx7RipplerN7ZuRG7HDGHR5nof8nu5LrsbmSB61V1qqBinance Coinbnb1zglwcf0ac3d0s2f6ck5kgwvcru4tlctt4p5qefTether0xcD4Db18B6664A9662123D4307B074aE968535388DashXd3Yn2qZJ7VE8nbKw2fS98aLxR5M6WUU3sStellarGALPOLPISRHIYHLQER2TLJRGUSZH52RYDK6C3HIU4PSMNAV65Q36EGNLZilliqazil1knmz8zj88cf0exr2ry7nav9elehxfcgqu3c5e5CoffeeteChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelogand this project adheres toSemantic Versioning.Unreleased1.4- 2023-07-06Addedcheck_for_configfunctionload_configfunctionsave_configfunctionChangedREADME.mdmodifiedLogo changedcodecovremoved fromdev-requirements.txtTest system modifiedError messages updated1.3- 2022-11-30AddedGraphviz(DOT) formatChangedasciinemainstruction video updatedTest system modifiedREADME.mdmodifiedPython 3.11added totest.ymlCLI mode updateddev-requirements.txtupdatedTo-do list moved toTODO.md1.2- 2022-09-07AddedAnaconda workflowDiscord badgeChangedMenu optimizedDocstrings modifiedbranch_genfunction modifiededge_genfunction modifiedprecisionandmin_edgeparameters added tobranch_genfunctionrandom_edgeparameter removed frombranch_genfunctionTest system modifiedAUTHORS.mdupdatedLicense updatedREADME.mdmodifiedPython 3.10added totest.ymlRemovedsign_genfunctionrandom_edge_limitsfunction1.1- 2021-06-09Addedrequirements-splitter.pyis_weightedfunction_write_properties_to_jsonfunctionPYRGG_TEST_MODEparameterChangedTest system modifiedJSON, YAML and Pickle formats value changed fromstringtonumberpropertiessection added to JSON, YAML and Pickle formats_write_to_jsonfunction renamed to_write_data_to_jsonloggerfunction modifiedtime_convertfunction modifiedbranch_genfunction modifiedReferences updated1.0- 2021-01-11AddedNumber of files optionChangedAll flags type changed toboolMenu optimizedTheloggerfunction enhanced.Time format in theloggerchanged to%Y-%m-%d %H:%M:%Sdl_makerfunction modifiedtgf_makerfunction modifiedgdf_makerfunction modifiedrunfunction modified0.9- 2020-10-07AddedGEXF formatFloat weight supporttox.iniChangedMenu optimizedpyrgg.pyrenamed tograph_gen.pyOther functions moved tofunctions.pyTest system modifiedparams.pyrefactoredgraph_gen.pyrefactoredfunctions.pyrefactoredweight_str_to_numberfunction renamed toconvert_str_to_numberbranch_genfunction bugs fixedinput_filterfunction bug fixedgl_makerfunction bug fixedCONTRIBUTING.mdupdatedAUTHORS.mdupdatedRemovedprint_testfunctionleft_justifyfunctionjustifyfunctionzero_insertfunction0.8- 2020-08-19AddedGDF formatGML formatChangedCLI snapshots updatedAUTHORS.mdupdated0.7- 2020-08-07AddedGraph Line formatChangedMenu optimized0.6- 2020-07-24AddedMatrix Market formatChangedjson_makerfunction optimizeddl_makerfunction optimizedtgf_makerfunction optimizedlp_makerfunction optimized0.5- 2020-07-01AddedTSV formatMultigraph controlChangedbranch_genfunction modifiedWebsite changed tohttps://www.pyrgg.ir0.4- 2020-06-17AddedSelf loop controlGithub actionChangedappveyor.ymlupdated0.3- 2019-11-29Added__version__variableCHANGELOG.mddev-requirements.txtrequirements.txtCODE_OF_CONDUCT.mdISSUE_TEMPLATE.mdPULL_REQUEST_TEMPLATE.mdCONTRIBUTING.mdversion_check.pypyrgg_profile.pyUnweighted graphUndirected graphExe versionChangedTest system modifiedREADME.mdmodifiedDocstrings modifiedget_inputfunction modifiededge_genfunction modifiedParameters moved toparams.py0.2- 2017-09-20AddedCSV formatYAML formatWeighted edge list format (WEL)ASP formatTrivial graph format (TGF)UCINET DL formatPickle format0.1- 2017-08-19AddedDIMACS formatJSON formatREADME