R/pipeline-helpers.R
gdp_deflator.Rd
The GDP deflator is a measure of price inflation with respect to a specific base year; it allows us to back out the effects of inflation when we compare prices over time. This function calculates a deflator given a base year (the year to convert from) and a conversion year (the year to convert to). To use the deflator, multiply prices in base-year dollars by the deflator; the result will be prices in the converted dollar year.
gdp_deflator(year, base_year)
U.S. Bureau of Economic Analysis, Gross domestic product (implicit price deflator) [A191RD3A086NBEA], retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/A191RD3A086NBEA, April 12, 2017
Year to convert TO.
Year to convert FROM.
GDP Deflator. Multiply to convert FROM base_year
dollars TO
year
dollars.
gdp_bil_1990USD <- c(4770, 4779, 4937)
gdp_bil_2010USD <- gdp_bil_1990USD * gdp_deflator(2010, base_year = 1990)