> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skymatch.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Scoring explained

> How SkyMatch calculates the playability score and what it means.

## The playability score

Every SkyMatch response includes a `playability_score` — an integer from 0 to 100 representing how suitable weather conditions are for the requested activity during the booking window.

| Score range | Recommendation         | What it means                                    |
| ----------- | ---------------------- | ------------------------------------------------ |
| 80–100      | `safe_to_book`         | Conditions look good. Low cancellation risk.     |
| 50–79       | `proceed_with_caution` | Marginal conditions. Worth flagging to the user. |
| 0–49        | `not_recommended`      | High chance of cancellation or poor experience.  |

## What goes into the score

The score combines four weather factors, each weighted according to the `sport` parameter:

<AccordionGroup>
  <Accordion title="Rain probability">
    The chance of rainfall above 0.5mm/hr during the booking window. This carries the highest weight for most activities.

    * **Low risk**: under 20% chance of rain
    * **Medium risk**: 20–50% chance
    * **High risk**: over 50% chance
  </Accordion>

  <Accordion title="Wind speed">
    Average wind speed during the session in km/h. Thresholds vary significantly by sport — padel is highly wind-sensitive, while hiking tolerates stronger winds.

    * **Low risk**: under 20 km/h
    * **Medium risk**: 20–40 km/h
    * **High risk**: over 40 km/h
  </Accordion>

  <Accordion title="Temperature">
    Extreme heat or cold reduces the score. Thresholds depend on activity type.

    * Outdoor fitness and padel: penalised below 6°C or above 33°C
    * Hiking: wider comfortable range (3°C–36°C)
    * Events: comfort-weighted, penalised below 10°C
  </Accordion>

  <Accordion title="Cloud cover">
    A minor factor. Heavy overcast (over 85% cloud cover) slightly reduces the score for sessions longer than 90 minutes.
  </Accordion>
</AccordionGroup>

## How the score is calculated

The formula is a weighted sum of factor sub-scores, normalised to 0–100:

```
playability_score = (
  rain_sub_score   × rain_weight   +
  wind_sub_score   × wind_weight   +
  temp_sub_score   × temp_weight   +
  cloud_sub_score  × cloud_weight
) / total_weight
```

Weights are set per activity type. For `padel` for example:

```
rain_weight  = 0.45
wind_weight  = 0.35
temp_weight  = 0.15
cloud_weight = 0.05
```

## Using the score in your UI

The score is designed to be flexible — you can use it however fits your product:

**Simple recommendation badge**

```
if score >= 80 → show "✅ Recommended"
if score >= 50 → show "⚠️ Marginal"
if score < 50  → show "❌ Not recommended"
```

**Progress bar or dial**
Map 0–100 directly to a visual indicator with green/amber/red colouring.

**Calendar heat map**
Colour-code available slots by score when a user opens the date picker — no explanation needed, users naturally pick greener slots.

<Tip>
  The `summary` field in each response is pre-written for end-user display. You can show it directly without any additional formatting.
</Tip>
