PROJECT 23 • DAY 19 OF 90 • AGRITECH & MARKET BI

CROPLEDGER
AGRI INTELLIGENCE.

An Indian AgriTech market intelligence and selling decision platform for farmers and agricultural traders — pairing live AGMARKNET mandi price feeds, net-return haulage optimization, spatial Leaflet market atlases, and empirical price forecasting.

React 19TypeScriptFastAPIPostgreSQL 15+Leaflet GISScikit-Learn
CropLedger Preview
NET REALIZATION
Haulage & Fee Math
TEST SUITE
9/9 Passed (83%)
20+ Mandis
Verified APMC Markets
₹/Quintal
Net Return After Haulage
80% CI
Empirical Price Forecasts
9 / 9
Automated Tests Passed
01 / Overview

EVIDENCE-BASED SELLING DECISIONS FOR INDIAN AGRICULTURE.

High gross wholesale prices at distant mandis often mislead farmers into losses once transport costs, commissions, and loading fees are deducted. CropLedger calculates true net-realization rupees and compares regional markets with geospatial clarity.

01

Market Overview Dashboard

Real-time summary of modal prices, arrivals, price spreads across reporting APMC mandis, and quick net-return comparison shortcuts.

02

Net-Return Selling Advisor

Calculates net revenue = Gross - (Distance × Rate/km + Tolls + Mandi Fee% + Commission% + Handling), ranking best markets by take-home profit.

03

Geospatial Market Atlas

Leaflet choropleth and cluster map displaying regional mandi locations, price heatmaps, and radial haulage distance rings.

04

Crop Intelligence Deep-Dives

Commodity-level analysis of modal, minimum, and maximum prices, arrival volume distributions, and historical spread variance.

05

ML Price Trend Forecasting

Random Forest and Gradient Boosting models forecasting 7- to 30-day commodity price trajectories with 80% empirical prediction intervals.

06

AGMARKNET Data Quality Centre

Validates and standardizes data.gov.in and AGMARKNET CSV imports, normalizes units (Rs/Kg and Rs/Tonne to INR/Quintal), and audits feed freshness.

02 / Architecture

HOW IT WORKS.

React 19 Vite SPA communicates with FastAPI services orchestrating validation, net-return economics, GIS coordinates, and time-series forecasting over PostgreSQL and SQLite.

STAGE 01

Data Ingest

AGMARKNET CSV & API price arrivals.

→
STAGE 02

Quality Audit

Unit normalization & freshness audit.

→
STAGE 03

Net-Return Math

Deduct haulage, toll, mandi fee & comm.

→
STAGE 04

Forecasting

Random Forest & Gradient Boosting 80% CI.

→
STAGE 05

Visual BI

Recharts, Leaflet atlas & PDF reports.

03 / Screenshots

APPLICATION SCREENSHOTS.

Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.

04 / Technical Details

ECONOMIC CALCULATION & FORECAST SPECIFICATIONS.

Key modules, rules, safety checks, and automated test results documented in the repository.

Analysis Module Economic / Algorithm Model Decision Impact
Net Realization Gross - (Distance × Rate + Toll + Mandi Fee% + Comm% + Labour) Ranks mandis by actual take-home income
Price Forecasting Random Forest + Gradient Boosting (chronological split) 80% empirical prediction bounds
Data Quality Audit Rs/Kg & Rs/Tonne -> INR/Quintal normalization Prevents erroneous price skewing
Automated Tests pytest suite covering models, schemas & analytics 9 / 9 Passed (83% line coverage)
05 / Tech Stack

CORE TECHNOLOGIES.

Frameworks, databases, visualization tools, and testing libraries used in CropLedger.

FRONTEND STACK
React 19 • TypeScript • Vite 6
STYLING & MAPS
Tailwind CSS v4 • Leaflet • Recharts
BACKEND API
FastAPI • Pydantic v2 • Uvicorn
MACHINE LEARNING
Scikit-Learn (Random Forest, Gradient Boosting)
DATABASE
PostgreSQL 15+ • SQLite Fallback
VERIFICATION
9/9 Pytest Passed (83% Coverage)
06 / Next Steps

FUTURE ENHANCEMENTS.

Upcoming improvements planned for CropLedger.

Direct integration with e-NAM national agriculture market trading APIs.
Hyperlocal weather forecasts and monsoon rainfall delay impact modeling.
Cold-storage inventory tracker comparing hold costs vs forward price premiums.
Voice-enabled WhatsApp bot for daily regional mandi price broadcasts in Tamil.
Farmer Producer Organization (FPO) collective logistics load pooling optimizer.
Automated mandi arrival discrepancy alerts comparing year-over-year crop yields.
OPEN-SOURCE PROJECT • GITHUB.COM/RAGURAMRRP

EXPLORE SOURCE & DOCS.

View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.