Spatial data and attribute data are complementary. Spatial data represents various aspects of geography as layers on a map. Attribute data stores information about those layers as rows and columns in a table. Layers can be queried, symbolized, and analyzed by their attributes to uncover geographic patterns and relationships.
Overview
- Video length: 9:29.
- This video was created with ArcGIS Pro 2.9
In this tutorial, you will explore several ways of working with attributes. You'll click features in a map layer to see what is known about them. You'll work with an attribute table to display and format fields of interest. You'll use analysis tools to query and summarize data. Finally, you'll create a chart to represent information from an attribute table visually.
- Estimated time: 45 minutes
- Software requirements: ArcGIS Pro Basic
Note:
The quick-start tutorials are updated at each software release. For the best experience, use an online help version that matches your software version.
Open the project
Livestock farming is a historic staple of the New Zealand economy. Sheep, cattle, deer, and pigs have all been farmed on both the North and South Islands. Today, agriculture accounts for about 4 percent of the country's total gross domestic product. While sheep are still raised for meat and wool, dairy farming is now the most important part of the agricultural sector. In this tutorial, you'll explore information about sheep and other livestock at the New Zealand regional level.
- Start ArcGIS Pro and sign in if necessary.
- On the start page, next to the list of recent projects, click Open another project.
Note:
If you already have a project open, click the Project tab on the ribbon. In the list of side tabs, click Open. On the Open page, on the Recent Projects tab , click Open another project at the top of the page.
- On the Open Project dialog box, under Portal , click ArcGIS Online .
Note:
If you are signed in to ArcGIS Enterprise , you must set your active portal to ArcGIS Online to access the tutorial data. If you aren't able to do this, you can download the data from a browser.
- At the top of the dialog box, in the Search box, type Explore your data and press the Enter key.
- In the list of search results, click Explore your data to select the project package.
Note:
If there is more than one project package with this name, select the package with the Authoritative badge . In the Owner column, the owner name is ArcGISProTutorials. If you don't get any results, see No search results are returned.
- Click OK.
The project opens with a map of New Zealand's 16 regions against a light gray basemap. The regions are labeled with their names.
Explore regions and their attributes
Each region has information about the numbers of sheep and cattle found there. You can access this information in various ways: through pop-ups on the map, through the layer attribute table, and through the Attributes pane.
- On the ribbon, click the View tab. In the Windows group, click Reset Panes and click Reset Panes for Mapping (Default).
This ensures that the Contents and Catalog panes are open and that other panes are closed.
- On the ribbon, click the Map tab. In the Navigate group, make sure that Explore is selected.
- On the map, click a region, such as Canterbury on the South Island.
The Pop-up pane appears with attributes for the region. They include the region name, its area, and livestock counts for various years. These attributes are stored in a table associated with the Regions layer. Learn more about working with pop-ups.
- In the Pop-up pane, scroll down, if necessary, to see all the attributes.
At the bottom is an attribute named IMAGE_URL with a link to an online image. Later in the tutorial, you'll configure the pop-ups to display the images referenced by this attribute.
- Click another region on the map.
The pop-up updates with the attributes for the region you clicked.
- Close the Pop-up pane. In the Contents pane, click the Regions layer to select it.
On the ribbon, the Feature Layer tab set appears.
- On the Feature Layer tab set, click the Data tab. In the Table group, click Attribute Table .
The Regions table opens. Each row, or record, in the table represents a region on the map. Each column, or field, represents an attribute.
- In the Regions table, click any row header (the small gray square at the left edge of a row) to select a record.
The record is highlighted in the table, and the corresponding region is selected on the map.
Tip:
If you can't see the whole map when the table is open, try maximizing the ArcGIS Pro window, zooming out on the map, or undocking the map view.
- In the row of tools at the top of the table, click Clear to deselect the record and the feature on the map.
- On the ribbon, click the Map tab. In the Selection group, click the Select drop-down arrow and click Rectangle .
- On the map, draw a box over a few features to select them.
In the table, the corresponding records are selected.
- Make the Regions table active by clicking its view tab.
- At the bottom of the table view, click Show Selected Records to see only the selected records.
- Click Show All Records to display all the records.
- On the ribbon, on the Map tab, in the Selection group, click Attributes .
The Attributes pane appears. In the Attributes pane, you can view and edit attribute values for selected features. The currently selected features are listed at the top of the pane.
- One-by-one, click the regions listed at the top of the Attributes pane.
The region you click flashes on the map, and its attributes are shown at the bottom of the pane.
- Press the Ctrl key and click a second region at the top of the Attributes pane.
The Attributes pane compares the values of the two selected regions. In this case, the two regions have different values for all of their attributes. If they shared an attribute value—for example, the same number of sheep in 2014—that value would be displayed instead of the (Different Values) text.
- Close the Attributes pane.
- On the ribbon, on the Map tab, in the Selection group, click Clear to deselect the map features and table records.
The attribute table has shown you the types of information you have for the Regions layer. Now you can begin to ask specific questions. For example, you can ask which region in New Zealand has the most sheep.
- In the attribute table, locate the SHEEP_2014 field. Right-click its field heading and click Sort Descending .
The region with the most sheep is Manawatu-Wanganui with 5,328,843. Otago is close behind with 5,257,716 sheep.
Design fields
You'll turn off visibility for some fields that you're not going to look at. You'll also change field aliases, which are more natural, descriptive substitutes for field names. Aliases can include spaces and other special characters that are not allowed in field names. Finally, you'll apply formatting to numeric fields to make the numbers easier to read.
- If necessary, in the Contents pane, click the Regions layer to select it.
- On the ribbon, on the Feature Layer tab set, click the Data tab. In the Data Design group, click Fields .
The Fields: Regions view opens, allowing you to work with field properties of the Regions table. In the fields view of a table, each field is a row and each field property is a column.
- In the Visible column, uncheck the box in the column heading to turn off visibility for all fields in the table.
- Scroll down through the fields view. In the Visible column, check the boxes for the following fields to make them visible:
- REGION_NAME
- AREA_SQ_KM
- SHEEP_2014
- BEEF_CATTLE_2014
- DAIRY_CATTLE_2014
The fields that are not visible will not display in the attribute table and will not be available for table operations. However, you can make these fields visible at any time.
- In the Alias column, double-click the REGION_NAME alias to make it editable. Replace it with Name and press the Enter key.
Caution:
Be sure to change the alias—which is the display name for the field—and not the field name itself. Both are editable.
- Double-click the AREA_SQ_KM alias to make it editable. Replace it with Area in Square Km and press the Enter key.
- Change the following aliases as shown:
- SHEEP_2014 to Sheep 2014
- BEEF_CATTLE_2014 to Beef Cattle 2014
- DAIRY_CATTLE_2014 to Dairy Cattle 2014
- In the Number Format column, double-click in the cell for the AREA_SQ_KM field. In the cell, click the Determine display formatting for numeric and date field types button.
- On the Number Format dialog box, change Decimal places to 0 and check the Show thousands separators check box. Click OK.
This formatting will make the numbers easier to read.
- In the Number Format column, double-click in the cell for the SHEEP_2014 field. In the cell, click the Determine display formatting for numeric and date field types button.
- On the Number Format dialog box, check the Show thousands separators box. Click OK.
- Change the number format for the following fields to show thousands separators:
- BEEF_CATTLE_2014
- DAIRY_CATTLE_2014
- On the ribbon, click the Fields tab if necessary. In the Changes group, click Save .
- Close the Fields: Regions view.
- If you don't see your changes in the table, click Refresh table in the lower right corner of the table view.
In the Regions table, only five fields are visible. The field headings show your aliases, and the numeric fields have thousands separators.
- In the Regions table, right-click any row header and click Pop-up .
Your field design changes are reflected in the pop-up. However, the changes have been saved only to the current ArcGIS Pro session. To make them permanent, you must save the project.
- Close the Pop-up pane.
- On the Quick Access Toolbar, click Save to save the project.
Query the table
Suppose you want to know which regions are major producers of both sheep and beef cattle. You can find out with an attribute query. An attribute query finds records in the table that meet a condition or set of conditions.
- On the ribbon, click the Map tab. In the Selection group, click Select By Attributes .
The Select By Attributes window appears. The Input Rows parameter is correctly set to Regions. The Selection type parameter is correctly set to New selection.
Note:
For convenience, some geoprocessing tools open in a floating window. These tools can also be opened in the Geoprocessing pane.
- In the clause builder, click the drop-down arrow next to Select a field and click Sheep 2014. Click the drop-down arrow next to is equal to and click is greater than or equal to. Click the blank text box and type 1000000 (1 million).
This clause will select regions that have 1 million or more sheep.
- Click Add Clause to build a second clause.
- In the clause builder, click the drop-down arrow next to Select a field and click Beef Cattle 2014. Click the drop-down arrow next to is equal to and click is greater than or equal to. Click the blank box and type 500000 (five hundred thousand).
A logical operator has been added automatically to connect the two clauses. It defaults to And, which is what you want in this case. Both clauses must be true for a region to be selected.
- Click OK.
The operation runs and the Manawatu-Wanganui region is selected in the table and on the map. It's the only region that satisfies your query.
- On the ribbon, on the Map tab, in the Selection group, click Clear .
Summarize table values
The Regions table contains attribute values for each region but no totals or statistics. Suppose you want to know whether the North Island or the South Island has more sheep. To find out, you need to total the values in the Sheep 2014 field for the regions on both islands.
Totals and other statistics can be created by summarizing a table or by creating a chart of field statistics. In this case, you'll summarize a table. When you summarize a table, a stand-alone output table is created with the statistics you request. In this project, a table with totals for the North Island has already been created. You'll make a similar table for the South Island.
- In the Contents pane, under Standalone Tables, right-click North_Island_Statistics and click Open .
The table contains one record. Totals for the nine regions on the North Island have been calculated for beef cattle, dairy cattle, and sheep. There were 14,362,494 sheep on the North Island in 2014. You'll find the comparable livestock totals for the South Island.
- On the ribbon, on the Map tab, in the Selection group, click the Select drop-down menu and click Polygon .
- On the map, draw a polygon that encloses or intersects all the regions on the South Island and no regions on the North Island. Click to begin drawing the polygon, click to change direction, and double-click to finish.
Seven features should be selected on the map. The message Selected Features: 7 appears in the lower right corner of the map view.
If you have a different number of selected records, clear the selection and try again. Alternatively, press and hold the Shift key and draw a polygon to add features to the selection, or hold the Ctrl key and draw a polygon to remove features from the selection. A small region that's easy to miss is Nelson, which lies between Tasman and Marlborough.
- Make the Regions table active. Confirm that the seven selected records are Otago, Canterbury, Southland, Marlborough, Tasman, West Coast, and Nelson.
- On the ribbon, click the Analysis tab. In the Tools group, expand the Analysis gallery.
- In the Analysis gallery, under Summarize Data, click Summary Statistics .
The Summary Statistics tool opens in the Geoprocessing pane.
Note:
You can get statistics for a single field in a table by right-clicking the field heading and clicking Statistics . In this case, a chart is created (instead of the table created by the geoprocessing tool) and statistics appear in the Chart Properties pane. See Histogram for more information.
- Click the Input Table drop-down arrow and click Regions.
- Change the Output Table name to South_Island_Statistics.
Tip:
When you begin typing in the Output Table box, you'll see the path to your project geodatabase. You can either replace the default table name at the end of the path or delete the entire path and type the new output table name: the full path will be restored automatically.
- Under Statistics Field(s), next to Field, click Add Many .
- Check the check boxes next to Area in Square Km, Beef Cattle 2014, Dairy Cattle 2014, and Sheep 2014.
These are the fields that are summarized in the North_Island_Statistics table.
- Click Add to add the checked items.
Under Statistic Type, the Sum statistic is applied by default to numeric fields.
- Click Run .
When the tool completes, the output table is added to the Contents pane. You can ignore the warning message that appears at the bottom of the Geoprocessing pane.
Note:
When a geoprocessing tool gives a warning or error message, you can click (or hover over) View details to get more information. In this case, one of the fields in the input table contains a <null> value and was therefore skipped during processing. If you check the Regions attribute table, you will see that the Nelson region has a <null> value in the Dairy Cattle 2014 field, indicating that there was no information for this attribute.
- In the Contents pane, under Standalone Tables, right-click South_Island_Statistics and click Open .
In the SUM_SHEEP_2014 field, you see that there are 15,378,674 sheep on the South Island—about a million more than on the North Island. Sheep are important livestock on both islands.
Note:
Aliases and numeric formatting in a layer attribute table are not maintained when the table is summarized.
- Close the South_Island_Statistics table and the North_Island_Statistics table.
- With the Regions table active, in the row of tools at the top of the table, click Clear . Leave the Regions table open.
- On the Quick Access Toolbar, click Save .
Chart sheep distribution by region
You've sorted, queried, and summarized the Regions attribute table. Now you'll visualize the distribution of sheep with a chart.
- In the Contents pane, click the Regions layer to select it.
- On the ribbon, on the Feature Layer tab set, click the Data tab. In the Visualize group, click Create Chart and click Bar Chart .
The Chart Properties pane appears. An empty chart view named Chart of Regions also appears. On the ribbon, a contextual Chart tab appears.
- At the top of the Chart Properties pane, confirm that the Data tab is selected. Click the Category or Date drop-down arrow and click Name.
In the chart view, the region names appear on the chart's x-axis. At the moment, the chart displays the number of region names per region (which is 1). You need to choose the field values that you want to chart.
- In the Chart Properties pane, click the Aggregation drop-down arrow and click <none>.
- Under the Numeric field(s) heading, click Select and check the box next to Sheep 2014.
- Click Apply.
The chart's y-axis and data bars update to show the number of sheep in each region. You may not see values on the y-axis if your chart view is too small. You'll resize the chart in the following steps.
- At the bottom of the Chart Properties pane, under Sort, click the drop-down arrow and click Y-axis Descending.
- At the top of the pane, click the General tab.
Tip:
If the pane isn't wide enough to show this tab, click Options and click the tab name in the drop-down list.
- In the Chart title box, change the title to New Zealand Sheep by Region in 2014 and press the Enter key.
The title is updated on the chart.
- In the X axis title box, change the title to Region Name and press the Enter key.
- In the Y axis title box, change the title to Number of Sheep and press the Enter key.
The axis names are updated, but some of the region name labels are cut off. This is because x-axis labels are limited to 11 characters by default.
- At the top of the Chart Properties pane, click the Axes tab. Under X-axis, change the Label character limit setting to 20 and press the Enter key.
- Undock the chart view and move it away from the application window. Resize the chart by dragging its corners or edges.
You see all 16 regions labeled on the x-axis and data values labeled on the y-axis. The number of data values you see depends on the size of the chart.
Tip:
You can filter the chart to see fewer regions. To filter by selection, select features on the map or records in the table. In the chart view, click Filter: Selection . To filter by extent, zoom the map to your area of interest. In the chart view, click Filter: Extent . You can also use selection and extent filters together. To remove a filter, click the selected filter button in the chart view.
- Hover over a bar on the chart.
A ScreenTip on the chart reports the exact number of sheep in the region.
Tip:
To label the bars with their values, click the Data tab in the Chart Properties pane. Under Data Labels, check the Label bars check box.
- Drag a box on the chart that intersects the four tallest bars.
The bars are selected on the chart. The corresponding table records and map features are also selected. On the map, you can see that three of the four regions with the most sheep are on the South Island.
- Click the white space on the chart to deselect the bars.
- In the Chart Properties pane, click the Format tab. Click the Text elements tab under it. In the list of text elements, click X-Axis Labels.
- At the bottom of the pane, click the Color drop-down arrow and click Fir Green.
On the chart, the x-axis labels update with the new color.
- Click Y-Axis Labels and make them Fir Green also.
- Close the chart and close the Chart Properties pane.
Note:
To reopen the chart, expand the Regions layer in the Contents pane. Under Charts, right-click the chart name and click Open . Learn more about working with bar charts.
- Close the Regions table.
- On the Quick Access Toolbar, click Save .
Configure pop-ups
You can configure pop-ups with text, charts, and images. Recall that the Regions table has an IMAGE_URL attribute with links to images. You'll configure pop-ups so that when you click a region on the map, you'll see an image of that region in the pop-up window.
- In the Contents pane, right-click the Regions layer and click Configure Pop-ups .
The Configure Pop-ups pane appears. It has buttons along the top for working with text, fields, charts, images, and carousel items. Under the row of buttons, the title is set to display the {REGION_NAME} value in the pop-up window title bar.
Under the pop-up title is a Fields element for configuring fields. It says Fields(5) because there are currently five fields displayed in the pop-up.
- In the Configure Pop-ups pane, click Image .
- On the Image element, click Edit pop-up element .
The pane shows options for working with images.
- In the Title box, delete the default title.
- In the Caption box, delete the default caption.
- Click in the Source URL box. At the top of the pane, under Image Options, click the Field drop-down arrow and click IMAGE URL {IMAGE_URL}.
Note:
The Field drop-down list shows both the alias, IMAGE_URL, and the name {IMAGE_URL} in curly brackets. In this case, the alias and the name are the same.
When you click a region on the map, the linked image in the corresponding table record is displayed in the pop-up. Since a different link is stored in each record, you'll see a different image for each region.
- In the Configure Pop-ups pane, click Back .
- On the ribbon, click the Map tab. In the Navigate group, click Explore .
- Click a region on the map to see its pop-up.
- Click some other regions to see their pop-ups.
On your own, you may want to configure the pop-ups further. Images can have titles and captions as well as hyperlinks. You can add a chart element to display different chart types for selected attributes. By adding a carousel, you can include multiple photos and charts in the same container. You can also add a text element to include custom text on the pop-up. For more information, see Configure pop-ups.
Tip:
At the bottom of the Configure Pop-ups pane, you can disable pop-ups, customize them with ArcGIS Arcade expressions, and reset them to their previous state.
- Close the Pop-up pane and close the Configure Pop-ups pane.
- On the Quick Access Toolbar, click Save .
Now that you have experience with attributes, try the Author a map and Symbolize map layers tutorials to see how attributes are used in map authoring.