us_food_imports
Get ERS U.S. food imports - annual value, volume, unit prices, and price inflation by food group and by source country.
Examples
from openbb import obb
obb.usda.us_food_imports(provider='usda')
# Get U.S. food import volume by food group since 2015.
obb.usda.us_food_imports(table='by_food_group', measure='volume', start_year=2015, provider='usda')
# Get fresh fruit imports by source country.
obb.usda.us_food_imports(table='by_source', food_group='Fruits', commodity='Fresh or chilled fruit', provider='usda')
Parameters
- standard
- usda
table: str | None
Default: by_food_group
Description
Table to retrieve. 'by_food_group' spreads the 14 food groups and a total-foods column across the years; 'by_source' spreads the source countries of the selected food group and product line across the years. Valid tables are:
by_food_group, by_source
measure: str | None
Default: value
Description
Measure to spread into the wide columns. 'by_source' supports only 'value' and 'volume'. Valid measures are:
value, value_change, volume, volume_change, unit_price, inflation
food_group: str | None
Default: Fruits
Description
Food group whose source countries are spread into columns for the 'by_source' table. Ignored by the 'by_food_group' table. Valid food groups are:
Animals, Meats, Fish, Dairy, Vegetables, Fruits, Nuts, Coffee, Grains, VegetablesOil, Sweets, Cocoa, Other, Beverages
commodity: str | None
Product line within the selected food group for the 'by_source' table, e.g. 'Fresh or chilled fruit'. If None, the food group's total line is used. Ignored by the 'by_food_group' table.
start_year: int | None
Start year for filtering the data. If None, returns from 1999, the first year of the series.
end_year: int | None
End year for filtering the data. If None, returns up to the most recent year.
Returns
results: UsFoodImports
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: int
Calendar year of the observation.
food_group: str | None
Food group of the source-country table. None for the by-food-group table.
commodity: str | None
Product line of the source-country table, as published. None for the by-food-group table.
unit: str | None
Unit shared by every value column, when uniform; None when the unit varies by column and is carried in each column header instead.