Skip to content

Pipeline: managements table → events.json with gap filling (MVP) #234

@AritraDey-Dev

Description

@AritraDey-Dev

Pipeline: managements table → events.json with gap filling (MVP)

Summary

Build an automated pipeline that reads a curated cal/val workbook (e.g. https://docs.google.com/spreadsheets/d/1pXiZUkNP50WXbmAztoEgUJ6rpQNyewmobCuaFHL8UjQ/edit?gid=1394889519#gid=1394889519) and produces one events.json per treatment, filling uncertain dates and missing management info using Akash's priors (ccmmf/scenarios#3).

MVP logic

  1. Dates — use min_date if min_date == max_date, else use the midpoint.
  2. Missing parameters — sample from management_priors.yaml (e.g. fertilization rate, irrigation volume).
  3. Missing events — if a system is irrigated but has no irrigation rows, infer them from crop + location + method, then fill from priors.

Event-type rules (per David)

  • Tillage: categorical only (did it happen). Implement/depth optional.
  • Irrigation: if irrigated, expect events with min_date/max_date = planting/harvest window + method (sprinkler/drip/furrow/flood). Pipeline fills amount, timing, and canopy-vs-soil application.

Inputs / Output

  • In: cal/val workbook + management_priors.yaml + sample_priors.R
  • Out: one events.json per treatment

Out of scope (follow-up)

Step 2: refine filled values using nearby monitoring-data event parquet files (5–10 km radius, same crop, median values).

Tasks

  • Workbook reader (managements / treatments / sites tabs)
  • Date midpoint utility
  • Prior-sampling helpers wired to management_priors.yaml
  • Missing-event detector (e.g. irrigation gap for irrigated systems)
  • events.json writer

Open question

  • events.json schema — reuse SIPNET-compatible spec or define fresh?

cc @dlebauer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions