Giter Site home page Giter Site logo

garemp_offline's Introduction

GAREMP: Graphical Attribute and Relationship Explorer for Map Projections

Analyzing and comparing map projections with GAREMP!

http://garemp.github.io/

License

Apache-2.0 © 2019-2020 Jin Yan

Capital University of Economics and Business

Beijing, China

Sample file

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.

RAW JSON FILE

You can process your own JSON file by using the following approach.

Prerequisites

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.

Offline Processes of GAREMP

mark directed edges

Run addArrows('maps+sample.json', 'maps+arrows.json'); to mark directed edges as 'curved' in maps.json.

flip undirected deges

Run flipEdges('maps+arrows.json', 'maps+flipped.json'); to flip source and target end-points of undirected edges if needed.

distort the graph

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.

Distorted Graph

flip undirected deges once more

Run flipEdges('maps+distort.json', 'maps+mono.json'); to flip source and target end-points of undirected edges once more.

calc and add colors

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.

Chromatic Graph

add attributes and relationship

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。

Run commands in one command

All above commands could be executed in batch in function garemp_offline().

Sequences of JSON file

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!

garemp_offline's People

Contributors

garemp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.