# Score, rate and cost by your own rules

Give Mapstack your rating scheme, your bands, your unit rates and your budget. It applies them to every record and tells you what your rule does.

Video: Score, rate and cost by your own rules (1 min 32 s): /images/docs/videos/your-own-rules.mp4

- **Who can use it:** Free, Creator and Creator Max
- **You provide:** Your records, and the rule in plain words
- **You get:** Every record rated, ranked or costed, as a dataset

Most work that follows an analysis runs on rules somebody in your organisation wrote. Which condition band gets which treatment. What each treatment costs a square yard. Which zone codes count as high risk. How much there is to spend.

Say the rules in plain words, the way you would brief a new colleague, and Mapstack applies them to every record, shows its working and ranks the result. Then it does the more useful thing: it tells you what your rule has produced, and offers to test another.

What you get back is a **dataset** with every record rated, ranked or costed, and a map of it if you ask.

One real file runs through this page: a county's road condition survey, turned into a repair programme. The asks in the other sections are examples of the kind of thing to say.

## Turn a survey into a funded programme

The example here: Montgomery County, Maryland's 2024 pavement condition survey, as the county publishes it. Every road segment has a condition score from 0 to 100, called its PCI, with its length, width and area. Of the 27,297 asphalt segments, 14,723 need work.

**The rules, as the engineer gave them.** A score below 40 gets full reconstruction at $90 a square yard. From 40 to 59, a new surface at $30. From 60 to 74, a slurry seal at $5. Rank the segments worst first, and fund down the list until $40 million runs out.

**What came back.** Mapstack worked out each segment's cost from its own area and those rates, converting square feet to square yards on the way. It ranked them, and funded down the list: 363 segments, 31.15 miles, $39,971,321. It stopped there because the 364th segment would have gone over, and said that $28,679 was left.

**The backlog comes with the programme.** Treating every segment that needs work would cost $492.3 million. A paper that asks for a budget can show what the budget does not reach.

**Every record keeps its place.** Each segment carries its rank, street, score, treatment and cost. The map has a search by street, and the full list is a table you can sort and download.

### Build a funded programme

Give the bands, the rates, the order and the budget in one message. Say the units your rates are in.

> PCI below 40 gets reconstruction at $90 a square yard, 40 to 59 an overlay at $30, 60 to 74 a slurry seal at $5. Rank worst first and fund down the list to $40 million

> What would it cost to treat everything that needs work?

## It tells you what your rule does

This is the part worth asking for. Mapstack does not only apply a rule. It reads the result the way an experienced colleague would, and says what the rule has done.

**In the example, worst first spent everything on the worst.** All $40 million went on reconstructing roads that scored below 27. Nothing was left for the cheaper treatments that stop a fair road becoming a bad one. Mapstack pointed this out without being asked, and offered to model a split.

**Ask for another rule, and you get the two side by side.** The engineer asked for $28 million of reconstruction, still worst first, and $12 million on the roads where the money buys the most. Mapstack put the $12 million into slurry seals, explained why, and set the two programmes against each other:

| | Segments | Miles | Cost |
|---|---|---|---|
| Worst first | 363 | 31.15 | $39,971,321 |
| Mixed | 1,813 | 163.77 | $39,899,518 |

The mixed programme treats about five times the mileage. The price is 104 badly damaged segments that wait another year, and Mapstack named that trade.

**It recommends. You decide.** Mapstack shows what each rule buys and names the trade between them. Ask which it would choose, and it tells you, with its reasons. Which one is right is a matter for you and your council.

![Example: Montgomery County's mixed programme on the map. The 259 segments in red are reconstructed, and the 1,554 in blue get a slurry seal: 163.77 miles for $39.9 million.](/images/docs/your-own-rules/montgomery-mixed-programme.jpeg)

### Test a different rule on the same data

> What does worst first buy us?

> Model a mixed programme: $28 million for reconstruction and $12 million where it buys the most life, and compare the two

> Which of the two would you recommend, and why?

## Rate every record against your own scheme

A rating scheme works the same way as the treatment bands. Say which codes count as high and which as moderate, what each class is worth, and how the classes combine. Mapstack applies it to every record and shows each rating beside the total.

**Where a record falls in two classes, say which wins.** A site that touches two flood zones usually takes the more serious one. Say so, and it does.

**You get the ranking and its shape.** Every record with its ratings and score, and a count of records at each score. "Four of our 133 sites score five" is a headline. A table of 133 rows is not.

**A tie-break is yours too.** Say what breaks a tie in a priority list, and the list holds to it.

### Apply a rating scheme to a list

Name the codes, the classes and the points.

> Rate every site against these three hazard layers: high for zones A and AE, moderate for X, worst class wins, two points for high and one for moderate

> Rank them by total score, and break ties on the number of people served

### Show which records miss a benchmark

A threshold you state becomes a filter on the map, with a chart of how the values spread.

> Make it easy to see which areas are below the national average

## Cost anything from your own rates

The road programme is one case of a general thing. Give your unit rates, and Mapstack costs each record from its own measurements: an area, a length, a count. You get a table of item, quantity, rate and cost, with the subtotal, any uplift you add and the total.

**Change the rates and the same quantities are priced again.** A low column and a high column give you a range to quote.

**Every line can be traced.** Each costed item keeps the record it came from, so a figure in a committee paper points back at a street.

### Price a list from unit rates

> Cost each crossing and junction at these unit rates and add 30%

> Now price it at the high rates too, and give me the range

## Sort records into tiers

Sometimes the rule is "put these into three groups, on everything we know". Mapstack combines the measures you name and splits the records into tiers. Then it says what sets each tier apart: the averages that make a low group different from a high one.

**Measures that are not alike are put on a common footing first.** Crop yields from different crops and years cannot be added as they stand. Mapstack compares each within its own crop and year, then combines them. Say if some measures should weigh more than others.

**Tiers can become areas.** Points sorted into tiers can be drawn as zones, with the size of each, as a dataset of their own.

### Group records into tiers

> Split these sample points into low, medium and high potential on soil carbon, sand and yield, and tell me what sets each apart

> Draw the zones in each field and give me the acres of each

## Reference

| | |
|---|---|
| What a rule can use | Any column on your records, and anything Mapstack has worked out for them |
| Rating | Classes you define and points you set. Say which class wins where a record falls in two |
| Ranking | Your order, with the tie-break you name |
| Costing | Your unit rates against each record's own measurements, with any uplift |
| Budgets | Funded down the ranking, stopping before the budget is passed, with what is left and the backlog |
| Tiers | Combined from the measures you name |
| Checking | Ask for the working: the rule as applied, the count at each level, and the records behind any figure |

## What it can't do

- Make the decision for you. It tells you what your rule produces, models any other you name, and gives a recommendation when you ask for one. The policy stays yours.

## Common questions

**Can it use our scoring scheme as it is written?**

Yes. Name the classes, the points and what happens where a record falls in two. Ask for the count at each score, so you can check it against your own.

**Our rates are per square yard and the data is in square feet.**

Say so. Mapstack converts, and tells you that it did.

**What happens when the budget runs out part way down the list?**

It stops before the record that would go over. It tells you what is left and what fell outside the programme.

**Will it tell me if my rule has a problem?**

Yes. It tells you what your rule has produced and offers another to compare. Ask which it would choose, and it gives a recommendation with its reasons. The decision stays with you.

## Related

- [Count and summarise by area](https://mapstack.io/docs/answers/count-and-summarise-by-area.md)
- [Choose where to go next](https://mapstack.io/docs/answers/where-to-go-next.md)
- [Work with lines, routes and tracks](https://mapstack.io/docs/answers/lines-and-routes.md)
- [Combine several measures into one score per area, to target a programme](https://mapstack.io/docs/guides/composite-index-by-area.md)
- [Write up a report](https://mapstack.io/docs/make/reports.md)
- [Check which of your sites sit in a flood zone](https://mapstack.io/docs/guides/sites-in-flood-zones.md)
