The economy of Nigeria historically was based on agriculture, and about 70% of the workforce is still engaged in farming (largely of a subsistence type). The chief crops are cocoa, peanuts, palm oil, corn, rice, sorghum, millet, soybeans, cassava, yams, and rubber. In addition, cattle, sheep, goats, and pigs are raised.
Petroleum is the leading mineral produced in Nigeria and provides about 95% of foreign exchange earnings and the majority of government revenues. Other minerals extracted include tin, iron ore, coal, limestone, columbite, lead, zinc, and gold.
Except when oil prices are low, Nigeria generally earns more from exports than it spends on imports. Other important exports include cocoa, rubber, and palm products. The main imports are machinery, chemicals, transportation equipment, manufactured goods, food, and live animals. The United States is by far the largest trading partner, followed by China, Brazil, Spain, and Great Britain.