options(htmltools.dir.version = FALSE) knitr::opts_chunk$set( warning = FALSE, message = FALSE, fig.showtext = TRUE ) library(officedown) library(unhcrthemes) library(ggplot2) library(rvg) library(tidyverse) library(scales) library(lubridate) library(fontawesome) # fa_metadata() ## make sure to get last version of the data if ( packageVersion("ForcedDisplacementStat") != "0.0.1"){pak::pkg_install("edouard-legoupil/ForcedDisplacementStat")} library(ForcedDisplacementStat) ## make sure to get last version of the chart library if ( packageVersion("unhcrdatapackage") != "0.1.8"){pak::pkg_install("edouard-legoupil/unhcrdatapackage")} library(unhcrdatapackage) # turn off the automatic use of showtext functionality, so that the dml function can works properly showtext::showtext_auto(FALSE)
... describes the ability to read, analyze, and argue with data.
“Numbers have an important story to tell. They rely on YOU to give them a voice!”
-- Stephen Few
plot_ctr_keyfig(year = params$year, country_asylum_iso3c = params$country)
plot_ctr_treemap(year = params$year, country_asylum_iso3c = params$country, pop_type = c("REF", "ASY", "DIP","OOC", "STA", "OIP") )
## How the different Categories of Population of concern to UNHCR are evolving over time? # According to official information provided by government authorities, as of December `r params$year`, the population of interest to UNHCR in `r params$country` reached `r format(round(total_poc, 0), big.mark=",")` people. Compared to `r as.numeric(params$year)-1`, the total population `r ifelse(perc_change_poc>0, paste0("has increased ", format(round(perc_change_poc, 1), big.mark=","), "% during the year"), ifelse(perc_change_poc<0, paste0("has decreased ", format(round(perc_change_poc, 1), big.mark=","), "% during the year"), "has not changed"))`. Moreover, there was a `r format(round(perc_change_asy_ref, 0), big.mark=",")`% `r ifelse(perc_change_asy_ref>0, "growth", ifelse(perc_change_asy_ref<0, "drop","change"))` of refugees and asylum seekers in the country. plot_ctr_population_type_per_year(year = 2022, lag = 5, country_asylum_iso3c = params$country, pop_type = c("REF", "ASY", "OIP", "OOC", "STA", "IDP" ))
## What are the main countries of Origin of Forced Displacement across Borders? # # text <- The three main countries of origin for Refugees were `r top_ref[1,1]` (`r top_ref[1,3]` of the total refugee population), `r top_ref[2,1]` (`r top_ref[2,3]` of the total refugee population) and `r top_ref[3,1]` (`r top_ref[3,3]` of the total refugee population). Regarding the asylum-seeker population, the three main countries of origin for asylum-seekers were `r top_asy[1,1]` (`r top_asy[1,3]` of the total asylum-seekers population), `r top_asy[2,1]` (`r top_asy[2,3]` of the total asylum-seekers population) and `r top_asy[3,1]` (`r top_asy[3,3]` of the total asylum-seekers population). ### Refugees plot_ctr_population_type_abs(year = params$year, country_asylum_iso3c = params$country, top_n_countries = 9, pop_type = "REF" ) + labs(title = paste0("Refugees: Main Countries of origin | ", params$year))
# plot_ctr_origin_history(year = params$year, country_asylum_iso3c = params$country, lag = 5, pop_type = c("REF", "ASY", "OIP", "IDP" ), otherprop = .02)
### Asylum Seekers plot_ctr_population_type_abs(year = params$year, country_asylum_iso3c = params$country, top_n_countries = 9, pop_type = "ASY" ) + labs(title = paste0("Asylum-seekers: Main Countries of origin | ", params$year))
plot_ctr_diff_in_pop_groups(year = params$year, country_asylum_iso3c = params$country, pop_type = c("REF", "ASY") )
plot_ctr_pyramid(year = params$year, country_asylum_iso3c = params$country, pop_type = c( "REF") )
plot_ctr_pyramid(year = params$year, country_asylum_iso3c = params$country, pop_type = c( "ASY") )
plot_ctr_location(year = params$year, country_asylum_iso3c = params$country, pop_type = c("ASY", "REF", "OIP"), mapbackground = "osm" # could be "stamen-toner" , "stamen-terrain","stamen-watercolor" )
plot_ctr_recognition(year = params$year, country_asylum_iso3c = params$country, top_n_countries = 10, measure = "RefugeeRecognitionRate", order_by = "TotalDecided" )
plot_ctr_recognition(year = params$year, country_asylum_iso3c = params$country, top_n_countries = 10, measure = "TotalRecognitionRate", order_by = "Recognized" )
plot_ctr_asylum(year = params$year, country_asylum_iso3c = params$country, lag = 10)
plot_ctr_process(year = params$year, country_asylum_iso3c = params$country)
plot_ctr_processing_time(year = params$year, country_asylum_iso3c = params$country)
plot_ctr_solution(year = params$year, country_asylum_iso3c = params$country, pop_type = c("REF", "ASY"))
## What are the main countries of Destination of Asylum of Forced Displacement across Borders? plot_ctr_destination(year = params$year, country_origin_iso3c = params$country, pop_type = c("REF", "ASY") )
plot_ctr_origin_recognition(year = params$year, country_origin_iso3c = params$country, top_n_countries = 10, measure = "RefugeeRecognitionRate", order_by = "TotalDecided" )
plot_ctr_origin_recognition(year = params$year, country_origin_iso3c = params$country, top_n_countries = 10, measure = "TotalRecognitionRate", order_by = "Recognized" )
plot_ctr_disp_migrant(year = params$year, country_asylum_iso3c = params$country )
The charts from this slide deck constitute a chart library can be used and re-used in reports, talking points and social medias. The charts are in vector formats and can be easily imported in specialized publication software (like Adobe, Publisher or Inkscape).
You may enhance the charts story-telling ability by adjusting the message in the title, highlighting specific parts of the data or adding annotation to ease interpretation or provide more contextual background.
You can contribute to this data literacy product by reporting potential issues you may have detected, asking questions or sharing ideas for new charts to be included.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.