GAREMP: Graphical Attribute and Relationship Explorer for Map Projections
Analyzing and comparing map projections with GAREMP!
Apache-2.0 © 2019-2020 Jin Yan
Capital University of Economics and Business
Beijing, China
File 'maps+sample.json' which is generated from Gephi (A Graph modelling and visualization tool) is provided as the source and sample file of the following offline processes.
You can process your own JSON file by using the following approach.
Offline processes of GAREMP is dependent on three MATLAB libraries:
fangq/JSONLAB (a MATLAB toolbox to encode/decode JSON files),
AntonSemechko/Bounding-Spheres-And-Circles (a library to find minimum bounding spheres for given set of points),
matlab-toolboxes, a function (i.e., compute_edges, to compute list of edges, from list of faces) which is included in toolbox_graph is used in GAREMP_offline, toolbox_graph is included in matlab-toolboxes.
Offline processes of GAREMP is also dependent on two executables:
Flow-Based Cartogram Generator and brrcrites/graph-coloring.
Clone above dependence (JSONLAB, Bounding-Spheres-And-Circles, matlab-toolboxes, Flow-Based Cartogram Generator, and graph-coloring), and build Flow-Based Cartogram Generator, and graph-coloring, move executables of Flow-Based Cartogram Generator, and graph-coloring to this folder.
Run addArrows('maps+sample.json', 'maps+arrows.json'); to mark directed edges as 'curved' in maps.json.
Run flipEdges('maps+arrows.json', 'maps+flipped.json'); to flip source and target end-points of undirected edges if needed.
Run distortGraph('maps+flipped.json', 'maps+distort.json'); to distort the graph based on cartogram algorithm.
This step would take a long time for cartogram-based distortion. Have a break.
Distorted graph are shown as below.
Run flipEdges('maps+distort.json', 'maps+mono.json'); to flip source and target end-points of undirected edges once more.
Run addColors('maps+mono.json', 'maps+color.json'); to calculate intersection between edges and assign distinct colors to intersected edges.
Chromatic graph are shown as below.
Run addInfo('maps+color.json', 'maps+results.json'); to add attributes, classification, relationship, adjust order or drawing, and calculate neighborship of nodes and endpoints of edges to obtain the final JSON file.
Rename 'maps+results.json' to 'maps.json' which would be used in GAREMP。
All above commands could be executed in batch in function garemp_offline().
export form Gephi -> maps+sample.json -> maps+arrows.json -> maps+flipped.json -> maps+distort.json -> maps+mono.json -> maps+color.json -> maps.json -> used in GAREMP!