Skip to content

Commit

Permalink
version 2022.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisham Galal authored and cran-robot committed Jul 8, 2023
0 parents commit 2ec1899
Show file tree
Hide file tree
Showing 40 changed files with 1,163 additions and 0 deletions.
42 changes: 42 additions & 0 deletions DESCRIPTION
@@ -0,0 +1,42 @@
Package: refugees
Type: Package
Title: UNHCR Refugee Population Statistics Database
Version: 2022.12.0
Authors@R: c(person(given = "Hisham",
family = "Galal",
email = "galal@unhcr.org",
role = c("aut", "cre")),
person(given = "Ahmadou",
family = "Dicko",
email = "mail@ahmadoudicko.com",
role = "ctb"),
person("UNHCR",
role = "cph"))
Description: The Refugee Population Statistics Database published by
The Office of The United Nations High Commissioner for Refugees (UNHCR)
contains information about forcibly displaced populations
spanning more than 70 years of statistical activities.
It covers displaced populations such as refugees, asylum-seekers and
internally displaced people, including their demographics.
Stateless people are also included, most of who have never been displaced.
The database also reflects the different types of solutions
for displaced populations such as repatriation or resettlement.
More information on the data and methodology can be found on
the UNHCR Refugee Data Finder <https://www.unhcr.org/refugee-statistics/>.
License: CC BY 4.0
LazyData: true
LazyDataCompression: xz
Depends: R (>= 3.5)
Imports: tibble (>= 3.2.0)
Suggests: testthat (>= 3.1.0)
RoxygenNote: 7.2.3
Encoding: UTF-8
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2023-07-07 22:25:57 UTC; GALAL
Author: Hisham Galal [aut, cre],
Ahmadou Dicko [ctb],
UNHCR [cph]
Maintainer: Hisham Galal <galal@unhcr.org>
Repository: CRAN
Date/Publication: 2023-07-08 09:50:03 UTC
39 changes: 39 additions & 0 deletions MD5
@@ -0,0 +1,39 @@
66ee3cf1f00171386327ceef8b41a601 *DESCRIPTION
57e9c39851a3f2b6dcc98fbd05384f3d *NAMESPACE
73981d60f6a1223ab6322aba77495a9c *R/countries.R
c5a360958b6ebc318d31251e06e3d1a3 *R/displaced-package.R
e2152ef27f1be48fef591736fce59c08 *R/flows.R
e8f5e265dac29ac8469256e59cb1e064 *R/rdf.R
0e192630ace7cc75ac0c608d034b90b3 *README.md
4dd2daf04c4b33abea8962eb69e04d83 *data/asylum_applications.rda
668f0db36c33eb85e024b3d211d08c10 *data/asylum_decisions.rda
089a81e4bed332a9a5e715f2ec3ed4ce *data/countries.rda
deb183500ecb3ab8140a02acc4950dcf *data/demographics.rda
855c1f7a09e464ba950c99791e46fa0a *data/flows.rda
93df43bca76a34ce3c38b410b39ea210 *data/idmc.rda
d54a58b2ccdc07ca3f457e1046076f9b *data/population.rda
820645b7aa999483c7c5f0b471a42fd9 *data/solutions.rda
609efd75ad47772c635b43e8d3c2c473 *data/unrwa.rda
dd94538f2889f790189cecea1822d68a *man/asylum_applications.Rd
67798ab911654fcc80a5fa7941baa03f *man/asylum_decisions.Rd
dd766dd2596acaedde625a97a8fc2fcc *man/countries.Rd
7c7786baa8ef2c6a8356fa61f149dfd0 *man/demographics.Rd
1b6bf06ac597e8468c54029b55780e46 *man/figures/README-unnamed-chunk-4-1.png
1b6bf06ac597e8468c54029b55780e46 *man/figures/README-unnamed-chunk-5-1.png
d6edf0e362d8a1ea74222579ef29b210 *man/figures/README-unnamed-chunk-6-1.png
e2b116d2deb1ed3908650903c19beb1e *man/flows.Rd
03f7f5b1f2633cf617a3371665d215cd *man/idmc.Rd
2c6da89031396d841eb91563ea6c08b3 *man/population.Rd
f5e4a310991fe8fcffcfd6e6c6ca7a32 *man/refugees-package.Rd
a84d2e8bedc2633a9c32042b7b87cf4f *man/solutions.Rd
46f66bf5d6eee083349ef6edb7ae0d60 *man/unrwa.Rd
c611b204a28abef8e638d01d450f3b4c *tests/testthat.R
4def2d69519ff00d7a9df9b61a18ff3f *tests/testthat/test-asylum_applications.R
cbe890451a0fe7d050f98d4bcd3066da *tests/testthat/test-asylum_decisions.R
43b78ce068c85bb29f8b6c5f8a45f69f *tests/testthat/test-countries.R
059dc026f41875d28545a6403633c955 *tests/testthat/test-demographics.R
426386d999cb9406d4afb0514b17c2eb *tests/testthat/test-flows.R
06f17fb9c05fb89ddac16d5ec81f6ad1 *tests/testthat/test-idmc.R
c9b25b6c9657197e882c5139b65461df *tests/testthat/test-population.R
c19d89bbc0ee20c0633404ffe0371106 *tests/testthat/test-solutions.R
bc8b87e72013a584b2a1d869d03fde14 *tests/testthat/test-unrwa.R
3 changes: 3 additions & 0 deletions NAMESPACE
@@ -0,0 +1,3 @@
# Generated by roxygen2: do not edit by hand

importFrom(tibble,tibble)
19 changes: 19 additions & 0 deletions R/countries.R
@@ -0,0 +1,19 @@
#' Countries
#'
#' Country codes, names, UN major areas and UNHCR regional bureaux/operations.
#'
#' @format A tibble.
#' \describe{
#' \item{iso_code}{ISO3 Country code.}
#' \item{unhcr_code}{UNHCR Country code.}
#' \item{name}{UNSD Name.}
#' \item{unhcr_region}{UNHCR Region name.}
#' \item{unsd_region}{UNSD Region name.}
#' \item{unsd_subregion}{UNSD Sub-region name.}
#' \item{unsd_imregion}{SDG Region name.}
#' \item{sdg_region}{SDG Region name.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' countries
"countries"
7 changes: 7 additions & 0 deletions R/displaced-package.R
@@ -0,0 +1,7 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
#' @importFrom tibble tibble
## usethis namespace: end
NULL
33 changes: 33 additions & 0 deletions R/flows.R
@@ -0,0 +1,33 @@
#' Forced displacement flow dataset
#'
#' UNHCR has published a new dataset recording the number of people forced to flee
#' during each of the years since 1962. This dataset presents the forced displacement flows.
#'
#' See the notes on the curation process in the
#' \href{https://www.unhcr.org/refugee-statistics/insights/explainers/forcibly-displaced-flow-data.html}{Data Insights}
#' for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{refugees}{Refugee Arrivals: includes prima facie (group recognition) refugees
#' and those who have received temporary protection. The first available data for this
#' group is for 1962. People in refugee-like situations are also included from 2007.}
#' \item{asylum_seekers}{New Asylum Applications: are new asylum applications registered
#' during each year. Repeat and appeal applications have been excluded.
#' The first year that published data for this population group became available is 1970
#' and only for a limited number of high-income countries, with data from more countries available from 2000.}
#' \item{returned_refugees}{Refugees who have returned home within the previous year.}
#' \item{oip}{Other people in need of international protection:
#' includes just the new arrivals of this population group, first reported in 2018.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' flows
"flows"
220 changes: 220 additions & 0 deletions R/rdf.R
@@ -0,0 +1,220 @@
#' Population figures
#'
#' UNHCR data on displacement at the end of the year.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{refugees}{The number of refugees.}
#' \item{asylum_seekers}{The number of asylum-seekers.}
#' \item{returned_refugees}{The number of returned refugees.}
#' \item{idps}{The number of internally displaced persons.}
#' \item{returned_idps}{The number of returned internally displaced persons.}
#' \item{stateless}{The number of stateless persons.}
#' \item{ooc}{The number of others of concern to UNHCR.}
#' \item{oip}{The number of other people in need of international protection.}
#' \item{hst}{The number of host community members.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' population
"population"

#' Demographics
#'
#' Demographic and sub-national data, where such disaggregation is available.
#' UNHCR collects this information for all population types, as well as two durable solutions (returned IDPs and refugees).
#' Demographics are also available for IDMC and UNRWA datasets.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{pop_type}{The three character code specifying the population type (e.g. \code{REF} for refugees, \code{ASY} for asylum-seekers etc).}
#' \item{location}{The textual description of the location.}
#' \item{loc_type}{An indication of whether the location is urban or rural. An urban location is classified as a settlement with more than 5,000 inhabitants. It can be one of the following values: \code{C} – Camp. Note that \code{C} was discontinued after 2010, at which point the accommodation type became available, \code{U} – Urban, \code{R} – Rural, \code{V} - Various/unknown}
#' \item{acc_type}{Accommodation Type became available in 2010 but is only populated from 2012. The code represents one of: \code{I} - Individual accommodation, \code{S} - Self-settled camp, \code{P} - Planned/managed camp, \code{C} - Collective centre, \code{R} - Reception/transit camp, \code{U} - Undefined}
#' \item{f_0_4}{The number of female children aged 0 to 4 inclusive.}
#' \item{f_5_11}{The number of female children aged 5 to 11 inclusive.}
#' \item{f_12_17}{The number of female children aged 12 to 17 inclusive.}
#' \item{f_18_59}{The number of female adults aged 18 to 59 inclusive.}
#' \item{f_60}{The number of female adults aged 60 or more.}
#' \item{f_other}{The number of females for whom age disaggregation is unavailable.}
#' \item{f_total}{The total number of females (where disaggregation by sex is available).}
#' \item{m_0_4}{The number of male children aged 0 to 4 inclusive.}
#' \item{m_5_11}{The number of male children aged 5 to 11 inclusive.}
#' \item{m_12_17}{The number of male children aged 12 to 17 inclusive.}
#' \item{m_18_59}{The number of male adults aged 18 to 59 inclusive.}
#' \item{m_60}{The number of male adults aged 60 or more.}
#' \item{m_other}{The number of males for whom age disaggregation is unavailable.}
#' \item{m_total}{The total number of males (where disaggregation by sex is available).}
#' \item{total}{The total number of persons.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' demographics
"demographics"

#' Asylum Applications
#'
#' Asylum claims submitted by year and countries of asylum and origin.
#' Claims are submitted by asylum applicants and are applications for international protection.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{procedure_type}{The procedure type describes the authority with whom the asylum claim was lodged.
#' It can be one of: \code{G} – Government, \code{J} - Joint, \code{U} – UNHCR.}
#' \item{app_type}{The application type describes the stage of the procedure.
#' Common values are \code{N} (New), \code{R} (Repeat) and \code{A} (Appeal).}
#' \item{dec_level}{The decision level provides more detail of the stage of the procedure.
#' Common values are \code{NA} (New applications), \code{RA} (repeat/reopened applications) and
#' \code{AR} (administrative review).}
#' \item{app_pc}{The data type describes whether the data provided reflects cases or persons.
#' The most common situation is for the data on asylum applications lodged to reflect persons,
#' but in certain situations (e.g USA), the data provided by governments is at the level of cases.
#' A case can contain information on one or more persons.}
#' \item{applied}{The total number of asylum claims for the given dataset.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' asylum_applications
"asylum_applications"

#' Asylum Decisions
#'
#' Decisions taken on asylum claims by year and countries of asylum and origin.
#' Asylum claims are applications for international protection and
#' decisions on asylum claims can be positive, negative or otherwise closed.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{procedure_type}{The procedure type describes the authority with whom the asylum claim was lodged.
#' It can be one of: \code{G} – Government, \code{J} - Joint, \code{U} – UNHCR.}
#' \item{dec_level}{The decision level provides more detail of the stage of the procedure.
#' Common values are \code{NA} (New applications), \code{RA} (repeat/reopened applications) and
#' \code{AR} (administrative review).}
#' \item{dec_pc}{The data type describes whether the data provided reflects cases or persons.
#' The most common situation is for the data on asylum applications lodged to reflect persons,
#' but in certain situations (e.g USA), the data provided by governments is at the level of cases.
#' A case can contain information on one or more persons.}
#' \item{dec_recognized}{The number of asylum applicants recognised as refugees under UNHCR’s mandate.}
#' \item{dec_other}{The number of asylum applicants recognised as refugees under other forms of complementary protection.}
#' \item{dec_rejected}{The number of asylum applicants whose asylum claims have been rejected.}
#' \item{dec_closed}{The number of asylum applicants whose asylum claims have been otherwise closed.}
#' \item{dec_total}{The total number of asylum applicants for which a decision on their asylum claim
#' has been made in the given reference period.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' asylum_decisions
"asylum_decisions"

#' Solutions
#'
#' Data on solutions record those refugees and IDPs that have availed a durable solution.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{returned_refugees}{The number of refugee returnees.}
#' \item{resettlement}{The number of resettlement arrivals.}
#' \item{naturalisation}{The number of refugees that have naturalised.}
#' \item{returned_idps}{The number of IDP returnees.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' solutions
"solutions"

#' IDMC Data
#'
#' Data on Internally displaced persons due to conflict and violence
#' that is produced by the \href{https://www.internal-displacement.org/}{Internal Displacement Monitoring Centre}.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{total}{The total number of internally displaced persons due to conflict and violence.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' idmc
"idmc"

#' UNRWA data
#'
#' Data on Palestine refugees registered under \href{https://www.unrwa.org/}{UNRWA}’s mandate.
#'
#' See the notes on the data structure in the
#' \href{https://www.unhcr.org/refugee-statistics/methodology/}{methodology pages} for more details.
#'
#' @format A tibble.
#' \describe{
#' \item{year}{The year (e.g. 2020).}
#' \item{coo_name}{Country of origin name.}
#' \item{coo}{Country of origin UNHCR code.}
#' \item{coo_iso}{Country of origin ISO code.}
#' \item{coa_name}{Country of asylum name.}
#' \item{coa}{Country of asylum UNHCR code.}
#' \item{coa_iso}{Country of asylum ISO code.}
#' \item{total}{The total number of Palestine refugees registered under UNRWA’s mandate.}
#' }
#' @source \href{https://www.unhcr.org/refugee-statistics/}{UNHCR Refugee Data Finder}.
#' @examples
#' unrwa
"unrwa"

0 comments on commit 2ec1899

Please sign in to comment.