Description Usage Arguments Details Value See Also Examples
View source: R/get_indicator.R
Get economic or housing indicators
1 2 3 | get_indicator_all(category = c("economic", "housing"), indicator)
get_indicator(category = c("economic", "housing"), indicator)
|
category |
Either "economic" or "housing" |
indicator |
One of the indicator series available under housing or economic indicators. See 'Details' for options. |
This function has access to the following indicator series for economic specific data:
gross-domestic-product
personal-consumption-expenditures
residential-fixed-investment
business-fixed-investment
government-consumption-and-investment
net-exports
change-in-business-inventories
gdp-price-index
consumer-price-index
consumer-price-index-excl-food-and-energy
personal-chain-expenditures-chain-price-index
personal-chain-expenditures-chain-price-index-excl-food-and-energy
unemployment-rate-percent
employment-total-nonfarm-percent-change-quarterly-saar-annual-q4-q4
federal-funds-rate
1-year-treasury-note-yield
10-year-treasury-bond-yield
Data specific to housing includes:
fannie-mae-hpi
federal-housing-finance-agency-purchase-only-index
30-year-fixed-rate-mortgage
5-year-adjustable-rate-mortgage
1-year-adjustable-rate-mortgage
mortgage-originations-combined
mortgage-originations-purchase
mortgage-originations-refinance
mortgage-originations-refinance-share-percent
housing-starts-all
housing-starts-single-family
housing-starts-multi-family
new-single-family-home-sales
total-existing-home-sales
total-home-sales
median-new-home-price
median-total-existing
The difference between get_indicator
and get_indicator_all
is that the latter gets
data for all report dates. For example, get_indicator_all
will include revised forecasts over time.
The former will get you the latest report with end of year values removed.
A grouped_df
that is grouped by the column report_date
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | get_indicator("economic", "gross-domestic-product")
get_indicator("housing", "housing-starts-single-family")
## This gets all reports on GDP and single family housing starts
get_indicator_all("economic", "gross-domestic-product")
get_indicator_all('housing', 'housing-starts-single-family')
## quick plotting is better suited with `get_indicator`
gdp <- get_indicator('economic', 'gross-domestic-product')
ggplot(gdp,
aes(x = indicator_val_dt, y = value, linetype = forecast)
) +
geom_line(size = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.