library(readxl)
library(ggplot2)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
library(fredr)
library(quantmod)
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## ######################### Warning from 'xts' package ##########################
## # #
## # The dplyr lag() function breaks how base R's lag() function is supposed to #
## # work, which breaks lag(my_xts). Calls to lag(my_xts) that you type or #
## # source() into this session won't work correctly. #
## # #
## # Use stats::lag() to make sure you're not using dplyr::lag(), or you can add #
## # conflictRules('dplyr', exclude = 'lag') to your .Rprofile to stop #
## # dplyr from breaking base R's lag() function. #
## # #
## # Code in packages is not affected. It's protected by R's namespace mechanism #
## # Set `options(xts.warn_dplyr_breaks_lag = FALSE)` to suppress this warning. #
## # #
## ###############################################################################
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
## Loading required package: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
library(cowplot)
##
## Attaching package: 'cowplot'
## The following object is masked from 'package:lubridate':
##
## stamp
library(scales)
library(dplyr)
library(PerformanceAnalytics)
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
library(xts)
library(writexl)
library(gridExtra)
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
library(reshape2)
api_key <- "67cb07bf518cedccde533cf56410d07b"
fredr_set_key("67cb07bf518cedccde533cf56410d07b")
##Unemployement rate recent 12 months
unemp_rate <- fredr(
series_id = "UNRATE",
observation_start = as.Date("2022-01-01"),
observation_end = as.Date("2024-07-31")
)
tail(unemp_rate)
## # A tibble: 6 × 5
## date series_id value realtime_start realtime_end
## <date> <chr> <dbl> <date> <date>
## 1 2024-02-01 UNRATE 3.9 2024-08-05 2024-08-05
## 2 2024-03-01 UNRATE 3.8 2024-08-05 2024-08-05
## 3 2024-04-01 UNRATE 3.9 2024-08-05 2024-08-05
## 4 2024-05-01 UNRATE 4 2024-08-05 2024-08-05
## 5 2024-06-01 UNRATE 4.1 2024-08-05 2024-08-05
## 6 2024-07-01 UNRATE 4.3 2024-08-05 2024-08-05
ggplot(unemp_rate, aes(x = date, y = value)) +
geom_line(color = "#006A4D") +
geom_point(data = tail(unemp_rate, 1), aes(x = date, y = value), color = "#006A4D") + # Add point at the last value
geom_text(data = tail(unemp_rate, 1), aes(x = date, y = value, label = value),
vjust = -0.5, hjust = 1.5, color = "#006A4D") + # Add text label at the last value
labs(
title = "Unemployment Rate from 2022 to 2024",
x = "Date",
y = "Unemployment Rate (%)"
) +
scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)

##Unemployement rate long term
unemp_rate <- fredr(
series_id = "UNRATE",
observation_start = as.Date("2000-01-01"),
observation_end = as.Date("2024-07-31")
)
tail(unemp_rate)
## # A tibble: 6 × 5
## date series_id value realtime_start realtime_end
## <date> <chr> <dbl> <date> <date>
## 1 2024-02-01 UNRATE 3.9 2024-08-05 2024-08-05
## 2 2024-03-01 UNRATE 3.8 2024-08-05 2024-08-05
## 3 2024-04-01 UNRATE 3.9 2024-08-05 2024-08-05
## 4 2024-05-01 UNRATE 4 2024-08-05 2024-08-05
## 5 2024-06-01 UNRATE 4.1 2024-08-05 2024-08-05
## 6 2024-07-01 UNRATE 4.3 2024-08-05 2024-08-05
ggplot(unemp_rate,aes(x=date,y=value))+
geom_line(color = "#006A4D")+
labs(title="Unemployment Rate from 2022 to 2024",x="Date",y="Unemployment Rate(%)")+
theme_minimal()+
scale_x_date(date_breaks = "1 years", date_labels = "%Y") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))+
theme_minimal() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

##Fed Funds Rate
fed_funds <- fredr(
series_id = "FEDFUNDS",
observation_start = as.Date("2022-01-01"),
observation_end = as.Date("2024-07-31")
)
tail(fed_funds)
## # A tibble: 6 × 5
## date series_id value realtime_start realtime_end
## <date> <chr> <dbl> <date> <date>
## 1 2024-02-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 2 2024-03-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 3 2024-04-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 4 2024-05-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 5 2024-06-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 6 2024-07-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
ggplot(fed_funds, aes(x = date, y = value)) +
geom_line(color = "#006A4D") +
geom_point(data = tail(fed_funds, 1), aes(x = date, y = value), color = "#006A4D") + # Add point at the last value
geom_text(data = tail(fed_funds, 1), aes(x = date, y = value, label = value),
vjust = -0.5, hjust = 1.5, color = "#006A4D") + # Add text label at the last value
labs(
title = "Unemployment Rate from 2022 to 2024",
x = "Date",
y = "Unemployment Rate (%)"
) +
scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)

##Fed Funds Rate long term
fed_funds <- fredr(
series_id = "FEDFUNDS",
observation_start = as.Date("1990-01-01"),
observation_end = as.Date("2024-07-31")
)
tail(fed_funds)
## # A tibble: 6 × 5
## date series_id value realtime_start realtime_end
## <date> <chr> <dbl> <date> <date>
## 1 2024-02-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 2 2024-03-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 3 2024-04-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 4 2024-05-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 5 2024-06-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
## 6 2024-07-01 FEDFUNDS 5.33 2024-08-05 2024-08-05
ggplot(fed_funds, aes(x = date, y = value)) +
geom_line(color = "#006A4D") +
geom_point(data = tail(fed_funds, 1), aes(x = date, y = value), color = "#006A4D") + # Add point at the last value
geom_text(data = tail(fed_funds, 1), aes(x = date, y = value, label = value),
vjust = -0.5, hjust = 1.5, color = "#006A4D") + # Add text label at the last value
labs(
title = "Fed Funds Rate from 1990 to 2024",
x = "Date",
y = "Fed Rate (%)"
) +
scale_x_date(date_breaks = "1 year", date_labels = "%Y") +
theme_minimal() +
theme(
axis.text.x = element_text(angle = 90, hjust = 1),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank()
)

##GDP of different countrieschch
gdp_us <- getSymbols("GDPC1", src = "FRED", api.key = api_key) # This is real GDP series i.e. inflation adjsuted
###Inflation of Different Countries
###Markets in differenr countries
###10y Yields in different countires
###10 year real interest rate
real_interest_rate_10y<- getSymbols("REAINTRATREARAT10Y", src = "FRED", api.key = api_key)
REAINTRATREARAT10Y
## REAINTRATREARAT10Y
## 1982-01-01 7.623742
## 1982-02-01 7.656648
## 1982-03-01 7.128993
## 1982-04-01 7.408347
## 1982-05-01 7.320041
## 1982-06-01 7.345379
## 1982-07-01 7.558987
## 1982-08-01 6.879798
## 1982-09-01 6.507225
## 1982-10-01 6.279162
## ...
## 2023-10-01 2.082461
## 2023-11-01 2.094329
## 2023-12-01 1.680899
## 2024-01-01 1.680871
## 2024-02-01 1.616823
## 2024-03-01 1.925969
## 2024-04-01 1.938194
## 2024-05-01 2.103399
## 2024-06-01 1.999567
## 2024-07-01 2.050509
###10-Year Expected Inflation (EXPINF10YR)
expected_inflation_10y<- getSymbols("EXPINF10YR", src = "FRED", api.key = api_key)
EXPINF10YR
## EXPINF10YR
## 1982-01-01 6.197611
## 1982-02-01 6.079232
## 1982-03-01 5.648130
## 1982-04-01 5.713188
## 1982-05-01 5.689980
## 1982-06-01 5.602379
## 1982-07-01 5.916005
## 1982-08-01 5.696716
## 1982-09-01 5.733214
## 1982-10-01 5.341065
## ...
## 2023-10-01 2.362663
## 2023-11-01 2.384114
## 2023-12-01 2.278410
## 2024-01-01 2.164507
## 2024-02-01 2.146201
## 2024-03-01 2.218753
## 2024-04-01 2.342961
## 2024-05-01 2.451501
## 2024-06-01 2.367064
## 2024-07-01 2.363363
###High Yield Spread
high_yield_spread<- getSymbols("BAMLH0A0HYM2", src = "FRED", api.key = api_key)
BAMLH0A0HYM2
## BAMLH0A0HYM2
## 1996-12-31 3.13
## 1997-01-01 NA
## 1997-01-02 3.06
## 1997-01-03 3.09
## 1997-01-06 3.10
## 1997-01-07 3.10
## 1997-01-08 3.07
## 1997-01-09 3.13
## 1997-01-10 3.16
## 1997-01-13 3.04
## ...
## 2024-07-19 3.09
## 2024-07-22 3.05
## 2024-07-23 3.02
## 2024-07-24 3.10
## 2024-07-25 3.08
## 2024-07-26 3.10
## 2024-07-29 3.13
## 2024-07-30 3.20
## 2024-07-31 3.25
## 2024-08-01 3.35
###Earnings Yield
shiller_data <- read_excel("/Users/vinaychauhan/Documents_1/Learning R/Signals/Data/CAPE and Confidence Data/Shiller's CAPE_May_24.xls", sheet = "Data")
## New names:
## • `` -> `...14`
## • `` -> `...16`
tail(shiller_data)
## # A tibble: 6 × 22
## Date `S&P` Dividend Earnings CPI Fraction `Rate GS10` `Real Price`
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 2023. 4685. 70.3 192. 307. 2024. 4.02 4793.
## 2 2024. 4816. 70.5 NA 308. 2024. 4.06 4900.
## 3 2024. 5012. 70.7 NA 310. 2024. 4.21 5069.
## 4 2024. 5171. 70.8 NA 312. 2024. 4.21 5195.
## 5 2024. 5112. NA NA 313. 2024. 4.54 5121.
## 6 2024. 5304 NA NA 314. 2024. 4.47 5304
## # ℹ 14 more variables: `Real Dividend` <dbl>, `RTR Price` <dbl>,
## # `Real Earnings` <dbl>, `Scaled Earnings` <dbl>, CAPE <chr>, ...14 <lgl>,
## # `TR CAPE` <chr>, ...16 <lgl>, Yield <dbl>, `Monthly Bond Returns` <dbl>,
## # `Real Bond Returns` <dbl>, `10 Yr Real Stock Return` <dbl>,
## # `10 Yr Annualised Bond Return` <dbl>,
## # `Ten Yr Annualised Excess Return` <dbl>
class(shiller_data)
## [1] "tbl_df" "tbl" "data.frame"
shiller_subset <- data.frame(
Date = ymd(paste(shiller_data$Date, "01", sep = "")),
Real_Earnings_Yield = as.numeric(shiller_data$Yield)*100
)
tail(shiller_subset)
## Date Real_Earnings_Yield
## 1836 2023-12-01 1.945228
## 1837 2024-01-01 1.864085
## 1838 2024-02-01 1.638901
## 1839 2024-03-01 1.568458
## 1840 2024-04-01 1.283883
## 1841 2024-05-01 1.237012
# Set the day to the last day of each month
shiller_subset$Date <- ceiling_date(shiller_subset$Date, unit = "month") - days(1)
shiller_subset <- shiller_subset[!is.na(shiller_subset$Real_Earnings_Yield), ]
tail(shiller_subset)
## Date Real_Earnings_Yield
## 1836 2023-12-31 1.945228
## 1837 2024-01-31 1.864085
## 1838 2024-02-29 1.638901
## 1839 2024-03-31 1.568458
## 1840 2024-04-30 1.283883
## 1841 2024-05-31 1.237012
shiller_subset_xts <- xts(shiller_subset$Real_Earnings_Yield, order.by = shiller_subset$Date)
tail(shiller_subset_xts)
## [,1]
## 2023-12-31 1.945228
## 2024-01-31 1.864085
## 2024-02-29 1.638901
## 2024-03-31 1.568458
## 2024-04-30 1.283883
## 2024-05-31 1.237012
colnames(shiller_subset_xts) <- c("Real_Earnings_Yield")
tail(shiller_subset_xts)
## Real_Earnings_Yield
## 2023-12-31 1.945228
## 2024-01-31 1.864085
## 2024-02-29 1.638901
## 2024-03-31 1.568458
## 2024-04-30 1.283883
## 2024-05-31 1.237012
class(shiller_subset_xts)
## [1] "xts" "zoo"
# Filter data from 1996 onwards
# Filter data from 1996 onwards
real_interest_rate_10y <- REAINTRATREARAT10Y["1997/"]
expected_inflation_10y <- EXPINF10YR["1997/"]
high_yield_spread <- BAMLH0A0HYM2["1997/"]
shiller_subset_xts <- shiller_subset_xts["1997/"]
head(real_interest_rate_10y)
## REAINTRATREARAT10Y
## 1997-01-01 3.254868
## 1997-02-01 3.213375
## 1997-03-01 3.308556
## 1997-04-01 3.550473
## 1997-05-01 3.436981
## 1997-06-01 3.279108
real_interest_rate_10y
## REAINTRATREARAT10Y
## 1997-01-01 3.254868
## 1997-02-01 3.213375
## 1997-03-01 3.308556
## 1997-04-01 3.550473
## 1997-05-01 3.436981
## 1997-06-01 3.279108
## 1997-07-01 3.199876
## 1997-08-01 3.088512
## 1997-09-01 3.150870
## 1997-10-01 3.016591
## ...
## 2023-10-01 2.082461
## 2023-11-01 2.094329
## 2023-12-01 1.680899
## 2024-01-01 1.680871
## 2024-02-01 1.616823
## 2024-03-01 1.925969
## 2024-04-01 1.938194
## 2024-05-01 2.103399
## 2024-06-01 1.999567
## 2024-07-01 2.050509
# Combine all data into one data frame
# Convert each xts object to a data frame for ggplot
real_interest_rate_10y_df <- data.frame(Date = index(real_interest_rate_10y), Value = coredata(real_interest_rate_10y))
expected_inflation_10y_df <- data.frame(Date = index(expected_inflation_10y), Value = coredata(expected_inflation_10y))
high_yield_spread_df <- data.frame(Date = index(high_yield_spread), Value = coredata(high_yield_spread))
shiller_subset_df <- data.frame(Date = index(shiller_subset_xts), Value = coredata(shiller_subset_xts))
tail(shiller_subset_df)
## Date Real_Earnings_Yield
## 324 2023-12-31 1.945228
## 325 2024-01-31 1.864085
## 326 2024-02-29 1.638901
## 327 2024-03-31 1.568458
## 328 2024-04-30 1.283883
## 329 2024-05-31 1.237012
# Define the color
custom_color <- "#006A4D"
# Create individual plots
plot1 <- ggplot(real_interest_rate_10y_df, aes(x = Date, y = REAINTRATREARAT10Y)) +
geom_line(color = custom_color) +
labs(title = '10-Year Real Interest Rate', x = 'Date', y = 'Rate (%)') +
geom_text(aes(label = round(REAINTRATREARAT10Y, 2)), data = tail(real_interest_rate_10y_df, 1), vjust = -0.5, color = custom_color) +
scale_x_date(date_breaks = "4 years", date_labels = "%Y") +
theme_minimal() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
plot2 <- ggplot(expected_inflation_10y_df, aes(x = Date, y = EXPINF10YR)) +
geom_line(color = custom_color) +
labs(title = '10-Year Expected Inflation', x = 'Date', y = 'Rate (%)') +
geom_text(aes(label = round(EXPINF10YR, 2)), data = tail(expected_inflation_10y_df, 1), vjust = -0.5, color = custom_color) +
scale_x_date(date_breaks = "4 years", date_labels = "%Y") +
theme_minimal() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
plot3 <- ggplot(high_yield_spread_df, aes(x = Date, y = BAMLH0A0HYM2)) +
geom_line(color = custom_color) +
labs(title = 'High Yield Spread', x = 'Date', y = 'Spread (%)') +
geom_text(aes(label = round(BAMLH0A0HYM2, 2)), data = tail(high_yield_spread_df, 1), vjust = -2.7, color = custom_color) +
scale_x_date(date_breaks = "4 years", date_labels = "%Y") +
theme_minimal() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
plot4 <- ggplot(shiller_subset_df, aes(x = Date, y = Real_Earnings_Yield)) +
geom_line(color = custom_color) +
labs(title = 'Real Earnings Yield', x = 'Date', y = 'Yield (%)') +
geom_text(aes(label = round(Real_Earnings_Yield, 2)), data = tail(shiller_subset_df, 1), vjust = 0.7, color = custom_color) +
scale_x_date(date_breaks = "4 years", date_labels = "%Y") +
theme_minimal() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())
# Combine plots using cowplot and plot_grid
combined_plot <- plot_grid(plot1, plot2, plot3, plot4, labels = "AUTO", ncol = 2)
## Warning: Removed 1 row containing missing values or values outside the scale range
## (`geom_line()`).
# Display the combined plot
print(combined_plot)

# Create the data frame
components <- c("Inflation Expectations", "Real Returns", "Real Dividend Yield", "Real Dividend Growth")
values <- c(2.45, 2.10, 0.46, 3.83) # Adjust these values as necessar
# Create the initial and end points for the waterfall
data <- data.frame(
Component = components,
Value = values
)
# Calculate the cumulative values for 'Start' and 'End'
data <- data %>%
mutate(
Start = c(0, cumsum(Value)[-length(Value)]),
End = cumsum(Value)
)
total_value <- sum(data$Value)
total_row <- data.frame(Component = "Expected Equity Returns (CME)", Value = total_value, Start = 0, End = total_value)
data <- bind_rows(data, total_row)
adj_row <- data.frame(Component = "Valuation Adj.", Value = 1.92, Start = total_value, End = total_value-1.92)
data <- bind_rows(data, adj_row)
CME_adj <- data.frame(Component = "CME with valuation adj.", Value = 6.93, Start = 0, End = 6.93)
data <- bind_rows(data, CME_adj)
data
## Component Value Start End
## 1 Inflation Expectations 2.45 0.00 2.45
## 2 Real Returns 2.10 2.45 4.55
## 3 Real Dividend Yield 0.46 4.55 5.01
## 4 Real Dividend Growth 3.83 5.01 8.84
## 5 Expected Equity Returns (CME) 8.84 0.00 8.84
## 6 Valuation Adj. 1.92 8.84 6.92
## 7 CME with valuation adj. 6.93 0.00 6.93
# Create the plot for each component separately
ggplot() +
geom_rect(data = data[1, ], aes(xmin = 0, xmax = 1, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[1, ], aes(x = 0.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[2, ], aes(xmin = 1, xmax = 2, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[2, ], aes(x = 1.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[3, ], aes(xmin = 2, xmax = 3, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[3, ], aes(x = 2.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[4, ], aes(xmin = 3, xmax = 4, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[4, ], aes(x = 3.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[5, ], aes(xmin = 4, xmax = 5, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[5, ], aes(x = 4.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[6, ], aes(xmin = 5, xmax = 6, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[6, ], aes(x = 5.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
geom_rect(data = data[7, ], aes(xmin = 6, xmax = 7, ymin = Start, ymax = End, fill = Component), color = "black", size = 0.2) +
geom_text(data = data[7, ], aes(x = 6.5, y = (Start + End) / 2, label = sprintf("%.2f%%", Value)), vjust = 0.5)+
scale_x_continuous(breaks = 1:nrow(data), labels = data$Component)+
scale_fill_manual(values = c("Inflation Expectations" = "lightblue", "Real Returns" = "lightgreen", "Real Dividend Yield" = "lightpink", "Real Dividend Growth" = "lightyellow", "Expected Equity Returns (CME)" = "darkgreen","Valuation Adj."="red","CME with valuation adj."="#006A4D"))+
theme_minimal()+
theme(axis.title.x = element_blank(),
axis.title.y = element_blank(),
axis.text.x = element_blank(),
axis.text.y = element_blank(),
axis.ticks = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
plot.background = element_rect(fill = "white", color = NA))+
labs(title = "Capital Market Return Expectations", x = "", y = "Percentage (%)")
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

coord_flip()
## <ggproto object: Class CoordFlip, CoordCartesian, Coord, gg>
## aspect: function
## backtransform_range: function
## clip: on
## default: FALSE
## distance: function
## expand: TRUE
## is_free: function
## is_linear: function
## labels: function
## limits: list
## modify_scales: function
## range: function
## render_axis_h: function
## render_axis_v: function
## render_bg: function
## render_fg: function
## setup_data: function
## setup_layout: function
## setup_panel_guides: function
## setup_panel_params: function
## setup_params: function
## train_panel_guides: function
## transform: function
## super: <ggproto object: Class CoordFlip, CoordCartesian, Coord, gg>