Creating Custom Region Maps for Dummies
Hi all, I struggled for some time on how to create custom region maps for several of our SBUs when they didn't fit cleanly into state or county boundaries and output it in an SVG file. I am not a graphic designer or a programmer, so this guide is coming from someone that is really good at PowerPoint and fiddled with the Domo add-on for illustrator. First, let me start by saying that if you can segment your region by state, county or other geography already in a Domo map, use the Create Regions tool under Admin >> Company Settings >> Add Chart >> Create Regions and select the map you want to start with.
The first graphic is what I originally built using that tool and a US county map. We split the state of California and Nevada, so I used the FIPS to Zip dataset (found under Domo Dimensions dataset in connectors) to create a dataflow to capture every US county and associate it with a region. You could also do this in Excel or Google Sheets and upload it to Domo. I also ended up removing Alaska, Hawaii and other areas not in the continental US because the data labels on maps based on our regions was messy when I included outlaying areas (Domo tries to center the label over the entire area). You just uncheck to box to show sub-regions not included in the dataset - for this to work, you will need to list out every county or geography you want shown on the chart, even if you do not have any data you want to populate a specific area with, otherwise you will end up with white holes in the chart.
This was a good first step, but then people didn't like all the county lines showing on the map. I tried several different tools including Boxy and Illustrator starting with a state map of the U.S. in an SVG file that I downloaded from the Internet. Boxy is much easier to edit the coding in SVG files and add names and ids to the different pieces of the chart, but I found that illustrator was able to do what I needed in a fairly idiot proof way, so that is what I settled on. My second iteration simply added a line that divided CA and NV in two.
Let me walk you through the steps. (1) Open your SVG file in Illustrator. (2) Choose Window >> Pathfinder to display the pathfinder tools (3) draw a line through a state, making sure you touch the border of the state (or other image) at both ends of the line. (4) select the line and the state together (or other image) (5) From the pathfinder tools, select Divide - this will create two or more objects and in this case split my state in two (6) in the layers menu on the right, you can now group the paths into your various regions - there will be a new group with the two different paths that you can now name and group under a specific region (just make sure the group or path has the name you will use to assign your region from a Domo dataset) (7) save and upload the file to Domo under Admin >> Company Settings >> Add Chart >> Select File and then you will get a preview of it and be able to name it.
The great thing about using custom charts and uploading your own, is that you can change the underlying chart without having to fix any cards that are built on it. Using the Domo create region tool does not allow you to modify the chart once it is created, so you would have to manually go change the chart types on cards already created if you want to modify it.
So the map above sufficed until users wanted a cleaner depiction of regions without the state lines in it. For this I turned to Illustrator and the file I created above with my region groupings. (1) Save the SVG file as another name, so you don't overwrite what you just did (2) From the layers on the right, select a group/region you already created by clicking on the circle to the right of the group name (3) From the pathfinder window, you will choose Merge - which will merge all the groups/states together that you have selected into one (4) Now it gets a bit tricky because the black outline will disappear, so I found it best to set the stroke size in the Path toolbar at the top of illustrator - look for the word Stroke and set the value to the right of it (5) now you will see I have a region merged below, but I still have a pesky line showing between two states that I want to get rid of - so what you want to do is select one single blue point on the path closest, but not directly on the outside edge of your region and click delete (6) you might have to do this a couple times until you break the path and can select the erroneous path and delete the black line
(7) if you have a lot of erroneous paths that you need to get rid of, you will repeat, but the important thing is that you delete a single point on each path (in this case state) and then in the pathfinder window choose Merge again, then add the outline back with the Stroke size setting - I fould out the hard way that breaking a single path in two places at once could create multiple objects that leave white space through the middle of your chart. (8) once you clean all of your regions, the next step will be renaming the groups in the layers window on the right to the region names - these get removed when you merge paths (9) save the file and upload it to Domo under Admin >> Company Settings >> Add Chart >> Select File
This was what the final result of merging/splitting states into regions. The first time creating regions in illustrator, it took me 10 hours of playing, but once you figure out what you are doing, you can do it in about 20-30 minutes and then share for everyone in your Domo instance to use (you need to be an admin to add it to your company's custom charts).