J'ai diverses tâches que j'effectue au travail impliquant la barre d'outils BA. Je commence à en avoir assez des mêmes clics de souris encore et encore et je me demande s'il existe un moyen de script certaines de ces tâches ? La première chose que je fais chaque fois que je reçois des données est 1. géocoder les données en utilisant le localisateur BA zip4 2. Utiliser BA pour créer une couche client et une couche magasin (configuration de la succursale et configuration du client) 3. Utiliser la configuration client pour attribuer les clients à l'emplacement le plus proche. En utilisant ces étapes comme point de départ pour ce fil ; comment puis-je automatiser certaines de ces tâches ? Devrais-je utiliser model builder ? Merci d'avance.<\/P><\/BODY><\/HTML>
Thanks so much Darren! I must admit, however, that I'm not much of a programmer and model builder is the extent of my programming in ArcMap so far. Could you break this down a little more for me?
I understand that if I've already created target groups that there is a targetgroup.xml file that is created in C:\My Output Data\Projects\...
Are you saying that in the bold text above that I can replace SegmentationClusters="'Top Tier';'Profesional Pride';Boomburbs" with the path to my .xml file?
Also, would I just save this as a stand alone python script and run it alone in something like IDLE? Like I said, I have some knowledge, but this would really be my first time working hands on with a python script. Thanks for teaching me.
Hi Brandon,
As you have noted, the 'Target Groups' parameter does not exist within the 'Segmentation Penetration Map' gp tool.
However, I have discussed this scenario with one of our developers and he suggested an alternative approach.
You could create a Python tool that will accept the 'Target Group' XML file and 'Target Name' inside the 'Target Group.'
In Python code, open the Target Group XML file, find the required target, read the segments inside that target and pass them to 'Segmentation Penetration Map.':
arcpy.TargetMap_ba(SegmentationBase="Total Households", SegmentaionClusters="'Top Tier';'Professional Pride';Boomburbs", SegmentationLayer="US.ZIP5", SegmentationAnalysisResultFolder="C:/My Output Data/Projects/Default Project/Segmentation/Segmentation Analyses/Target Map", CreateReport="CREATE_REPORT", CreateFeatureClass="CREATE_OUT_FEATURECLASS")
C:\My Output Data\Projects\Default Project\Segmentation\Target groups\Target Group\TargetGroup.xml
<?xml version="1.0" encoding="utf-8"?>
<TargetGroupData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" SegmentationSystem="Tapestry 2014">
<Target name="MaxTarget1">
<Cluster code="1A" name="Top Tier" />
<Cluster code="1B" name="Professional Pride" />
<Cluster code="1C" name="Boomburbs" />
</Target>
</TargetGroupData>
We hope this is helpful and will keep an eye out for follow up questions.
Thank you,Darren
Thanks Darren,
Yes, I've used the Iterate Field Values tool already in one of my models. I'm now looking to automate the creation of Target Penetration Maps, but the "Segmentation Penetration Map" Tool seems to be missing the ability for me to add my own target groups. I could use some help with that now.
For instance, in the Target Penetration Map Wizard, you can select a target group and it will map your core and Developmental segments. The toolbox won't let me choose a target group that already exists. Do you have any thoughts on that?
Great to hear that you are diving into Model Builder! You may have already picked up on this but if not, the Iterator toolset would be applicable to your needs.
The Iterator toolset contains twelve iterators that help repeat a process or set of processes on a set of inputs.
An overview of the Iterator toolset—Help | ArcGIS for Desktop
Thank you,
Darren
Thanks Praveen. I've begun work on this and have been successful so far. I'm a little further in the weeds now looking to automate the creation of Target Penetration Maps, but the "Segmentation Penetration Map" Tool seems to be missing the ability for me to add my own target groups. I could use some help with that now.
Using model builder is the recommended way of automating the tasks you described above. I am adding Darren Cook from the Business Analyst Desktop team to help if you have further questions.
Thanks,
Praveen
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.