long_data <- readxl::read_excel("AVRR_long_data.xlsx")
names(long_data)[1] = "Country_of_departure"
names(long_data)[2] = "Country_of_origin"
long_data$Country_of_departure = as_factor(long_data$Country_of_departure)
long_data$Country_of_origin = as_factor(long_data$Country_of_origin)
long_data$Month = as_factor(long_data$Month)
long_data %>%
mutate(Value = 1,
Sorted_months = fct_inorder(Month))%>%
group_by(Sorted_months,Country_of_departure)%>%
dplyr::summarise(total_value = sum(Value))%>%
filter(Country_of_departure != "Albania" & Country_of_departure != "Kosovo*")%>%
ggplot(aes(factor(Sorted_months,levels = c("January","February","March", "April", "May", "June", "July", "August", "September", "October", "November", "December")), total_value,group = Country_of_departure))+
geom_line(aes(color = Country_of_departure))+
ylim(0,54)+
theme_classic()+
theme(legend.title = element_blank(),
legend.position = "top",
legend.box = "horizontal",
legend.box.just = "left",
axis.text.x = element_text(angle = 90,hjust = 1,vjust = 0.4,size = 10))+
ylab("")+
xlab("")+
guides(fill = guide_legend(nrow = 1))
