{
  "tool": "Compost Carbon-Nitrogen Ratio Calculator",
  "author": "Barbara Lam",
  "location": "Argonne, Wisconsin",
  "version": "1.0",
  "formula": {
    "equation": "w1/w2 = (R2 - R_target) / (R_target - R1)",
    "variables": {
      "w1": "weight of material 1 (lbs or kg)",
      "w2": "weight of material 2 (lbs or kg)",
      "R1": "C:N ratio of material 1",
      "R2": "C:N ratio of material 2",
      "R_target": "desired final C:N ratio"
    },
    "derivation": "Weighted average: R_target = (w1*R1 + w2*R2)/(w1+w2). Solve for w1/w2.",
    "constraints": [
      "R1 ≠ R_target (division by zero avoided)",
      "R1 and R2 must bracket R_target (one higher, one lower)",
      "Result w1/w2 > 0 (both weights positive)"
    ]
  },
  "material_library": {
    "dry_leaves": {"label": "Dry Leaves", "cn_ratio": 60, "category": "carbon"},
    "straw": {"label": "Straw", "cn_ratio": 75, "category": "carbon"},
    "wood_shavings": {"label": "Wood Shavings/Sawdust", "cn_ratio": 300, "category": "carbon"},
    "cardboard_shredded": {"label": "Shredded Cardboard", "cn_ratio": 350, "category": "carbon"},
    "grass_clippings": {"label": "Fresh Grass Clippings", "cn_ratio": 20, "category": "nitrogen"},
    "coffee_grounds": {"label": "Coffee Grounds", "cn_ratio": 20, "category": "nitrogen"},
    "chicken_manure": {"label": "Chicken Manure (fresh)", "cn_ratio": 10, "category": "nitrogen"},
    "horse_manure": {"label": "Horse Manure (bedded)", "cn_ratio": 25, "category": "balanced"},
    "alfalfa_meal": {"label": "Alfalfa Meal", "cn_ratio": 12, "category": "nitrogen"},
    "blood_meal": {"label": "Blood Meal", "cn_ratio": 3, "category": "nitrogen"}
  },
  "targets": {
    "optimal_compost": {"label": "Optimal Compost Activity", "ratio": 25, "note": "Peak microbial growth"},
    "stable_humus": {"label": "Stable Humus Production", "ratio": 15, "note": "Slow-release fertility"},
    "hot_pile_start": {"label": "Hot Pile Initiation", "ratio": 30, "note": "Rapid thermophilic rise"}
  },
  "sources": [
    "USDA Natural Resources Conservation Service: On-Farm Composting Handbook",
    "University of Minnesota Extension: Composting Fundamentals",
    "Barbara Lam Field Notes: Boundary Waters Hinterland Trials (2023-2026)"
  ],
  "last_updated": "2026-07-17T18:00:00Z"
}
