FUTURE ENHANCEMENT TODO
Full USDA API Commodity Mapping
Context: We currently map our 17 internal commodities to USDA API names. However, the USDA API has 465 total commodities that could be valuable for a more comprehensive agricultural data tool.
Goal: Create a complete mapping system for all 465 USDA NASS QuickStats API commodities to support:
- Backend tools that aren't limited to our internal resource list
- Broader agricultural analysis beyond our current 17 crops
- Future expansion of commodity coverage
Approach:
- Extract all 465 API commodities - Use the existing
get_param_valuesendpoint - Categorize commodities - Group by type (crops, livestock, byproducts, etc.)
- Create comprehensive mapping structure - Map to standardized names, categories, and hierarchies
- Store in stable format - Database table or configuration file for easy access
Files to create:
comprehensive_commodity_mapping.py- Full 465 commodity mapping (usetemplate_comprehensive_commodity_mapping.pyas starting point)commodity_categories.py- Classification system for commodity typesexpand_commodity_coverage.py- Tool to add new commodities to our system
Existing references:
template_comprehensive_commodity_mapping.py- Template with original 17-commodity logicreviewed_api_mappings.py- Validated mappings for current 17 commoditiesreview_api_mappings.pypattern - Interactive validation approach
Benefits:
- Support for comprehensive agricultural data analysis
- Easy expansion of ETL coverage to new commodities
- Foundation for agricultural data API that covers more than our current crops
Implementation priority: Medium - valuable for future expansion but not blocking current work
Estimated effort: 1-2 days to build comprehensive mapping system
Added: 2026-02-05 - Full API commodity mapping for future expansion