removed unhcr_popstats_2017 dataset because of annoying note

This commit is contained in:
pvictor 2021-11-29 20:04:50 +01:00
parent 4f4142211b
commit dddd472c1f
5 changed files with 51 additions and 88 deletions

View File

@ -1,20 +1,3 @@
#' UNHCR data for 2017
#'
#' The dataset contains data about UNHCR's populations of concern for the year 2017.
#'
#' @format A data frame with 11237 observations and the following 6 variables:
#' \describe{
#' \item{\code{country_origin}}{Country of origin of population}
#' \item{\code{country_residence}}{Country / territory of asylum/residence of population}
#' \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{value}}{Number of people concerned}
#' \item{\code{continent_residence}}{Continent of origin of population}
#' \item{\code{continent_origin}}{Continent of residence of population}
#' }
#' @source UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/})
"unhcr_popstats_2017"
#' UNHCR data by continent of origin #' UNHCR data by continent of origin
#' #'
@ -24,7 +7,7 @@
#' \describe{ #' \describe{
#' \item{\code{year}}{Year concerned.} #' \item{\code{year}}{Year concerned.}
#' \item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees, #' \item{\code{population_type}}{Populations of concern : Refugees, Asylum-seekers, Internally displaced persons (IDPs), Returned refugees,
#' Returned IDPs, Stateless persons, Others of concern.} #' Returned IDPs, Stateless persons, Others of concern.}
#' \item{\code{continent_origin}}{Continent of residence of population.} #' \item{\code{continent_origin}}{Continent of residence of population.}
#' \item{\code{n}}{Number of people concerned.} #' \item{\code{n}}{Number of people concerned.}
#' } #' }
@ -40,7 +23,7 @@
#' @format A data frame with 120 observations and the following 3 variables: #' @format A data frame with 120 observations and the following 3 variables:
#' \describe{ #' \describe{
#' \item{\code{date}}{date.} #' \item{\code{date}}{date.}
#' \item{\code{type}}{Type of data : realized or forecast.} #' \item{\code{type}}{Type of data : realized or forecast.}
#' \item{\code{value}}{Value in giga-watt per hour.} #' \item{\code{value}}{Value in giga-watt per hour.}
#' } #' }
#' @source Rte (Electricity Transmission Network in France) (\url{https://data.rte-france.com/}) #' @source Rte (Electricity Transmission Network in France) (\url{https://data.rte-france.com/})
@ -53,7 +36,7 @@
#' @format A data frame with 60 observations and the following 5 variables: #' @format A data frame with 60 observations and the following 5 variables:
#' \describe{ #' \describe{
#' \item{\code{datetime}}{Timestamp.} #' \item{\code{datetime}}{Timestamp.}
#' \item{\code{open}}{Open value.} #' \item{\code{open}}{Open value.}
#' \item{\code{high}}{Highest value.} #' \item{\code{high}}{Highest value.}
#' \item{\code{low}}{Lowest value.} #' \item{\code{low}}{Lowest value.}
#' \item{\code{close}}{Close value.} #' \item{\code{close}}{Close value.}
@ -63,14 +46,14 @@
#' @title Paris Climate #' @title Paris Climate
#' #'
#' @description Average temperature and precipitation in Paris for the period 1971-2000. #' @description Average temperature and precipitation in Paris for the period 1971-2000.
#' #'
#' #'
#' @format A data frame with 12 observations and the following 3 variables: #' @format A data frame with 12 observations and the following 3 variables:
#' \describe{ #' \describe{
#' \item{\code{month}}{Month} #' \item{\code{month}}{Month}
#' \item{\code{temperature}}{Temperature (in degree celsius).} #' \item{\code{temperature}}{Temperature (in degree celsius).}
#' \item{\code{precipitation}}{Precipitation (in mm).} #' \item{\code{precipitation}}{Precipitation (in mm).}
#' } #' }
#' @source Wikipedia (\url{https://fr.wikipedia.org/wiki/Climat_de_Paris}) #' @source Wikipedia (\url{https://fr.wikipedia.org/wiki/Climat_de_Paris})

Binary file not shown.

View File

@ -2,34 +2,38 @@
library(apexcharter) library(apexcharter)
# On a column chart # On a column chart
apex( unhcr_ts %>%
data = table(unhcr_popstats_2017$continent_residence), subset(year == 2017 & population_type == "Asylum-seekers") %>%
aes(Var1, Freq), apex(
"column" aes(continent_origin, n),
) %>% "column"
add_hline(value = 2100) ) %>%
add_hline(value = 5e5)
# On a scatter chart # On a scatter chart
apex( apex(
data = iris, data = cars,
aes(Sepal.Length, Sepal.Width), aes(speed, dist),
"scatter" "scatter"
) %>% ) %>%
add_hline(value = mean(iris$Sepal.Width)) %>% add_hline(value = mean(cars$dist)) %>%
add_vline(value = mean(iris$Sepal.Length)) add_vline(value = mean(cars$speed))
# With labels # With labels
apex( apex(
data = iris, data = cars,
aes(Sepal.Length, Sepal.Width), aes(speed, dist),
"scatter" "scatter"
) %>% ) %>%
add_hline( add_hline(
value = mean(iris$Sepal.Width), value = mean(cars$dist),
label = "Mean of Sepal.Width" label = "Mean of dist"
) %>% ) %>%
add_vline( add_vline(
value = mean(iris$Sepal.Length), value = mean(cars$speed),
label = "Mean of Sepal.Length" label = label(
text = "Mean of speed",
borderColor = "red"
)
) )

View File

@ -38,35 +38,39 @@ Add horizontal or vertical line
library(apexcharter) library(apexcharter)
# On a column chart # On a column chart
apex( unhcr_ts \%>\%
data = table(unhcr_popstats_2017$continent_residence), subset(year == 2017 & population_type == "Asylum-seekers") \%>\%
aes(Var1, Freq), apex(
"column" aes(continent_origin, n),
) \%>\% "column"
add_hline(value = 2100) ) \%>\%
add_hline(value = 5e5)
# On a scatter chart # On a scatter chart
apex( apex(
data = iris, data = cars,
aes(Sepal.Length, Sepal.Width), aes(speed, dist),
"scatter" "scatter"
) \%>\% ) \%>\%
add_hline(value = mean(iris$Sepal.Width)) \%>\% add_hline(value = mean(cars$dist)) \%>\%
add_vline(value = mean(iris$Sepal.Length)) add_vline(value = mean(cars$speed))
# With labels # With labels
apex( apex(
data = iris, data = cars,
aes(Sepal.Length, Sepal.Width), aes(speed, dist),
"scatter" "scatter"
) \%>\% ) \%>\%
add_hline( add_hline(
value = mean(iris$Sepal.Width), value = mean(cars$dist),
label = "Mean of Sepal.Width" label = "Mean of dist"
) \%>\% ) \%>\%
add_vline( add_vline(
value = mean(iris$Sepal.Length), value = mean(cars$speed),
label = "Mean of Sepal.Length" label = label(
text = "Mean of speed",
borderColor = "red"
)
) )
} }

View File

@ -1,28 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{unhcr_popstats_2017}
\alias{unhcr_popstats_2017}
\title{UNHCR data for 2017}
\format{
A data frame with 11237 observations and the following 6 variables:
\describe{
\item{\code{country_origin}}{Country of origin of population}
\item{\code{country_residence}}{Country / territory of asylum/residence of population}
\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{value}}{Number of people concerned}
\item{\code{continent_residence}}{Continent of origin of population}
\item{\code{continent_origin}}{Continent of residence of population}
}
}
\source{
UNHCR (The UN Refugee Agency) (\url{https://www.unhcr.org/})
}
\usage{
unhcr_popstats_2017
}
\description{
The dataset contains data about UNHCR's populations of concern for the year 2017.
}
\keyword{datasets}