sowc_demographics | R Documentation |
Demographic data from UNICEF's State of the World's Children 2019 Statistical Tables.
sowc_demographics
A data frame with 202 rows and 18 variables.
Country or area name.
Population in 2018 in thousands.
Population under age 18 in 2018 in thousands.
Population under age 5 in 2018 in thousands.
Rate at which population is growing in 2018.
Rate at which population is estimated to grow in 2030.
Number of births in 2018 in thousands.
Number of live births per woman in 2018.A total fertility level of 2.1 is called replacement level and represents a level at which the population would remain the same size.
Life expectancy at birth in 1970.
Life expectancy at birth in 2000.
Life expectancy at birth in 2018.
The ratio of the not-working-age population to the working-age population of 15 - 64 years.
The ratio of the under 15 population to the working-age population of 15 - 64 years.
The ratio of the over 64 population to the working-age population of 15 - 64 years.
Percent of population living in urban areas.
Annual urban population growth rate from 2000 to 2018.
Estimated annual urban population growth rate from 2018 to 2030.
Net migration rate per 1000 population from 2015 to 2020.
United Nations Children's Emergency Fund (UNICEF)
library(dplyr)
library(ggplot2)
# List countries and areas' life expectancy, ordered by rank of life expectancy in 2018
sowc_demographics |>
mutate(life_expectancy_change = life_expectancy_2018 - life_expectancy_1970) |>
mutate(rank_life_expectancy = round(rank(-life_expectancy_2018), 0)) |>
select(
countries_and_areas, rank_life_expectancy, life_expectancy_2018,
life_expectancy_change
) |>
arrange(rank_life_expectancy)
# List countries and areas' migration rate and population, ordered by rank of migration rate
sowc_demographics |>
mutate(rank = round(rank(migration_rate))) |>
mutate(population_millions = total_pop_2018 / 1000) |>
select(countries_and_areas, rank, migration_rate, population_millions) |>
arrange(rank)
# Scatterplot of life expectancy v population in 2018
ggplot(sowc_demographics, aes(life_expectancy_1970, life_expectancy_2018, size = total_pop_2018)) +
geom_point(alpha = 0.5) +
labs(
title = "Life Expectancy",
subtitle = "1970 v. 2018",
x = "Life Expectancy in 1970",
y = "Life Expectancy in 2018",
size = "2018 Total Population"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.