Toolset

Our toolset provides a set of Python scripts to convert between graph formats.


They can be downloaded from the Python Package Index here or installed using the Python easy_install tool:

easy_install topzootools

yed2zoo Converter Script

The yed2zoo script takes a network traced in yED, and merges it with metadata in a csv file. It will also strip out yED graphics data, and can lookup geographical co-ordinates for nodes.

To convert only tagged networks:

~$yed2zoo -c ~/zoo/networks/classification.csv -d ~/zoo/networks/ --tagged
							
or with geocoding:
~$yed2zoo -d ~/zoo/networks/ --csv ~/zoo/networks/classification.csv --geocode -u eskaytwo
							INFO   Saving to folder: ~/zoo/networks/zoogml_geocoded      
							
With the output:
$ more ~/zoo/networks/zoogml_geocoded/Aarnet.gml 
							graph [
							  DateObtained "2/12/10"
							  GeoLocation "Australia"
							  GeoExtent "Country"
							  Network "AARNET"
							  Provenance "Primary"
							  Access 0
							  Source "http://www.aarnet.edu.au/aarnet3.aspx"
							  Version "1.0"
							  DateType "Current"
							  Type "REN"
							  Backbone 1
							  Commercial 0
							  label "AARNET"
							  Customer 0
							  IX 0
							  LastAccess "3/08/10"
							  Layer "IP"
							  Classification "Backbone"
							  Creator "Topology Zoo Toolset"
							  Developed 1
							  Transit 0
							  NetworkDate "2010-08"
							  Testbed 0
							  SvnVersion 8123
							  node [
							    id 0
							    label "Perth1"
							    Country "Australia"
							    Longitude 115.83333
							    Latitude -31.93333
							  ]
							  node [
							    id 1
							    label "Perth2"
							    Country "Australia"
							    Longitude 115.83333
							    Latitude -31.93333
							  ]
							  node [
							    id 2
							    label "Adelaide1"
							    Country "Australia"
							    Longitude 138.6
							    Latitude -34.93333   
							 

Converter Script

The converter script converts from GML into other formats, including graphml and adjacency matrices. It can reduce multigraphs to single edge graphs, and remove nodes marked as external. An example of using the script to create the GML files used in the Zoo is below
~$zooconvert -d ~/zoo/networks/yED/zoogml_geocoded/ --html -o ~/zoo/website/files --graphml --gml --archive 

Plotting Script

The zooplot script uses basemap to do geographical plotting. It takes a geocoded GML file (produced using yed2zoo or rocketfuel2zoo).
~$ zooplot -f Aarnet.gml --png
						Plotting: Aarnet
						Plotting to ~/plotted_flat/Aarnet 
					

rocketfuel2zoo Converter Script

Will convert topologies from the Rocketfuel dataset.
~$ wget http://www.cs.washington.edu/research/networking/rocketfuel/maps/policy-dist.tar.gz
~$ tar -xzf policy-dist.tar.gz
~$ rocketfuel2zoo -d maps-n-paths/
Will give output similar to:
~$ rocketfuel2zoo -d maps-n-paths/
						INFO   Writing to maps-n-paths/rf2zoo
						INFO   Processing 9070:9070
						INFO   Processing 1785:1785
						INFO   Processing 8220:8220
						INFO   Processing 101:101
						INFO   Processing 1668:1668
						
The output will look like:
~$ more maps-n-paths/rf2zoo/101_101.gml 
						graph [
						  Creator "rocketfuel2zoo"
						  node [
						    id 0
						    label "Sunnyvale CA"
						    ASN 101
						  ]
						  node [
						    id 1
						    label "Seattle WA"
						    ASN 101
						  ]
						  edge [
						    source 0
						    target 1
						    obs_count 2624
						  ]
						]