food_availability_per_capita
Get ERS Food Availability (Per Capita) Data System - per capita food supply, loss-adjusted availability, and nutrient availability of the U.S. food supply, each file pivoted to a wide layout with the measures as columns and years as rows.
Examples
from openbb import obb
obb.usda.food_availability_per_capita(provider='usda')
# Get the loss-adjusted rice availability budget since 1990.
obb.usda.food_availability_per_capita(data_system='loss_adjusted', food_group='grains', commodity='Rice: Per capita availability adjusted for loss', start_year=1990, provider='usda')
# Get the nutrient availability of the U.S. food supply since 2000.
obb.usda.food_availability_per_capita(data_system='nutrient', food_group='totals', start_year=2000, provider='usda')
Parameters
- standard
- usda
data_system: str | None
Default: food_availability
Description
Data system to retrieve. Each selection downloads one cached file, pivoted to a wide layout with the measures spread into columns and the years in the rows. Valid data systems are:
food_availability, loss_adjusted, nutrient
food_group: str | None
Food group file within the data system, as a slug. The same slug can appear under more than one data system. If None, the data system's default file is used.
commodity: str | None
Commodity block within the file, as its published name. If None, the file's first block is used.
start_year: int | None
Start year for filtering the data. If None, returns from the beginning of the series.
end_year: int | None
End year for filtering the data. If None, returns up to the most recent year.
Returns
results: FoodAvailabilityPerCapitaDataSystem
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.