Skip to main content

Custom Maps


The following process details how to create your own Custom Map to upload into Flow with the "Upload TopoJSON" button:


1. Download/Export the shapefile

Find an appropriate shapefile for your custom map.

Here are some good places to find shapefiles:

https://gadm.org/download_country_v3.html  (may be defunct)

https://mapanalysis.mapog.com/map-analysis/add-gis (needs a free account)

https://data.humdata.org/

https://earthworks.stanford.edu/

Download the shapefile from the data source.  Most sources will download the shapefile into a Zip file that contains multiple files, all of which may be needed to represent each of the administrative levels (0 = country, 1= state/province, 2 = county/district, 3 = division, or 4 = subdivision).

Custom Maps (4409818517389)_7bb74fc5-d4b4-4261-bc5c-af8664c666dc.png

3. Go to: https://mapshaper.org/ and drag the downloaded zip file onto the browser window.  Make sure you drag the zip file, rather than one of the files extracted from the zip file.

Use the defaults in the dialogue box and then select the import button.

An outline of the map will appear.

In the pulldown at the top of Mapshaper, select the administrative level you desire if the option is available. You may not have any options based on the source map.

Custom Maps (4409818517389)_2c87a77d-e425-46d2-b16a-3e3309654442.png

4. The file is likely to be HUGE, so click Simplify.
5. Accept the defaults in the popup.

There will be a drag bar at the top of the window. As you drag the simplify bar, the details of lines on the map will change. This will be different for each shapefile, and we suggest you use your best judgment of how clear your county lines need to be (the right value in our tests is about 0.5%).

This will reduce the size of a large (~2MB) file down to a smaller file (20KB or smaller is a good rule of thumb), which is plenty and is the size that Flow will be expecting.

Custom Maps (4409818517389)_adc20749-0282-4a7a-8f5a-92a6cb75605f.png
6. Click to Repair any intersections indicated.
7. Export the file as a TopoJSON file (the file in your download folder will have a .json extension).
8. The resulting exported JSON file can then be uploaded into Flow using the “Upload TopoJSON” button in the custom map definition pane.
9. Once uploaded, Flow will ask you to select the identifiers for the administrative level. You'll be able to see examples for your specific map.
10. You can download the available region names for all selected administrative levels to use as a baseline to match with your own data.
Congratulations- you now have a Custom Map! If you have any difficulties, let us know and we can try to help you resolve them.