Sorry but it dos not work and I don't know what to do, I write the following code
library(readr)
test <- read_csv("test.csv")
View(test)
sample_df <- data.frame(
stringsAsFactors = FALSE,
Country = c(test$Country)
Periods= c(test$Periods)
Value= c(test$Value)
ggplot(sample_df, aes(x = Country, y = Value, fill = Periods)) +
geom_col(position = "dodge")
There are 5 more countries I also tried this way
sample_df <- data.frame(
stringsAsFactors = FALSE,
Country = c("US","US","US","US","US",
"UK","UK","UK","UK","UK",
"FR","FR","FR","FR","FR",
"DE","DE","DE","DE","DE",
"JP","JP","JP","JP","JP"),
Periods = c("Gold Standard 1881-1913",
"Interwar 1919-1938","Bretton Woods 1946-1970",
"Floating Exchange 1974-1989","Floating Exchange 1990-2019",
"Gold Standard 1881-1913","Interwar 1919-1938",
"Bretton Woods 1946-1970","Floating Exchange 1974-1989",
"Floating Exchange 1990-2019",
"Gold Standard 1881-1913",
"Interwar 1919-1938","Bretton Woods 1946-1970",
"Floating Exchange 1974-1989","Floating Exchange 1990-2019",
"Gold Standard 1881-1913",
"Interwar 1919-1938","Bretton Woods 1946-1970",
"Floating Exchange 1974-1989","Floating Exchange 1990-2019",
"Gold Standard 1881-1913",
"Interwar 1919-1938","Bretton Woods 1946-1970",
"Floating Exchange 1974-1989","Floating Exchange 1990-2019",),
Value = c(0.3, -1.8, 2.4, 5.6, 2.4, 0.3, -1.5, 3.7 , 9.4, 2.5, 0, 2.2, 5.6, 8.8, 1.6, 0.6,-2.1,2.7,2.6,1.8,4.6,-1.9,4.5,4.2,0.5))
Relevant code
ggplot(sample_df, aes(x = Country, y = Value, fill = Periods)) +
geom_col(position = "dodge")