unhcr ts data

This commit is contained in:
pvictor 2019-09-05 10:48:34 +02:00
parent b03db0e367
commit 3ed4f46957
4 changed files with 55 additions and 0 deletions

View File

@ -16,3 +16,18 @@
"unhcr_popstats_2017"
#' UNHCR data by continent of origin
#'
#' The dataset contains data about UNHCR's populations of concern summarised by continent of orginin.
#'
#' @format A data frame with 913 observations on the following 4 variables.
#' \describe{
#' \item{\code{year}}{Year concerned.}
#' \item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees,
#' Returned IDPs, Stateless persons, Others of concern.}
#' \item{\code{continent_origin}}{Continent of residence of population.}
#' \item{\code{n}}{Number of people concerned.}
#' }
#' @source UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview})
"unhcr_ts"

View File

@ -163,6 +163,22 @@ unhcr_popstats <- merge(
# Timeserie by continent --------------------------------------------------
unhcr_ts <- unhcr_popstats[!is.na(continent_origin), list(
n = sum(value, na.rm = TRUE)
), by = list(year, population_type, continent_origin)]
setorder(unhcr_ts, continent_origin, population_type, year)
unhcr_ts <- as.data.frame(unhcr_ts)
usethis::use_data(unhcr_ts, overwrite = TRUE)
# Use data 2017 -----------------------------------------------------------

BIN
data/unhcr_ts.rda Normal file

Binary file not shown.

24
man/unhcr_ts.Rd Normal file
View File

@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{unhcr_ts}
\alias{unhcr_ts}
\title{UNHCR data by continent of origin}
\format{A data frame with 913 observations on the following 4 variables.
\describe{
\item{\code{year}}{Year concerned.}
\item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees,
Returned IDPs, Stateless persons, Others of concern.}
\item{\code{continent_origin}}{Continent of residence of population.}
\item{\code{n}}{Number of people concerned.}
}}
\source{
UNHCR (The UN Refugee Agency) (\url{http://popstats.unhcr.org/en/overview})
}
\usage{
unhcr_ts
}
\description{
The dataset contains data about UNHCR's populations of concern summarised by continent of orginin.
}
\keyword{datasets}