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

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.

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

2. Pick the desired administrative area, which are named differently based on country (1- state/province, 2- county/district, 3 - division, 4- subdivision)
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.

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

4. The file willis 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 getreduce 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 whatis ourthe toolsize that Flow will be expecting.

Custom Maps (4409818517389)_2c87a77d-e425-46d2-b16a-3e3309654442.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.button in the custom map definition pane.
9. Once uploaded, Flow will ask you to select the identifiers for the administrative level. We are working on a more intuitive interface for this part, where you'll be able to see examples for your specific map.
10. You can get available regions for all selected administrative levels to use as a baseline for your CSV file if you can’t tell by the column titles and first example, then paste them into Excel to get a better idea for the available options.

Congratulations- you now have a Custom Map! If you have any difficulties, let us know and we can try to help you resolve them.