worldhdi
Worldwide Human Development Index Data from 1990-2022
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.2%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
·
Repository
Worldwide Human Development Index Data from 1990-2022
Basic Info
- Host: GitHub
- Owner: openwashdata
- Language: R
- Default Branch: main
- Homepage: https://openwashdata.github.io/worldhdi/
- Size: 1.78 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Created over 1 year ago
· Last pushed about 1 year ago
Metadata Files
Readme
Citation
README.Rmd
---
output: github_document
always_allow_html: true
editor_options:
markdown:
wrap: 72
chunk_output_type: console
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
message = FALSE,
warning = FALSE,
fig.retina = 2,
fig.align = 'center'
)
```
# worldhdi
[](https://creativecommons.org/licenses/by/4.0/)
[](https://zenodo.org/doi/10.5281/zenodo.14006110)
The goal of worldhdi is to present Human Development Index Data from 1990-2022
in a tidy format. The data is sourced from the United Nations Development
## Installation
You can install the development version of worldhdi from
[GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("openwashdata/worldhdi")
```
```{r}
## Run the following code in console if you don't have the packages
## install.packages(c("dplyr", "knitr", "readr", "stringr", "gt", "kableExtra"))
library(dplyr)
library(knitr)
library(readr)
library(stringr)
library(gt)
library(kableExtra)
library(tidyverse)
library(lubridate)
```
Alternatively, you can download the individual datasets as a CSV or XLSX
file from the table below.
```{r, echo=FALSE, message=FALSE, warning=FALSE}
extdata_path <- "https://github.com/openwashdata/worldhdi/raw/main/inst/extdata/"
read_csv("data-raw/dictionary.csv") |>
distinct(file_name) |>
dplyr::mutate(file_name = str_remove(file_name, ".rda")) |>
dplyr::rename(dataset = file_name) |>
mutate(
CSV = paste0("[Download CSV](", extdata_path, dataset, ".csv)"),
XLSX = paste0("[Download XLSX](", extdata_path, dataset, ".xlsx)")
) |>
knitr::kable()
```
## Data
The package provides access to tidy human development index (HDI) for 193 countries from 1990-2022. The data is sourced from the United Nations Development Programme (UNDP)
```{r}
library(worldhdi)
```
### worldhdi
The dataset `worldhdi` contains data about human development index (HDI) for 193 countries from 1990-2022.
It has `r nrow(worldhdi)` observations and `r ncol(worldhdi)` variables
```{r}
worldhdi |>
head(3) |>
gt::gt() |>
gt::as_raw_html()
```
For an overview of the variable names, see the following table.
```{r echo=FALSE, message=FALSE, warning=FALSE}
readr::read_csv("data-raw/dictionary.csv") |>
dplyr::filter(file_name == "worldhdi.rda") |>
dplyr::select(variable_name:description) |>
knitr::kable() |>
kableExtra::kable_styling("striped") |>
kableExtra::scroll_box(height = "200px")
```
## Example
```{r}
library(worldhdi)
library(ggplot2)
library(rnaturalearthdata)
library(rnaturalearth)
# 2022 HDI worldwide
world <- ne_countries(scale = "medium", returnclass = "sf")
world_map_data <- world |> left_join(worldhdi, by = c("iso_a3" = "iso3c"))
hdi_colors <- c("#d73027", "#fc8d59", "#fee08b", "#fdae61", "#fdd49e", "#feedde",
"#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#00441b", "#003300", "#001a00",
"#e0e0e0")
ggplot(data = world_map_data) +
geom_sf(aes(fill = cut(hdi_2022,
breaks = c(-Inf, 0.399, 0.449, 0.499, 0.549, 0.599, 0.649, 0.699,
0.749, 0.799, 0.849, 0.899, 0.950, Inf),
labels = c("≤ 0.399", "0.400–0.449", "0.450–0.499", "0.500–0.549",
"0.550–0.599", "0.600–0.649", "0.650–0.699",
"0.700–0.749", "0.750–0.799", "0.800–0.849",
"0.850–0.899", "0.900–0.950", "≥ 0.950")))) +
scale_fill_manual(values = hdi_colors, na.value = "gray90", name = "HDI 2022 Brackets") +
theme_minimal() +
labs(title = "World HDI (2022)") +
theme(axis.text = element_blank(),
axis.ticks = element_blank(),
panel.grid = element_blank())
```
### Which countries saw the biggest increases in HDI over this period?
```{r}
worldhdi |>
filter(!is.na(avg_growth_1990_2022)) |>
arrange(desc(avg_growth_1990_2022)) |>
select(country, avg_growth_1990_2022) |>
head(10) |>
gt::gt() |>
gt::as_raw_html()
```
### Trends in HDI by region
```{r}
# Use the rows where country is Organisation for Economic Co-operation and Development,
# Arab States, East Asia and the Pacific, Europe and Central Asia, Latin America and the Caribbean, World and plot the hdi trends using hdi_1990, hdi_2000, hdi_2010, hdi_2015, hdi_2022
worldhdi |>
filter(country %in% c("Organisation for Economic Co-operation and Development",
"Arab States", "East Asia and the Pacific",
"Europe and Central Asia", "Latin America and the Caribbean", "World", "Sub-Saharan Africa", "South Asia")) |>
pivot_longer(cols = starts_with("hdi"),
names_to = "year",
values_to = "hdi") |>
mutate(year = gsub("hdi_", "", year), # Remove "hdi_" prefix
year = ymd(paste0(year, "-01-01")), # Convert to date format
country = ifelse(country == "Organisation for Economic Co-operation and Development", "OECD", country)) |>
ggplot(aes(x = year, y = hdi, group = country, color = country)) +
geom_line() +
geom_point() +
scale_x_date(date_labels = "%Y", date_breaks = "10 years") + # Format x-axis as date and show every 10 years
labs(title = "Trends in HDI by Region", y = "HDI", x = "Year", color = "Country") + # Set legend title
theme_minimal()
```
## License
Data are available as
[CC-BY](https://github.com/openwashdata/worldhdi/blob/main/LICENSE.md).
## Citation
Please cite this package using:
```{r}
citation("worldhdi")
```
Owner
- Name: openwashdata
- Login: openwashdata
- Kind: organization
- Repositories: 1
- Profile: https://github.com/openwashdata
Citation (CITATION.cff)
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
cff-version: 1.2.0
message: 'To cite package "worldhdi" in publications use:'
type: software
title: 'worldhdi: Human Development Index Worldwide 1990-2022'
version: 0.1.0
doi: 10.5281/zenodo.14006110
abstract: 'This package provides details about Human Development Index across the world
from 1990 to 2022. 193 countries are included in the dataset. It also includes data
aggregated by regions.'
year: 2024
authors:
- family-names: Dubey
given-names: Yash
email: ydubey@ethz.ch
orcid: https://orcid.org/0009-0001-2849-970X
contact:
- family-names: Dubey
given-names: Yash
email: ydubey@ethz.ch
orcid: https://orcid.org/0009-0001-2849-970X
GitHub Events
Total
- Release event: 1
- Public event: 1
- Push event: 5
- Pull request event: 5
- Create event: 1
Last Year
- Release event: 1
- Public event: 1
- Push event: 5
- Pull request event: 5
- Create event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- yashdubey132 (3)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
DESCRIPTION
cran
- R >= 2.10 depends