I remember vividly many years ago when I was tasked by my former boss at a previous company to create trade area maps for each one of our office supply stores. At the time, we had roughly 1,200 stores. I only had MapInfo to work with and no programming skills to fall back on. Needless to say, I was a little distraught.
It didn't take me long to realize that this feat, as far as I was concerned, could not and would not be completed manually. So, a crash course in MapBasic programming was in order. After a lot of studying, a fair amount of pain and hours upon hours of struggle, I was able to create a MapBasic program that would produce these maps in an automated fashion.
Fast forward 4 years and something amazing happened – I was introduced to Alteryx!
After significantly less studying, pain and struggling, I was able to create a workflow which could to do the same thing, except this time produce three map views for each store. Not only was I able to create the workflow without programming, saving me countless hours, Alteryx produced each map in significantly less time. So, I would run the workflow before leaving for the day and come back in the morning with the nearly 4,000 PDFs waiting for me! We then decided to produce two additional thematics for each store, so now we are talking nearly 12,000 maps. You can only imagine the time savings!
How is this done?
The attached workflow (shown below - created in 10.1) is the basis for doing just that. The Grouping function within the Report Map tool (also shown below) is all that is required to create this automation. In this workflow, I want to create a map for each store with each store’s 15 minute drive time and customers. I also want all of the competitors to show up no matter which store is shown.
In order to achieve this, I have simply configured the workflow so that the store number is in the Grouping Field for the first three layers previously mentioned, and left the Grouping Field blank for the competitors layer.
Want a separate file for each map?
In the Render Tool (illustrationbelow):
- Make sure to choose a specific output file type in the Output Mode
- Choose a name and location for the files
- Check the 'Group Data into Separate Reports' box
- Select the field to group on (typically 'Group')
- Choose how you want to modify the file name for each map
As a result, you will see a file created for each map:
- Each layer must have a common field (Store Number in this case).
- The Field type of the common field to group by must be the exact same (Int16 in this case) - No mixing of Int16 with Int64 or V_String with String, for instance.
Things to Consider:
- Only one object from each of the layers that you are grouping by will show up on each map (unless you have multiple records with the same ID). So for example, other stores will not show up on the same map, even if they are within the map view. You can add these in as a separate layer and not group it if you want those within the map view to show up on each map.
- Zoom to layer – Select appropriate layer to zoom to in each map (drive time boundary in this case).
- A field called ‘Group’ will flow through the workflow after the Report Map tool, which you can use for map titles, for example.
Please feel free to comment or ask questions, and thanks for reading!