get_indicator: Get economic or housing indicators

Description Usage Arguments Details Value See Also Examples

View source: R/get_indicator.R

Description

Get economic or housing indicators

Usage

1
2
3
get_indicator_all(category = c("economic", "housing"), indicator)

get_indicator(category = c("economic", "housing"), indicator)

Arguments

category

Either "economic" or "housing"

indicator

One of the indicator series available under housing or economic indicators. See 'Details' for options.

Details

This function has access to the following indicator series for economic specific data:

Data specific to housing includes:

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.

Value

A grouped_df that is grouped by the column report_date.

See Also

get_url()

Examples

 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)

saadaslam/fannieapi documentation built on May 16, 2019, 9:11 p.m.