Have you ever procrastinated configuring a map because it would take ages to unify the format of your attributes? Do you dream of a day where you can batch format your attributes? Well, do I have good news for you. Batch formatting attributes is one of many exciting new features available in the July 2020 update of Map Viewer (Beta version). This feature does exactly what its name implies, it allows you to select multiple attributes of the same data type and unify their format.
While batch formatting might feel like a small feature, small features can still be incredibly useful and, in this case, give you a quick way to ensure that your data is both readable and meaningful. This capability is particularly valuable when you’re highlighting a layer with many numeric and date attributes. To show how it’s done, let’s go over how to batch format attributes and then walk through an example of batch formatting using the Current Weather and Wind Buoy dataset from the Living Atlas.
How it’s done
Open Map Viewer and add the layer above or choose your own layer to follow along. Click the layer from the layer list to activate the tool bar, and complete the following steps:
- Click on the Fields button (right toolbar)
- Select the attributes to be batch formatted (must be the same data type)
- Select the preferred format in the formatting window
- Click Done
The batch formatting feature is useful for layers with multiple numeric or date fields that aren’t in the same format or aren’t meaningful in their current format. In this example, I want to display the air, water, and dew point temperatures for buoy weather stations in a way that is easily understood. The attributes are shown with two decimal places by default, but the second decimal place is unnecessary. In just a few clicks, I can format all three temperature fields so that only one decimal place is shown.
Notice how making these changes with a pop-up open allows me to see the format change in real-time. Although it is a minor change, my pop-up looks cleaner and more readable.
Tips and tricks
- An icon to the right of each field in the Fields panel denotes its data type. For example, “int” denotes an integer and “123” denotes a double
- A pop-up opens when the Fields panel opens, this can give you real-time feedback on the formatting changes you make
- Use the Search fields filter to find fields faster. For example, searching “temperature” will display all fields with temperature in their name
Additional capabilities for the Fields panel are planned for upcoming releases, such as:
- Add field
- Filter fields by data type