Introduction to ArcGIS Pro (Part 2): Symbology and Labeling
In part two of these tutorial series, we will style more of our layers. While doing this we will start using more advanced symbology. In addition, we will look at filtering our data so as only to show the specific data we are interested in.
Types of railroads
- Let’s change the symbology of the TRAMMETRO_LINES layer again. Make sure the layer is selected in the contents pane. Select the Appearance tab, find the Drawing group, and click Symbology to open the symbology pane on the right side of your screen.You could also open the symbology pane by clicking the line symbol underneath the layer name in the contents pane, but you will end up seeing the Format line symbol menu. If so, click the back arrow to get main symbology menu (as seen in the image to the left ).
Now, instead of selecting a style for all features in the layer, we want different colours for the different unique values in the layer. Find the drop-down under Symbology, and select Unique Values.
- Now we need to select which field (column) get used to symbolize on. Click the drop-down menu next to Field 1 and select Modaliteit. As you might remember from before, this field relates to if the feature belongs to the tram or metro rail network.
- You will see that the information gets updated and ArcGIS Pro assigns a different colour to all unique values in the selected field. While you could assign a colour scheme to decide which colours the unique values get, I recommend to just simply manually pick colours since there are only two unique values. Similar as before, select each line, and change the appearance color to something you like (in my case: blue for metro, red for tram). Finally, change the line width to 2 pt. to make the lines more clear on the map.
- Your map should look similar to this:
We have 4 other layers looking forward to being symbolized, so let’s get moving. This time I will not go into as many details, as the workflow will be very similar as before.
- Toggle the visibility of the TRAMMETRO_STATIONS layer. Make sure it is listed above the layer we worked on before. If it is not, the station layer will be rendered underneath the railroads and you won’t be able to see the points representing stations. To change the order click, hold and drag the station layer name in the contents pane above the TRAMMETRO_LINES layer.
- Check the attribute table of the stations layer. Right-click the layer in the contents pane and select Attributes Table. You will find that the field we are interested in is again called Modaliteit.
- Now, open the Symbology pane, by either a) finding the button in the Appearance tab on the ribbon, b) clicking the small symbol below the layer name in the contents pane, or c) right-clicking the layer name in the contents pane and selecting Symbology.
- As before, select Unique values under symbology on the symbology pane. Select Modaliteit in the field 1 dropdown, and assign colors and sizes to the two different values. I would recommend using the same colors as the respective railroad colors and upping the size slightly (I chose 8 pt) to make the stations more clear on the map. Your map should now look like this:
- Now let’s look at the PARKS layer. Go ahead and activate it by clicking the checkbox to the left of its name in the contents pane. You will see polygons pop up all over the map, representing parks. If you want the map to cover all the features in a layer, you can always right-click the layer in the contents pane and select Zoom to layer.
- While you might be tempted to style the parks with a green single symbol symbology and be done with it, let’s try something more fun. If we take a look at the attribute table we can see that there are a certain number of fields that we might be able to use for our symbology.
Similar to stations, we could use the unique values symbology, to create a more meaningful visualization. There are different options here. These include a field (BBQ) that indicates whether barbecuing is allowed, and Stadsdeel, which indicates in which district of the city the park lies. But both of these are not very meaningful in our analysis. But there is another field (Oppervlakt), which indicates the size of the park. This could be used and is actually relevant to our analysis to find an office located close to a park.
- Go ahead and select the Parks layer and press the Symbology button on the Appearance tab. Now there are different options, such as graduated colors (with differences in size of parks shown by a differing range of colors), graduated symbols (with differences in size of parks shown by a differing size of symbols) and proportional symbols (very familiar to the previous, but symbol sizes are not divided in classes, e.g. they are continuous).
If you are quick you might have tried to select one of these 3 symbology types and tried to apply them to Oppervlakt. When selecing a field, however, this field does not show up in the list (only FID_1). Why is this? When we inspected the attribute table the field certainly looked like it contained numbers. The problem is actually that the field type is Text. This needs to be a numeric type for the symbologies we are thinking about using.
There is more than one way of doing this, but a common method is to create a new field (ESRIs way of saying column) with a numeric type, and copying the data from the Oppervlakt column. This is not as complicated as it sounds but requires a few steps.
- First, we need to create a new field of type long, which can hold numeric values without fractional values within a specific range. This field will include the same values as Oppervlakt does now, but just in a numeric format instead of text. This will allow us to use the field in calculations and more types of symbology. Open the attribute table of Parks. Above the attribute table, you will find the Add Field button.
- Press this button to create a new field. You will end up on a field list. Here you can choose a Field Name and Data Type. For field, name pick something you like. I picked Area, although it should probably be something Dutch to stay consistent. For Data Type pick Long. You field list should now look like this:
- After making these changes, find the Save button on the Ribbon, found on the Fields tab. It should already be open.
- Now that we have our new field we have to copy the values from Oppervlak field into it. Close the Fields: PARKS tab in your attribute table window. You should now see the attribute table again. If not, reopen it. Notice the new field you just created.
- To fill in the Area field we just need to set it equal to the Oppervlak field. We can do this by use of the Calculate Field geoprocessing tool. Open it by right-clicking on the name of your new field, and select Calculate Field. The geoprocessing pane will show up to the right, the same location as the symbology pane. Make sure that the input table and field name are set to PARKS and Area respectively.
- The only change you have to make is double clicking Oppervlakt in the list underneath Fields. This will add !Oppervlakt! in the text field underneath Area =. If in a doubt, make sure that everything looks similar to the screenshot. Finally, press the Run button in the bottom right of the pane. This will run the calculations and field your new field with the same values as the Oppervlak field, but now saved as numbers instead of text. This means we can now use the field in our symbologies.
- Go ahead and open the symbology pane again. Select Graduated Colors underneath Symbology, and pick Area as the Field. Leave the Normalization, Method and Classes options are default, but change the color scheme to Greens (5 classes). Your map should now look like this:
- Finally, the sharp reader has probably noticed we also have data on the park names in its attribute table. We can use this to add labels to the map. Make sure the Parks layer is selected. Find and open the Labeling tab on the ribbon. There are only 3 changes we need to make. First, select the Label button in the Layer group. This simply activates the labels, although it will use the wrong field by default. In the Label Class group, change the Field to Naam. Finally, in the Text Symbol group, select the Park style. Your labeling tab should now look like this:
The end result should look similar to this:
The original idea was to be done with all label symbology in part 2 of this series, but this part grew out of proportions, so we will cover the final two layers in the next article, along with some other new stuff.