Created
August 10, 2021 14:20
-
-
Save dickoa/5488e786c658009e436a0c6c2779c8d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
year | poc | n | |
---|---|---|---|
2010 | Internally displaced persons | 25 | |
2010 | UNRWA refugees | 4.7 | |
2010 | UNHCR refugees | 10.5 | |
2010 | Asylum-seekers | 0.8 | |
2010 | Venezuelans displaced abroad | 0 | |
2011 | Internally displaced persons | 22.4 | |
2011 | UNRWA refugees | 4.8 | |
2011 | UNHCR refugees | 10.4 | |
2011 | Asylum-seekers | 0.9 | |
2011 | Venezuelans displaced abroad | 0 | |
2012 | Internally displaced persons | 26.4 | |
2012 | UNRWA refugees | 4.9 | |
2012 | UNHCR refugees | 10.5 | |
2012 | Asylum-seekers | 0.9 | |
2012 | Venezuelans displaced abroad | 0 | |
2013 | Internally displaced persons | 33.3 | |
2013 | UNRWA refugees | 5 | |
2013 | UNHCR refugees | 11.7 | |
2013 | Asylum-seekers | 1.2 | |
2013 | Venezuelans displaced abroad | 0 | |
2014 | Internally displaced persons | 37.9 | |
2014 | UNRWA refugees | 5.1 | |
2014 | UNHCR refugees | 14.4 | |
2014 | Asylum-seekers | 1.8 | |
2014 | Venezuelans displaced abroad | 0 | |
2015 | Internally displaced persons | 40.5 | |
2015 | UNRWA refugees | 5.2 | |
2015 | UNHCR refugees | 16.1 | |
2015 | Asylum-seekers | 3.2 | |
2015 | Venezuelans displaced abroad | 0 | |
2016 | Internally displaced persons | 40.3 | |
2016 | UNRWA refugees | 5.3 | |
2016 | UNHCR refugees | 17.2 | |
2016 | Asylum-seekers | 2.7 | |
2016 | Venezuelans displaced abroad | 0 | |
2017 | Internally displaced persons | 40 | |
2017 | UNRWA refugees | 5.4 | |
2017 | UNHCR refugees | 19.9 | |
2017 | Asylum-seekers | 3.1 | |
2017 | Venezuelans displaced abroad | 0 | |
2018 | Internally displaced persons | 41.3 | |
2018 | UNRWA refugees | 5.5 | |
2018 | UNHCR refugees | 20.4 | |
2018 | Asylum-seekers | 3.5 | |
2018 | Venezuelans displaced abroad | 0 | |
2019 | Internally displaced persons | 45.7 | |
2019 | UNRWA refugees | 5.6 | |
2019 | UNHCR refugees | 20.4 | |
2019 | Asylum-seekers | 4.1 | |
2019 | Venezuelans displaced abroad | 3.6 | |
2020 | Internally displaced persons | 48 | |
2020 | UNRWA refugees | 5.7 | |
2020 | UNHCR refugees | 20.7 | |
2020 | Asylum-seekers | 4.2 | |
2020 | Venezuelans displaced abroad | 3.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(unhcrthemes) | |
sheet1 <- read_csv("sheet1.csv") | |
ggplot(sheet1, aes(year, n, fill = poc)) + | |
geom_col(width = 0.7) + | |
scale_x_continuous(labels = ~ paste0("'", substr(.x, start = 3, stop = 4)), | |
breaks = 2010:2020) + | |
scale_y_continuous(expand = c(0, 0), | |
limits = c(0, NA)) + | |
labs(title = "Title should be short with the firs word capitalized | 2010-2020", | |
subtitle = "Subtitle should also be short with the first world capitalized", | |
x = "X-axis title", | |
y = "Y-axis title", | |
caption = "Source: here is the data source\n\U00A9 UNHCR, the UN refugee agency") + | |
scale_fill_manual("", | |
values = c(`Internally displaced persons` = "#00B398", | |
`UNRWA refugees` = "#338EC9", | |
`UNHCR refugees` = "#0072BC", | |
`Asylum-seekers` = "#18375F", | |
`Venezuelans displaced abroad` = "#EF4A60")) + | |
unhcrthemes::theme_unhcr(grid = "Y") + | |
theme(axis.line.x = element_line(colour = "#1A1A1A", size = 0.75), | |
plot.title.position = "plot", | |
plot.caption.position = "plot", | |
legend.justification = "left") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment