{
  "schemaVersion": 1,
  "slug": "gardening-zone-finder",
  "category": "gardening",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "9a0800f98905afa093ba957db9cca43122de610100568231f0b8ee7af12c3777",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/gardening-zone-finder.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "t_F=t_C×9/5+32; z=clamp((t_F+60)/10+1,1,13.5); zone=floor(z)+half",
    "vars": [
      [
        "t_F",
        "average annual extreme minimum (°F)"
      ],
      [
        "z",
        "mapped zone coordinate"
      ],
      [
        "half",
        "a below midpoint, b at/above midpoint"
      ]
    ],
    "note": "Valid input range is −60°F to 70°F (−51.1°C to 21.1°C), matching USDA half-zone ranges 1a–13b. This single-input estimate is not the official 30-year location map."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const t=unit===\"C\"?temperature*9/5+32:temperature; const invalid={hardinessZone:null,zoneNumber:null,averageLowF:null,averageLowC:null,winterDescription:null,suggestedPlants:null,springStart:null,fallFrost:null,snowNote:null,__error:\"inputError\"}; if(t < -60 || t > 70)return invalid; const raw=(t+60)/10+1; const z=Math.max(1,Math.min(13.5,raw)); const zi=Math.floor(z); const half=(z-zi)>=0.5?\"b\":\"a\"; const lowC=(t-32)*5/9; const desc=zi<=2?\"Extreme cold — permafrost and native conifers only\":zi<=4?\"Very cold — hardy trees, most winters well below freezing\":zi<=6?\"Cold to moderate — a classic four-season garden\":zi<=8?\"Moderate — mild winters with light, short frosts\":zi<=10?\"Warm — frost is rare and brief\":\"Hot — essentially frost free all year\"; const plants=zi<=4?\"Lilac, spruce, hosta, peony\":zi<=6?\"Apple, rose, lavender, tomato\":zi<=8?\"Camellia, olive, rosemary, citrus\":zi<=10?\"Bougainvillea, hibiscus, palms\":\"Tropical species such as coconut and mango\"; const snowNote=snowCover===\"heavy\"?\"Persistent snow insulates the soil, so roots survive colder air than the zone suggests.\":snowCover===\"light\"?\"Patchy snow offers limited insulation — mulch after the ground freezes to protect roots.\":\"Bare ground freezes deeper, so plants rated exactly for this zone can still suffer root damage.\"; return {hardinessZone:zi+half,zoneNumber:zi+(half===\"b\"?0.5:0),averageLowF:t,averageLowC:lowC,winterDescription:desc,suggestedPlants:plants,springStart:zi<=4?\"Late May\":zi<=6?\"Mid April\":zi<=8?\"Late March\":zi<=10?\"Early March\":\"Year round\",fallFrost:zi<=4?\"Early September\":zi<=6?\"Early October\":zi<=8?\"Early November\":zi<=10?\"Late November\":\"Rare\",snowNote};",
    "inputs": [
      {
        "name": "temperature",
        "type": "number",
        "default": -15,
        "min": -80,
        "max": 70,
        "step": 1,
        "slider": true
      },
      {
        "name": "unit",
        "type": "select",
        "default": "F",
        "options": [
          {
            "value": "F"
          },
          {
            "value": "C"
          }
        ]
      },
      {
        "name": "snowCover",
        "type": "select",
        "default": "light",
        "options": [
          {
            "value": "none"
          },
          {
            "value": "light"
          },
          {
            "value": "heavy"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "hardinessZone",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "zoneNumber",
        "precision": 1,
        "unit": ""
      },
      {
        "name": "averageLowF",
        "precision": 1,
        "unit": "°F"
      },
      {
        "name": "averageLowC",
        "precision": 1,
        "unit": "°C"
      },
      {
        "name": "winterDescription",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "suggestedPlants",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "springStart",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "fallFrost",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "snowNote",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
