Giter Site home page Giter Site logo

voronoi-mapper's Introduction

voronoi-mapper

Plot a series of places on a map in the style of a Voronoi diagram, based on an input csv file formatted in the following style (columns in this order - the column header names do not matter):

Labels / Places Y-Coord / Latitude X-Coord / Longitude Colour Place / Been to Place
England 52.3555 -1.1743 Y
Isle of Man 54.2361 -4.5481 N
N Ireland 54.7877 -6.4923 N
Scotland 56.4907 -4.2026 Y
Wales 52.1307 -3.7837 Y

Step 1: Clone voronoi-mapper repo

Clone the voronoi-mapper repo to your area. Note you may need to set up ssh keys and add them to your GitHub account first, see here.

git clone [email protected]:GluonicPenguin/voronoi-mapper.git

Step 2: Install requirements

voronoi-mapper uses a conda installer, with the conda environment set up in Miniconda. To set up Miniconda3 and install the mapper requirements, do the following:

MINICONDA_DIR=/path/to/miniconda3 # change this to somewhere outside the voronoi-mapper repo
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $MINICONDA_DIR # this creates the miniconda3 directory at the known /path/to
rm Miniconda3-latest-Linux-x86_64.sh

source $MINICONDA_DIR/etc/profile.d/conda.sh
conda update -y -n base -c defaults conda
export PYTHONNOUSERSITE=true

Then back in your voronoi-mapper directory, set up the environment:

conda env create -f mapper_env_requirements.yml
conda activate voronoi_mapper_env

In future setups, use the setup_env.sh file to start up the voronoi-mapper environment. Note that you will need to change the first line to the MINICONDA_DIR.

Step 3: Use mapper

voronoi-mapper takes two positional arguments: the input csv file and the output file name and path. An optional argument for the output plot type, e.g. pdf or png, is available (default is png). For example:

python voronoi_mapper.py /path/to/places.csv /path/for/places_plot

The result should look like the following:

Alt text

Step 4: Customisation options

voronoi-mapper can be modified at the dataframe stage to any format that will appear at the Voronoi diagram creation stage. The options currently are:

-f, --fisheye some_label # choose to magnify the diagram about a central point or label, good if there are a lot of places clustered together in one area

voronoi-mapper's People

Contributors

gluonicpenguin avatar

Watchers

 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.