agricultural_productivity
Get ERS agricultural productivity - the farm output, input, and total factor productivity indices for the United States and the relative productivity levels of the 48 contiguous States, each pivoted to a wide layout with the series as columns and years as rows.
Examples
from openbb import obb
obb.usda.agricultural_productivity(provider='usda')
# Get the U.S. farm output, input, and TFP indices since 2000.
obb.usda.agricultural_productivity(table='national_indices', start_year=2000, provider='usda')
# Get California's relative TFP, output, and input levels.
obb.usda.agricultural_productivity(table='state_relative_levels', state='CA', provider='usda')
Parameters
- standard
- usda
table: str | None
Default: national_indices
Description
Productivity table to retrieve. Each table is a set of named index series indexed by year; the series become the wide value columns while year, and the State for the relative-levels table, stay as pinned row columns. The national tables cover the United States; the relative-levels table covers the 48 contiguous States. Valid tables are:
national_indices, national_price_quantity, state_relative_levels
state: str | None
Default: US
State to retrieve for the relative-levels table, as a two-letter code, or 'US' for the national tables. The national tables are published for the United States only; a State value is ignored for them.
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: AgriculturalProductivity
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
Year of the observation.
state: str | None
State of the observation, or 'United States' for the national tables.