#Make plot
ggplot(data, aes(x = reorder(CountryAsylumName, Value2), ## Reordering country by Value
y = Value2)) +
geom_bar(stat = "identity",
position = "identity",
fill = "#0072bc") + # here we configure that it will be bar chart+
geom_label(aes(x = CountryAsylumName, y = Value2,
label = format(round(Value2, -3), big.mark=",")),
hjust = 1,
vjust = 0.5,
colour = "white",
fill = NA,
label.size = NA,
family = "Lato",
size = 6) +
geom_hline(yintercept = 0, size = 1, colour = "#333333") +
coord_flip() + # Add `coord_flip()` to make your vertical bars horizontal:
## and the chart labels
labs(title = "Turkey is by the far the biggest Refugee hosting country",
subtitle = paste0("Top 10 Refugee Population per country in ",lastyear),
x = "",
y = "",
caption = "UNHCR https://www.unhcr.org/refugee-statistics/") +
scale_y_continuous( label = scales::label_number_si()) + ## Format axis number
geom_hline(yintercept = 0, size = 1.1, colour = "#333333") +
unhcRstyle::unhcr_theme(base_size = 8) + ## Insert UNHCR Style
theme(panel.grid.major.x = element_line(color = "#cbcbcb"),
panel.grid.major.y = element_blank()) ### changing grid line that should appear