<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Drive Time Trade Areas pass field variable as a distance in Business Questions</title>
    <link>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538987#M9</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John - thanks for pointing me to this GeoNet Post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clinton - we have some exciting development news in ArcGIS Pro 2.7 Business Analyst that should help you with situations like this.&amp;nbsp; We are adding support for Arcade expressions in Trade Area tools involving distance calculations.&amp;nbsp; This allows for awesome flexibility to control how your trade areas can be built, directly from fields in your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="512615" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/512615_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a couple examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have restaurants across a regional area, spanning cities and small towns.&amp;nbsp; I&amp;nbsp;have a field in my restaurant database that tags "1" for urban designated stores, and "2" for rural stores.&amp;nbsp; I need to consider a farther driving distance for rural stores.&amp;nbsp; So the expression below can be used to build drive times that represent 30 min for all rural stores and 15 for urban areas.&amp;nbsp; Using the Generate Drive Time Trade Areas tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if ($feature.franchise_type&amp;nbsp;== "1") {return 15} if ($feature.franchise_type == "2") {return 30}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Telecom we are placing 5G locations.&amp;nbsp; On the main drag of Michigan Ave we want to analyze customer/home coverage within 400 meter buffers of each proposed location.&amp;nbsp; For all other locations we want to model them a bit differently, seeing what is included in 100 and 200 meter areas.&amp;nbsp; The expression below shows this.&amp;nbsp; Using the Generate Trade Area Rings tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if ($feature.street_name == "Michigan") {return 400} else {return [100, 200]}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are countless other custom ways to use expressions, including controlling the size of areas based on ranges of data and threshold values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to reach out.&lt;/P&gt;&lt;P&gt;Kyle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Nov 2020 21:10:32 GMT</pubDate>
    <dc:creator>KyleWatson</dc:creator>
    <dc:date>2020-11-05T21:10:32Z</dc:date>
    <item>
      <title>Drive Time Trade Areas pass field variable as a distance</title>
      <link>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538985#M7</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a dataset of 600,000 records where I need to calculate a drive time that is different for each based on model that estimates the actual/variable drive time needed at that location.&amp;nbsp; Within ArcPro (2.5) I can create a drive time trade area but it only allows input for 1 specific drive time point.&amp;nbsp; How can I change the python code so that it reads from the record/file the specific drive time that I need for it to calculate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the Business Analyst drive time code:&lt;/P&gt;&lt;P&gt;arcpy.ba.GenerateDriveTimeTradeArea("Heat_Map_Grids_Point", r"C:\Default.gdb\Heat_Map_Drive_Times", "Driving Time", &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;[5]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;, "MINUTES", "GRID_ID", "OVERLAP", "KEEP_OVERLAP", "TOWARD_STORES", None, "TIME_ZONE_AT_LOCATION", None, "STANDARD")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the &lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;&lt;STRONG&gt;[5]&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt; is the variable I need to convert to a field value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 15:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538985#M7</guid>
      <dc:creator>ClintonCooper2</dc:creator>
      <dc:date>2020-02-12T15:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Drive Time Trade Areas pass field variable as a distance</title>
      <link>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538986#M8</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently it does not look like there is a parameter that would allow you to set that right away. It can be achieved with some additional python logic – essentially you would create a list of unique drive time values, make feature layers that only contain the points that equal each unique drive time (looping through), execute the drive time trade area tool for each grouping (looping through), and then merge them all together to create the final output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is an option for doing this in the &lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/networks/what-is-network-analyst-.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Network Analyst extension&lt;/A&gt;; where you can create service areas which are essentially the same thing as the drive time trade areas. There is a parameter in there that allows you to set the value from a table when you are adding facilities. In this case you would set the “Breaks_TravelTime” field to the one in your table and those values would be used when solved. See the help documentation, under “Breaks_[Cost]” section, about this here: &lt;A href="https://pro.arcgis.com/en/pro-app/help/analysis/networks/service-area-analysis-layer.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/help/analysis/networks/service-area-analysis-layer.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included a sample of how you may do this with python below. It is just an example and not necessarily optimized or full proof but is there for you to reference; works with in memory data along the way and you would need to make some changes to get it to work on your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datetime
&lt;SPAN class="comment token"&gt;#set start time&lt;/SPAN&gt;
startTime &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
current_workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace

&lt;SPAN class="comment token"&gt;## Set Variables &lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#-----------------------------------------------------------------------------#&lt;/SPAN&gt;
input_fc&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Sample_Data\ExampleGDB.gdb\Tessellations_Points"&lt;/SPAN&gt;
output_fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;"C:\Sample_Data\ExampleGDB.gdb\Drive_Times"&lt;/SPAN&gt;
drive_time_Field &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Drive_Time_Value"&lt;/SPAN&gt;
lry_lst &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
drive_time_lry_lst &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;###Functions to be executed&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#-----------------------------------------------------------------------------#&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;## Function to return a list of unique drive time values. &lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;unique_values&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;table &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SearchCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;table&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; sorted&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Function to loop through each unique drive time and make a feature layer.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;tmp_lry&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_lry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;drive_time_Field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;dvr_times&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;  
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; dvr_times&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        sql&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"""{0} = {1}"""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AddFieldDelimiters&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_lry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; drive_time_Field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        slry_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Layer_Time_{0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeFeatureLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_features &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; in_lry&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_layer&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;slry_name &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;where_clause &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sql&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        lry_lst&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;slry_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Function to run GenerateDriveTimeTradeArea for each feature layer.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;drv_times&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer_list&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;id_field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; val &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; lry_lst&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        netwrok_time &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; val&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"_"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
        lry_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Drive_Time_{0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;netwrok_time&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lry_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ba&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GenerateDriveTimeTradeArea&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;val&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"memory"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lry_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Driving Time"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; netwrok_time&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"MINUTES"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; id_field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"OVERLAP"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"KEEP_OVERLAP"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TOWARD_STORES"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TIME_ZONE_AT_LOCATION"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"STANDARD"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        drive_time_lry_lst&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lry_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##Run the functions&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#-----------------------------------------------------------------------------#&lt;/SPAN&gt;
myValues &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; unique_values&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_fc &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;drive_time_Field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myValues&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
tmp_lry&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;drive_time_Field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;myValues&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
drv_times&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lry_lst&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"GRID_ID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#Merge separate drivetimes layers to one&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Merge_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;drive_time_lry_lst&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; output_fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;


&lt;SPAN class="comment token"&gt;#Clear memory datasets&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"memory"&lt;/SPAN&gt;
del_list &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; lry_lst&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;drive_time_lry_lst
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; itm &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; del_list&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Delete_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;itm&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Removed {0} from in memomry workspace"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;itm&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Set workspace back to starting workspace&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; current_workspace
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"done"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;datetime&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;now&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; startTime&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also suggest that you post this on the ArcGIS Ideas page to request them adding the functionality to the tool in the future. This way others with the same request can vote on it if they also want to see it happen. -&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/community/arcgis-ideas/content?filterID=contentstatus%5Bpublished%5D%7Ecategory%5Bbusiness-analyst%5D" title="https://community.esri.com/community/arcgis-ideas/content?filterID=contentstatus%5Bpublished%5D%7Ecategory%5Bbusiness-analyst%5D" target="_blank"&gt;ArcGIS Ideas&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:23:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538986#M8</guid>
      <dc:creator>JohnHendrickson</dc:creator>
      <dc:date>2021-12-11T23:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Drive Time Trade Areas pass field variable as a distance</title>
      <link>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538987#M9</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John - thanks for pointing me to this GeoNet Post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clinton - we have some exciting development news in ArcGIS Pro 2.7 Business Analyst that should help you with situations like this.&amp;nbsp; We are adding support for Arcade expressions in Trade Area tools involving distance calculations.&amp;nbsp; This allows for awesome flexibility to control how your trade areas can be built, directly from fields in your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="512615" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/512615_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a couple examples.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have restaurants across a regional area, spanning cities and small towns.&amp;nbsp; I&amp;nbsp;have a field in my restaurant database that tags "1" for urban designated stores, and "2" for rural stores.&amp;nbsp; I need to consider a farther driving distance for rural stores.&amp;nbsp; So the expression below can be used to build drive times that represent 30 min for all rural stores and 15 for urban areas.&amp;nbsp; Using the Generate Drive Time Trade Areas tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if ($feature.franchise_type&amp;nbsp;== "1") {return 15} if ($feature.franchise_type == "2") {return 30}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Telecom we are placing 5G locations.&amp;nbsp; On the main drag of Michigan Ave we want to analyze customer/home coverage within 400 meter buffers of each proposed location.&amp;nbsp; For all other locations we want to model them a bit differently, seeing what is included in 100 and 200 meter areas.&amp;nbsp; The expression below shows this.&amp;nbsp; Using the Generate Trade Area Rings tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;if ($feature.street_name == "Michigan") {return 400} else {return [100, 200]}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are countless other custom ways to use expressions, including controlling the size of areas based on ranges of data and threshold values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please feel free to reach out.&lt;/P&gt;&lt;P&gt;Kyle&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2020 21:10:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/business-questions/drive-time-trade-areas-pass-field-variable-as-a/m-p/538987#M9</guid>
      <dc:creator>KyleWatson</dc:creator>
      <dc:date>2020-11-05T21:10:32Z</dc:date>
    </item>
  </channel>
</rss>

