I have the following dataset in tidy format. I would like to create a ggplot
the Reserves (NAD)
variable as a geom_bar
(with the scale on the left axis) and the Reserves (USD)
variable as a geom_line
(with the scale on the right axis). What's the easiest way to plot both on the same chart?
structure(list(Date = structure(c(18170, 18201, 18231, 18262,
18293, 18322, 18353, 18383, 18414, 18444, 18475, 18506, 18536,
18170, 18201, 18231, 18262, 18293, 18322, 18353, 18383, 18414,
18444, 18475, 18506, 18536), class = "Date"), Key = c("Reserves (NAD)",
"Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)",
"Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)",
"Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)", "Reserves (NAD)",
"Reserves (USD)", "Reserves (USD)", "Reserves (USD)", "Reserves (USD)",
"Reserves (USD)", "Reserves (USD)", "Reserves (USD)", "Reserves (USD)",
"Reserves (USD)", "Reserves (USD)", "Reserves (USD)", "Reserves (USD)",
"Reserves (USD)"), Value = c(32469.69683154, 29752.37718804,
28940.88482301, 30961.07351507, 32168.72169411, 32973.94333811,
35659.4389906, 32944.455576, 31758.97192528, 35399.5709836, 33387.0647566,
32665.79275848, 34353.83925875, 2150.23984845138, 2030.39391190091,
2067.39803146078, 2062.61398712044, 2052.95138288458, 1846.74175243683,
1924.51004045528, 1877.39090357876, 1833.55302380232, 2081.25035179437,
1971.35496109494, 1952.07290341642, 2114.88932754343)), row.names = c(NA,
-26L), class = c("tbl_df", "tbl", "data.frame"))