Skip to content

Getting Started

WukongRework.exe BROKE edited this page Jul 19, 2023 · 4 revisions

Cartogram Maker Tutorial

Installing the Application

Requirements

Instructions:

  1. Clone the git repository
git clone https://github.com/kharanpv/Cartogram_Maker.git
  1. Install all dependencies
poetry install
  1. Run the application
poetry run main-app

Opening the Application

When you first open the application, you will be greeted with the following screen (seen below). On this screen, you will see a button to create a new cartogram on the left. On the right, you will see a list of all previous cartogram projects that have been loaded into the application (these files are currently in JSON format at the time of writing but may be subject to change). You are given the option to view, edit, and download each project.

image

Creating your first cartogram

When clicking on the create button, you will be prompted with two options, browsing for a file on your computer, or to create with the built-in creation tool.

image

Clicking the "Create with Creation Tool" button will bring up the built-in creation tool (seen below). To start creating your map in the creation tool, left-click anywhere on the canvas to put down a vertex for a polygon. When you click again at a different location, a new vertex will be placed at the mouse's location and a line will connect from the last vertex placed down to the current vertex placed down. To create a polygon, click near the location of any pre-existing vertex and it will enclose the polygon with those sets of vertices.

A vertex can be thought of as the corner of a polygon/shape. This means that a polygon/shape is a set of vertices/corners.

image

Below is an example of the kinds of shapes that can be created.

image

Zoom

The plus and minus buttons at the bottom right are the zoom-in and zoom-out buttons respectively. These allow you to zoom in and out as far as needed to get the best accuracy in making your map!

Generating the cartogram

Once you have your map created, ensure that all polygons are enclosed and that every polygon has an associated value with them. Once that is complete, click the "Generate" button to generate your cartogram. A new window will pop up with your generated cartogram for you to view and download!

image

Cartogram Projects

image

Viewing a loaded cartogram project

To view a previous cartogram project that you have created or downloaded, click on the "View" button to see the cartogram again.

Editing a pre-existing cartogram project

To edit a previous cartogram project that you have created or downloaded, click on the "Edit" button to see the map and its data. This will open up the built-in creation tool and pre-populate the canvas with your map.

Downloading loaded cartogram project

To download a previous cartogram project that you have created or downloaded, click on the "Download" button to download the cartogram. It will download the original map and the generated cartogram in the specified file format to your computer's download folder.

The two supported file formats currently are PNG and SVG file types.

Error Messages

Unfinished Map

This error means that either there is an open polygon in the map or a polygon does not have an associated value. Double-check that all polygons are closed and have data values associated with them. image

Invalid JSON structure

This error means that the JSON structure provided to the application is invalid. Double-check that the JSON format is complete and follows the specification given by the Cartogram Maker. image