sugar_sweeteners_yearbook
Get ERS Sugar and Sweeteners Yearbook tables - U.S., Mexican, and world sugar and sweetener prices, supply and use, production, consumption, and trade, each pivoted to a wide layout by attribute.
Examples
from openbb import obb
obb.usda.sugar_sweeteners_yearbook(provider='usda')
# Get U.S. sugar supply and use since 2020.
obb.usda.sugar_sweeteners_yearbook(table='table_24a', start_year=2020, provider='usda')
# Get the world white refined sugar futures price table.
obb.usda.sugar_sweeteners_yearbook(table='table_2', provider='usda')
# Get U.S. honey imports by country of source since 2020.
obb.usda.sugar_sweeteners_yearbook(table='table_48a', start_year=2020, provider='usda')
Parameters
- standard
- usda
table: str | None
Default: table_24a
Description
Sugar and Sweeteners Yearbook table to retrieve. Each table is a set of named price, supply-and-use, production, or trade series indexed by year and period; the attributes become the wide value columns while time stays in the rows. Valid tables are:
table_2, table_3a, table_3b, table_4, table_5, table_5a, table_6, table_7, table_8, table_9, table_10, table_11, table_12, table_13, table_31a, table_31b, table_54, table_55, table_14, table_15, table_16, table_17, table_18, table_19, table_20a, table_20b, table_21, table_22, table_46, table_47, table_48a, table_48b, table_49, table_50, table_51, table_52, table_53, table_24a, table_24b, table_25, table_26, table_56a, table_56b, table_27, table_28, table_29, table_30, table_34a, table_34b, table_35a, table_35b, table_36, table_37, table_38, table_57, table_58a, table_58b, table_58c, table_59a, table_59b, table_60a, table_60b, table_60c, table_60d, table_60e, table_61a, table_61b
frequency: str | None
Period basis to keep, one of the bases the selected table publishes, e.g. 'Calendar year', 'Fiscal year', 'Calendar year quarter', or 'Month'. Filtering to one basis yields a single aligned time series. If None, the table's first annual basis is used.
start_year: int | None
Start year for filtering the data, compared against the observation year. If None, returns from the beginning of the series.
end_year: int | None
End year for filtering the data, compared against the observation year. If None, returns up to the most recent year.
Returns
results: SugarSweetenersYearbook
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
period: str
Row label of the observation: the year for annual bases ('2020'), the year and month or quarter for sub-annual bases ('2020 Jan', '2020 Q1'), with any varying commodity, geography, or source dimension prefixed so each row is uniquely labeled.