Skip to contents

Main functions

Functions required to produce compliant charts.

theme_fed()
Fed-style ggplot theme
geom_recessions()
Add recession bars to time series graphs
geom_line_fed()
Draw lines with Fed-style aesthetics
geom_hline_zero()
Convenience functions that wrap existing ggplot2 code. This file shouldn't contain new functionality, just code that can be replicated with longer calls to standard ggplot2 functions. Draw horizontal line at the origin (y=0)
annotate_last_date()
Add last date of data
scale_x_year()
Position annual scales for date data (INCOMPLETE!)
draw_key_square()
Square legends
save_plot()
Export figure
fontsupport
Font support

Advanced functions and topics

Internal functions that might be of use to some users.

update_recessions()
Update internal tab-separated file listing NBER business cycle dates
move_y_axis_title()
Complex extensions that involve hacks to ggplot internals Move y-axis title to the top-right of the chart.
annotate_top_tick()
Add wide ticks at the top of the chart
annotate_frequency()
Add frequency label
theme_fed_minimal()
Internal Fed theme
fed_color_pal()
Closure to generate a color palette picker, given an input palette
fed_linewidth_pal()
Closure to generate a linewidth palette picker, given an input palette
install_fed_font()
Installing fonts
GeomLastDate
ggproto class used to place the text by annotate_last_date, based on GeomText
GeomLastDateRepel
ggproto class used to place the text by annotate_last_date, based on GeomTextRepel
load_fed_font()
Loading fonts
customproto GeomRecessions
Custom ggproto classes
set_plot_size()
Set plot size

Color palettes

Predefined color palettes

fsr_primary_colors
List of primary colors used in the BSVR
fsr_secondary_colors
List of secondary colors used in the BSVR
bsvr_colors
List of colors used in BSVR reports

Sample datasets

Sample datasets used to showcase how to use the package

FSR_1_17
Change in house prices
FSR_2_4
Net issuance of risky debt
FSR_4_1
Runnable money-like liabilities (% of GDP)