Suzanne-Boden
Esri Regular Contributor
since ‎07-01-2014
40 Badges Earned
Discoverer Expert
View All Badges Earned
Online
460 Posts created
144 Kudos given
49 Solutions
511 Kudos received
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

My Ideas

(0 Idea Submissions)

Latest Contributions by Suzanne-Boden

BLOG
"P" Is the Key
ModelNoParamsMSg-300x222.jpg

Uh oh. Now what?



Have you ever opened a model tool and seen the statement, "This tool has no parameters"? Maybe you closed the dialog box thinking the model had a fatal error.

Time to clear up the confusion. That statement is information, not an error message.

The model will run fine as-is, meaning it will run using the inputs and criteria specified by the model creator. You can't change anything. Go ahead and click OK to run the model.

Model parameters are things that can be changed. If they exist, you will see them when you open a model tool.

So what can be changed using a parameter? Just about anything—inputs, outputs, and tool-specific parameters. A good way to learn how to work with model parameters is to create a model, add its tools, and set the tool parameters as usual.

After the model is built (and saved), think about what criteria you would want to change when running it in the future. Running a model using different input data is a common need. Adding a parameter can meet that need.
ModelParam-300x143.jpg

The input to the Create Folder tool is a model parameter.

Allow for ChangeTo make a tool's input a parameter, in the ModelBuilder window right-click the input element and choose Model Parameter. It's that easy. The letter "P" above an element indicates it's a model parameter.
  • Tip: When you make an element a model parameter, the element name will display in the model tool. Element names can be cryptic, so a good practice when adding a parameter is to rename its element so that model users will understand what is expected. To rename an element, right-click it and choose Rename.

Here, the Create Folder tool input was renamed to "Set your workspace folder" (the original name was a folder path). With the new name, it will be clear that you can browse to a different workspace if you don't want to use the default location.

To make a tool parameter into a model parameter, first make the tool parameter a variable, then set the variable to be a model parameter. The Create File GDB tool has three parameters: Location, File GDB Name, and Version.

Suppose you want the ability to assign a different geodatabase name each time the model is run (perhaps you'll be creating multiple geodatabases as part of your project).
ToolParam-300x117.jpg

File GDB Name is now a model parameter.



In the model window, right-click Create File GDB, click Make Variable > From Parameter > File GDB Name.

The variable is added to the diagram with an arrow connecting it to the Create File GDB tool. To make the variable a model parameter, right-click it and choose Model Parameter. Now it too has a "P" above it.

In this case, "File GDB Name" is self-explanatory, so there's no need to rename the element.
4ModelParams-300x172.jpg

Descriptive parameter names help model users know what to do.



To support testing multiple scenarios, now suppose you want to be able select subsets of features for processing. In the example model, the Feature Class to Feature Class tool is used to convert a shapefile of ASAM incidents to a geodatabase feature class.

The tool has two parameters that make sense to designate as model parameters: Input Features (required) and an optional Expression parameter used to define a subset of features. Input Features is the location of the shapefile on disk, which could vary.

Right-click the Feature Class to Feature Class tool and click Make Variable > From Parameter > Input Features. Right-click the Input Features variable element and choose Model Parameter.

Repeat this process for the Expression parameter. Both of these model parameters will benefit from being renamed.
ModelTool-300x152.jpg

Model parameters exposed in the model tool.



After saving the model, close ModelBuilder and open the model as a tool to see the parameters.
  • Tip: If you don't like the display order of the parameters in the model tool, you can reorder them in ModelBuilder (Model menu > Model Properties > Parameters tab).

Notice the help text on the right side of the model tool. This is the Description text from the Model Properties dialog box.Less Is More

By allowing certain criteria to be changed, parameters increase model usability and are a valuable technique to explore what-if scenarios. However, as with anything, it's important to exercise restraint. Setting too many parameters defeats the other main advantage of a model—to simplify and speed up a geoprocessing workflow.

Remember, you can always open a model in ModelBuilder to tinker with individual tool settings and run the model to explore the result of your tinkering. Add parameters only for items you or others are likely to find most useful, such as the option to specify different input data or modify a key analysis tool setting. Put the rest of the model elements on auto-pilot.

In the next installment, you will go beyond basic techniques and learn some model power moves.

Related posts:
-->
0
0
1497
POST
2
1
4329
BLOG
2
0
3965
BLOG
0
0
977
IDEA
-->
0
0
211
IDEA
-->
0
0
161
BLOG
3
1
1456
IDEA
-->
0
1
612
BLOG
1
6
18830
BLOG
0
0
1095
BLOG


Lacking the ability to publish a map service myself, I opted to go the minimalist route—that is, use the ArcGIS Online map viewer. If you have access to an ArcGIS Online organizational account, you can map your data right inside Excel using Esri Maps for Office.

A viable alternative for those without an organizational account is to add a .csv file (text file of comma-separated values) to the map viewer and save the map to their ArcGIS Online public account. An Excel spreadsheet is easily saved as a .csv file. To be mapped, the spreadsheet must have fields that store location data—latitude and longitude values, GPX coordinates, or addresses.

I wanted to visualize the locations of individuals in the U.S. who attended the Creating Hosted Map Services with ArcGIS Online live training seminar. Understanding the geographic distribution of our viewers is useful to evaluate seminar broadcast times. All I had to do to create a web map was follow these easy steps.Step-by-Step Example
  1. Open the Excel spreadsheet and save it as a .csv file.
  2. Go to www.arcgis.com and sign in to your public or organizational account.
  3. Click the Map link at the top (or bottom) of the page.
  4. In the map viewer, zoom to the data's extent.
  5. Keep the default Topographic basemap or click the Basemap Gallery button and choose a different basemap.
  6. To the left of the Basemap Gallery button, click Add > Add Layer from File, browse to the .csv file, then click Import Layer. (If you're using Firefox or Chrome, you can just drag and drop a .csv file into the map viewer.)
  • Note: You may get prompted to specify which fields contain location information (e.g., your address or lat-long field names). There is also a 250-feature limit when adding .csv files to the map viewer.
PointsOnMap-300x198.png

Point features can be drawn on the map with a single symbol, unique symbols based on an attribute, or as a heat map. To quickly see the point distribution, I'll choose to use a single symbol for all the features. Clicking Select under Location (single symbol), then Done displays the points on the map.

In less than two minutes, I'm visualizing my data as points on a pretty map. I can click each point and see the associated data from the Excel spreadsheet in a pop-up. Easy. Except...

I only want to show certain columns, and I don't like the names of those columns. I also decide I'd like to symbolize the points by self-reported industry.

I can address all of these issues right in the viewer.
  1. In the Contents pane to the left of the map, mouse over the layer name and click the arrow next to it, then click Change Style.
  2. Under Choose an attribute to show, choose the field that stores the values you want to show.
  3. For the drawing style, select Types (Unique symbols).

In the symbol preview, I notice an industry category named Other. For my purposes, Other is the same as no data. It's easy to change the Other symbol label.
  1. Click Options, click the label next to the Other symbol, then type a new label (No Information is more understandable for this map). If I wanted, I could click the symbol and assign a different symbol to distinguish this category.
  2. Click OK, then Done.
  • UniqueValuesMap.pngTakeaway #1: Explore your data and decide how you want to present it before putting it on a map. In the map viewer, it's easy to change the display properties, but you can't modify the data itself.

So, in just a few more minutes, I've mapped viewer distribution and self-reported industry. Next, I'll configure the pop-ups.
  1. In the Contents pane, click the arrow next to the layer name again and choose Configure Pop-up.
  2. Enter a descriptive pop-up title or select an attribute to use as the title.
  3. Click Configure Attributes and uncheck fields you don't want to display, then make sure the fields you do want to display are checked. You can also use the arrow buttons to reorder the fields. Be sure to type a friendly alias for each field that will display, then click OK.
  4. At the bottom of the Configure Pop-up pane, click Save Pop-up. PopupInfo.png

Now when I click points on the map, I see only the information of interest. I also notice something.

When I zoom in to a large scale, the Topographic basemap gets very detailed. Building footprints and local streets display. Some of my symbol colors blend into the basemap features.

Switching to the Light Gray Canvas basemap is a quick solution. This basemap, with its subdued colors and less detail at large scales, is a better backdrop for my data. LightGrayCanvasMap.png
  • Takeaway #2: Before deciding on a basemap, explore it at large (and small) scales to understand the level of detail and assess its appropriateness for your mapping purpose. It's important to choose symbol colors that will stand out against the basemap at various scales.

Finally, I want to show time zones on the map. I don't have a layer of time zones but I'll search ArcGIS Online content to see if anyone has shared this data.
  1. Click Add > Search for Layers.
  2. In the Find text box, type time zones, choose to search in ArcGIS Online, then click Go.
  3. The search results include several time zone feature services. After adding one of them to the map, I change its symbology to unique symbols so each zone will have a different color and I increase the layer transparency value so the time zone features don't obscure the other data. TimeZonesOnMap.png

In less than 20 minutes, I've "mappified" my Excel data and added context to it. To generate a link to the map that I can embed in a web page, e-mail, or social media post, I just need to save the map to my public account, add a title, some tags, and a brief description, then share the map.
  • Takeaway #3: There are lots of ways to create, save, and share a web map these days. If you don't have access to software for creating GIS services, you're not out of luck. Creating a high-performing web map with the ArcGIS Online map viewer really is an easy—and useful—method.

Related posts: -->
0
0
1225
IDEA
-->
0
0
1101
BLOG
0
0
1826
BLOG
0
2
974
IDEA
-->
0
0
823
Activity Feed