
Generate an html / pdf country factsheet
Source:R/template_ctryfactsheet.R
template_CtryFactsheet.RdThis functions provides a quick access to a basic Statistical Fact sheet template that can be customised according to the needs
Examples
## generate for one country
# template_CtryFactsheet(year = 2024, country_asylum_iso3c = "USA", folder = "Report")
# ## Generate for a specific region
# region <- "Americas"
# year <- 2024
# library(tidyverse)
# ## get all countries with more than 1000 Reported individuals
# ctr <- refugees::population |>
# filter(year == year &
# coa_region == region ) |>
# group_by( coa_name, coa_iso ) |>
# summarise(Value = sum(refugees, asylum_seekers, idps, oip, stateless, others_of_concern, na.rm=TRUE) ) |>
# ungroup() |>
# filter( Value > 1000 )
#
# for ( i in (1:nrow(ctr))) {
# # i <- 1
# country_asylum_iso3ci = as.character(ctr[i ,2 ])
# cat(paste0(country_asylum_iso3ci, "\n"))
# unhcrviz::template_CtryFactsheet(year = 2024,
# country_asylum_iso3c = country_asylum_iso3ci,
# folder = "Report") }