Skip to main content
Loading navigation
Back to prompt library

Build a STAC Wildfire Smoke Exposure Agricultural Auditor — implementation

Linked challenge: Build a STAC Wildfire Smoke Exposure Agricultural Auditor

Prompt source

implementation61 lines11 sectionsNo variables1 code block
## Build
Discover atmospheric optical depth assets from STAC catalogs to evaluate crop smoke taint. Download data to quantify seasonal viticulture exposure and assemble structured crop loss evidence dossiers for adjusters.

## User
Viticulture Hazard Analyst

## Workflow
1. Retrieve STAC Items for aerosol optical depth over vineyard perimeter coordinates and fetch assets.
2. Filter cloud interference in the imagery and calculate cumulative smoke plume duration days.
3. Overlay smoke intensity against grape ripening phenology schedules.
4. Assemble structured crop loss evidence dossiers for forensic agricultural adjusters.

## Interface
Vineyard map portal displaying plume density overlays, cumulative smoke days, and adjuster evidence dossiers.

## Data
Query public atmospheric aerosol STAC collections. Store mock vineyard parcel boundaries in GeoJSON format.
Starter examples below are synthetic. They are not downloaded records.

## Source
[STAC specification](https://raw.githubusercontent.com/radiantearth/stac-spec/master/README.md)
Adheres to STAC Collection and Item specifications to search temporal atmospheric imagery and evaluate asset links.

## Tools
vercel-ai-sdk, pystac, TypeScript.
Powers a responsive Next.js frontend and streaming agent interface for exploring spatial aerosol exposure data.
Requires modern TypeScript runtime running Vercel AI SDK connected to an instruction-tuned LLM provider.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Parses STAC Item temporal properties and fetches asset links across designated vineyard coordinates.
- Calculates cumulative aerosol optical depth exposure across ripening windows.
- Streams structured claim preparation summaries conforming to Pydantic/Zod schemas.

## Starter Examples
```json
[
  {
    "input": {
      "vineyard_id": "VNYD-NAPA-22",
      "cumulative_smoke_days": 14,
      "mean_aerosol_optical_depth": 1.5
    },
    "expected_output": {
      "vineyard_id": "VNYD-NAPA-22",
      "exposure_score": 21,
      "claim_investigation_required": true,
      "record_type": "simplified synthetic app record, not complete official schema file"
    }
  },
  {
    "input": {
      "vineyard_id": "VNYD-NAPA-23",
      "cumulative_smoke_days": 4,
      "mean_aerosol_optical_depth": 0.5
    },
    "expected_output": {
      "vineyard_id": "VNYD-NAPA-23",
      "exposure_score": 2,
      "claim_investigation_required": false,
      "record_type": "simplified synthetic app record, not complete official schema file"
    }
  }
]
```

## Safety
Assembles simulated risk assessment documentation; does not render chemical laboratory verdicts or binding insurance claims.
Use mock external writes. Require human review before any real deployment.