international_baseline_data
Get ERS International Baseline Data - long-term projections of area, yield, production, supply, use, and trade for grains, oilseeds, cotton, and livestock, pivoted to a wide layout with the countries and regions as columns and the crop or calendar years as rows.
Examples
from openbb import obb
obb.usda.international_baseline_data(provider='usda')
# Get projected corn exports by country and region since 2020.
obb.usda.international_baseline_data(commodity='Corn', attribute='Exports', start_year=2020, provider='usda')
# Get China's long-term wheat production projection.
obb.usda.international_baseline_data(commodity='Wheat', attribute='Production', country='China', provider='usda')
Parameters
- standard
- usda
commodity: str | None
Default: Wheat
Description
Commodity to retrieve. The commodity and measure select one projection series whose countries and regions spread into the wide columns while the years stay in the rows. Valid commodities are:
Barley, Beef and veal, Corn, Cotton, Pork, Poultry, Rice, Sorghum, Soybean meal, Soybean oil, Soybeans, Wheat
attribute: str | None
Default: Production
Measure to spread into the country columns, e.g. 'Production', 'Exports', or 'Ending stocks'. The available measures depend on the commodity.
country: str | None
Filter to a single country or region column, e.g. 'China'. If None, every country and region is spread into the columns.
start_year: int | None
Start year for filtering the data, compared against the first four digits of the crop or calendar year. If None, returns from the beginning of the series.
end_year: int | None
End year for filtering the data, compared against the first four digits of the crop or calendar year. If None, returns through the last projection year.
Returns
results: InternationalBaselineData
Serializable results.
provider: str | None
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
- usda
year: str
Crop or calendar year of the observation, as published, e.g. '2024/25' for crops or '2024' for livestock.
commodity: str | None
Commodity of the selection, as published.
attribute: str | None
Measure spread into the country columns, as published.
unit: str | None
Unit shared by every value column for the selection, as published, e.g. 'Thousand metric tons'.
year_type: str | None
Year basis of the selection: 'Crop year' for crops or 'Calendar year' for livestock.
topic: str | None
Topic of the commodity: 'Crops' or 'Livestock'.