food_security_in_the_united_states
Get ERS food security in the United States - household and child food security, food insecurity, and very low food security prevalence by year, characteristic, and State, each pivoted to a wide layout.
Examples
from openbb import obb
obb.usda.food_security_in_the_united_states(provider='usda')
# Get food security prevalence by race and ethnicity since 2015.
obb.usda.food_security_in_the_united_states(table='by_characteristic', category='Race/ethnicity of households', start_year=2015, provider='usda')
# Get the by-State 3-year-average food insecurity prevalence.
obb.usda.food_security_in_the_united_states(table='by_state', provider='usda')
Parameters
- standard
- usda
table: str | None
Default: national_trend
Description
Table to retrieve. Each table pivots a set of food-security status measures into wide columns, with the survey year or 3-year period in the rows and the characteristic path or State as pinned dimension columns. Valid tables are:
national_trend, by_characteristic, households_with_children, child_trends, education_employment_disability, by_state
category: str | None
Filter by the household characteristic category of a table, e.g. 'Race/ethnicity of households'. If None, all categories of the selected table are included. Ignored by the by_state table, which has no category dimension.
start_year: int | None
Start year for filtering the data, compared against the survey year or the first year of a 3-year period. If None, returns from the beginning of the series.
end_year: int | None
End year for filtering the data, compared against the survey year or the first year of a 3-year period. If None, returns up to the most recent year.
Returns
results: FoodSecurityInTheUnitedStates
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 survey year for annual tables ('2008') or the 3-year period for the by_state table ('2006-2008'), with any varying household characteristic or State prefixed so each row is uniquely labeled ('Households with children — 2008', 'CA — 2006-2008').