الدرس 4 · الوحدة 3: Charts, Gauges, Lists and Tables
Gauges: progress toward targets with ranges and colors
الفيديو قريبًا
Learn it with your tutor on the live board
أهم نقاط الفيديو
The number everyone asks for
- A storm knocks out power to 12,400 customers
- The operations manager asks: "How close are we?"
- One number, one target, one glance
- That is exactly what a gauge is for
What you will learn
- Configure a gauge from a layer statistic or a single feature
- Set minimum and maximum values that mean something
- Add colored ranges that match your team's targets
What a gauge answers
- One value compared with a known scale
- Progress style fills up; meter style points a needle
- Good fits: percent restored, breaks repaired, requests closed
- Poor fits: comparing many categories
Where the value comes from
- Statistic: count, sum, average, min or max over a layer
- Feature: one field from one feature
- Filters on the layer narrow what is counted
Minimum and maximum give it meaning
- Fixed max: a known target, like 250 repairs per month
- Max from data: another statistic, like total customers out
- The scale is the promise the gauge makes
Worked example: percent restored
- Three regions, one storm
- Percent restored equals restored divided by out
- The gauge shows the total, not the average of regions
layout: side
cells:
A1: Region
B1: Out
C1: Restored
D1: Percent
A2: North
B2: 5000
C2: 4100
A3: Central
B3: 4400
C3: 3500
A4: South
B4: 3000
C4: 1700
A5: Total
format: {D: percent:1}
steps:
- at: "divide restored by customers out"
type: {D2: "=C2/B2"}
- at: "copy that down"
fill: D2:D4
- at: "add up both columns"
type: {B5: "=SUM(B2:B4)", C5: "=SUM(C2:C4)"}
- at: "the overall share"
type: {D5: "=C5/B5"}
highlight: D5 Ranges and colors with guides
- Guides tab: one range per color
- Each range has a start, an end and a fill color
- The logic, in percent:
customers_out = 12400
restored = 9300
pct = restored / customers_out * 100
bands = [(0, 50, "red"), (50, 80, "amber"),
(80, 101, "green")]
for low, high, color in bands:
if low <= pct < high:
print(f"Restored: {pct:.1f}%")
print(f"Band: {color}") Guides use the gauge's own scale
- Guide values are in the gauge's units, not percent
- Scale 0 to 12,400: 50% = 6,200, 80% = 9,920
- Value 9,300 sits between them: amber
- Percent guides that always hold: value in percent, max 100
Match the colors to the meaning
- Higher is better: percent restored, repairs done
- Lower is better: average response minutes, open requests
- Flip the bands, keep red for trouble
- Use the same thresholds your team already reports
Labels, units and interaction
- Add a clear title and a unit, such as percent or minutes
- Round the value: 75 percent, not 75.004
- Let map and list actions filter the gauge
Common mistake: a max that always wins
- Max set to the same statistic as the value
- Result: the gauge always reads 100 percent
- Also watch: a stale fixed target from last year
Exercise
- Pick a layer with a status field, such as service requests
- Build a gauge: value closed, max all requests
- Add three guides: red, amber, green, in the gauge's units
- Change a filter and confirm the gauge moves
Recap
- A gauge shows one value against a meaningful scale
- Min and max come from a fixed target or from data
- Guides color the ranges to match your team's thresholds
النص المكتوب
The number everyone asks for. Picture the morning after a winter storm. Your utility has 12,400 customers without power, crews are out across three regions, and every fifteen minutes someone from the executive office asks the same question: how close are we? They don't want a table of outages or a map full of dots. They want one number measured against one target, readable from across the room. So how do you give them that on an ArcGIS Online dashboard? You use a gauge. In this lesson you'll build gauges that show progress toward a target, and you'll color them so a red, amber or green reading tells the story before anyone reads a single digit.
What you will learn. Here's the plan for this lesson. First, you'll learn how a gauge gets its value, either by calculating a statistic across many features in a layer or by reading one field from a single feature. Second, you'll set the minimum and maximum of the gauge so the needle or the fill actually means progress toward a real target. Third, you'll add colored ranges, which Dashboards calls guides, so the gauge changes color at the thresholds your team cares about. We'll work through a storm restoration example with real numbers, and we'll finish with the mistake that makes gauges quietly lie.
What a gauge answers. A gauge in ArcGIS Dashboards answers one question: where does a single value sit on a known scale? It comes in two styles. The progress style fills up like a battery indicator, and the meter style points a needle along an arc, like a speedometer. Both work well for things like the percent of customers restored, water main breaks repaired this month against a monthly target, or service requests closed within their deadline. Where gauges fail is comparison. If you want to compare outages across ten districts, reach for a serial chart instead. A gauge is a single-number element, and that focus is its strength.
Where the value comes from. Every gauge starts with a data source, usually a hosted feature layer. You then choose between two value types. With a statistic, the gauge calculates one number across many features, such as the sum of customers restored or the count of closed service requests. Statistic here just means a summary number, the way a monthly bill summarizes many individual phone calls. With a feature, the gauge reads a field from a single record, which suits a summary table that already holds the total. Add a filter on the layer, such as the current storm event only, so old incidents don't sneak into your number.
Minimum and maximum give it meaning. A value alone isn't progress. Progress needs a scale, and the scale comes from the minimum and maximum. You can type a fixed maximum when the target is known in advance, for example a water utility that aims to repair 250 main breaks per month. Or you can let the maximum come from the data, as another statistic, such as the total number of customers who lost power in this storm. That second option is powerful during events, because the target grows as the outage grows. Take a moment with this idea, because the minimum and maximum are the promise the gauge makes to whoever reads it.
Worked example: percent restored. Let's work it through. Three regions lost power. For each one, divide restored by customers out. North is at eighty-two percent. Now copy that down, and you see Central at about seventy-nine and a half and South at about fifty-seven. Next, add up both columns: 12,400 customers out and 9,300 restored. Finally, compute the overall share, 9,300 divided by 12,400, which is seventy-five percent. Notice that this is not the average of the three regional percentages, because regions of different sizes would be weighted equally. In the gauge, the value is the sum of restored, and the maximum is the sum of customers out, so the gauge's scale runs from zero to 12,400 customers.
Ranges and colors with guides. Now the colors. In the gauge settings, the guides tab lets you add ranges, each with a start value, an end value and a fill color. Dashboards then paints the scale, and a reader sees at a glance which zone the value sits in. This little Python snippet does the same logic by hand, in percent. It computes the percent restored, then walks through three bands: red below fifty, amber from fifty to eighty, and green from eighty upward. With 9,300 of 12,400 restored, it lands at seventy-five percent, which is amber: good progress, not done yet. Next, let's see which numbers you actually type into the guides.
Guides use the gauge's own scale. One detail trips people up. Guide values live on the gauge's own scale. Our gauge counts customers, from zero to 12,400, so its label shows 9,300, not seventy-five percent. Fifty percent of that scale is 6,200, and eighty percent is 9,920. Those are the numbers you type as the guide starts and ends. 9,300 sits between them, so the gauge shows amber. The catch is that the maximum comes from data. If more customers lose power, the maximum grows, and fixed guides at 6,200 and 9,920 no longer mean fifty and eighty percent. When you want percent guides that always hold, give the gauge the percent itself. For example, use a data expression that divides restored by customers out, and set a fixed maximum of 100. Then the guides are simply fifty and eighty, and the label reads seventy-five percent.
Match the colors to the meaning. Colors only help if they mean the same thing everywhere. For percent restored, higher is better, so green sits at the top. But for average response time to traffic incidents, or the number of overdue service requests, lower is better. There you flip the bands, so green covers the low end and red covers the high end. Red should always mean trouble. And don't invent new thresholds for the dashboard. Ask the team what targets they already report, such as responding to priority incidents within twenty minutes, and use exactly those numbers. People trust a gauge that agrees with the report they already know.
Labels, units and interaction. A few finishing touches make a gauge readable. Give it a short title that says what is measured and for which event, like Customers Restored, Storm Event. Set the value format so it rounds sensibly and shows a unit, since seventy-five percent reads faster than seventy-five point zero zero four. Then connect it to the rest of the dashboard. If a region selector or map extent filters the gauge through actions, a manager can click South and immediately see its fifty-seven percent sitting in the amber zone, well short of green. That one connection turns a static number into a tool people actually use during an event.
Common mistake: a max that always wins. Here's the trap. Someone builds a gauge where the value is the count of closed service requests, then sets the maximum from data using the same layer and the same filter, closed requests. The gauge proudly shows one hundred percent, every single day, no matter how the team performs. The maximum must count something different, such as all requests received, open and closed. The mirror image of this mistake is a fixed target nobody updates, like last year's repair goal still sitting in the settings. Before sharing any gauge, test it: change the filter and confirm the reading actually moves.
Exercise. Before the next lesson, build one gauge yourself. Choose a layer that has a status field, such as service requests or water main breaks, either from your own organization or a sample layer in Living Atlas. Set the value to the count of closed or repaired features, and set the maximum from data to the count of all features. Add three guides in red, amber and green at thresholds you can defend, typed in the gauge's own units. Then change a filter, for example to a single district, and check that the reading moves. If it does, you've built a gauge that tells the truth.
Recap. Let's recap. A gauge shows one value on a scale, either as a filling progress bar or a needle on a meter, and it works best for progress toward a target. The meaning comes from the minimum and maximum, which can be a fixed target like 250 repairs a month or another statistic from the data, like total customers out. Finally, guides color the scale in ranges on the gauge's own scale, and those ranges should use the thresholds your team already reports, with red always meaning trouble. Get those three right and the question how close are we answers itself.
استكشف الرسم المتحرك
الرسوم المتحركة نفسها التي في الفيديو، دقيقة وتفاعلية: شغّلها أو أوقفها، أو اسحب المؤشر، أو انتقل إلى أي خطوة بالسرعة التي تناسبك.
Loading the animation...
ملخص الدرس
- مشاهدة الفيديو
- A gauge shows one value against a meaningful scale
- Min and max come from a fixed target or from data
- Guides color the ranges to match your team's thresholds