Patterns of trade, production, and consumption