{"id":38654504,"url":"https://github.com/openwashdata/worldhdi","last_synced_at":"2026-01-17T09:25:37.355Z","repository":{"id":260066825,"uuid":"879711704","full_name":"openwashdata/worldhdi","owner":"openwashdata","description":"Worldwide Human Development Index Data from 1990-2022","archived":false,"fork":false,"pushed_at":"2025-01-22T11:50:11.000Z","size":1864,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-04T20:11:59.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://openwashdata.github.io/worldhdi/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openwashdata.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-10-28T12:20:01.000Z","updated_at":"2024-11-21T11:06:37.000Z","dependencies_parsed_at":"2025-01-22T12:37:01.011Z","dependency_job_id":null,"html_url":"https://github.com/openwashdata/worldhdi","commit_stats":null,"previous_names":["openwashdata/worldhdi"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/openwashdata/worldhdi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fworldhdi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fworldhdi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fworldhdi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fworldhdi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openwashdata","download_url":"https://codeload.github.com/openwashdata/worldhdi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openwashdata%2Fworldhdi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T09:25:36.797Z","updated_at":"2026-01-17T09:25:37.328Z","avatar_url":"https://github.com/openwashdata.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nalways_allow_html: true\neditor_options: \n  markdown: \n    wrap: 72\n  chunk_output_type: console\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\",\n  message = FALSE,\n  warning = FALSE,\n  fig.retina = 2,\n  fig.align = 'center'\n)\n```\n\n# worldhdi\n\n\u003c!-- badges: start --\u003e\n\n[![License: CC BY\n4.0](https://img.shields.io/badge/License-CC_BY_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by/4.0/)\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.14006110.svg)](https://zenodo.org/doi/10.5281/zenodo.14006110)\n\u003c!-- badges: end --\u003e\n\nThe goal of worldhdi is to present Human Development Index Data from 1990-2022\nin a tidy format. The data is sourced from the United Nations Development\n\n## Installation\n\nYou can install the development version of worldhdi from\n[GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"openwashdata/worldhdi\")\n```\n\n```{r}\n## Run the following code in console if you don't have the packages\n## install.packages(c(\"dplyr\", \"knitr\", \"readr\", \"stringr\", \"gt\", \"kableExtra\"))\nlibrary(dplyr)\nlibrary(knitr)\nlibrary(readr)\nlibrary(stringr)\nlibrary(gt)\nlibrary(kableExtra)\nlibrary(tidyverse)\nlibrary(lubridate)\n```\n\nAlternatively, you can download the individual datasets as a CSV or XLSX\nfile from the table below.\n\n```{r, echo=FALSE, message=FALSE, warning=FALSE}\n\nextdata_path \u003c- \"https://github.com/openwashdata/worldhdi/raw/main/inst/extdata/\"\n\nread_csv(\"data-raw/dictionary.csv\") |\u003e \n  distinct(file_name) |\u003e \n  dplyr::mutate(file_name = str_remove(file_name, \".rda\")) |\u003e \n  dplyr::rename(dataset = file_name) |\u003e \n  mutate(\n    CSV = paste0(\"[Download CSV](\", extdata_path, dataset, \".csv)\"),\n    XLSX = paste0(\"[Download XLSX](\", extdata_path, dataset, \".xlsx)\")\n  ) |\u003e \n  knitr::kable()\n\n```\n\n## Data\n\nThe 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)\n\n```{r}\nlibrary(worldhdi)\n```\n\n### worldhdi\n\nThe dataset `worldhdi` contains data about human development index (HDI) for 193 countries from 1990-2022.\nIt has `r nrow(worldhdi)` observations and `r ncol(worldhdi)` variables\n\n```{r}\nworldhdi |\u003e \n  head(3) |\u003e \n  gt::gt() |\u003e\n  gt::as_raw_html()\n```\n\nFor an overview of the variable names, see the following table.\n\n```{r echo=FALSE, message=FALSE, warning=FALSE}\nreadr::read_csv(\"data-raw/dictionary.csv\") |\u003e\n  dplyr::filter(file_name == \"worldhdi.rda\") |\u003e\n  dplyr::select(variable_name:description) |\u003e \n  knitr::kable() |\u003e \n  kableExtra::kable_styling(\"striped\") |\u003e \n  kableExtra::scroll_box(height = \"200px\")\n```\n\n\n## Example\n\n```{r}\nlibrary(worldhdi)\nlibrary(ggplot2)\nlibrary(rnaturalearthdata)\nlibrary(rnaturalearth)\n\n# 2022 HDI worldwide \nworld \u003c- ne_countries(scale = \"medium\", returnclass = \"sf\")\n\nworld_map_data \u003c- world |\u003e left_join(worldhdi, by = c(\"iso_a3\" = \"iso3c\"))\n\nhdi_colors \u003c- c(\"#d73027\", \"#fc8d59\", \"#fee08b\", \"#fdae61\", \"#fdd49e\", \"#feedde\", \n                \"#d9ef8b\", \"#a6d96a\", \"#66bd63\", \"#1a9850\", \"#00441b\", \"#003300\", \"#001a00\", \n                \"#e0e0e0\") \n\nggplot(data = world_map_data) +\n  geom_sf(aes(fill = cut(hdi_2022, \n                         breaks = c(-Inf, 0.399, 0.449, 0.499, 0.549, 0.599, 0.649, 0.699, \n                                    0.749, 0.799, 0.849, 0.899, 0.950, Inf), \n                         labels = c(\"≤ 0.399\", \"0.400–0.449\", \"0.450–0.499\", \"0.500–0.549\", \n                                    \"0.550–0.599\", \"0.600–0.649\", \"0.650–0.699\", \n                                    \"0.700–0.749\", \"0.750–0.799\", \"0.800–0.849\", \n                                    \"0.850–0.899\", \"0.900–0.950\", \"≥ 0.950\")))) +\n  scale_fill_manual(values = hdi_colors, na.value = \"gray90\", name = \"HDI 2022 Brackets\") +\n  theme_minimal() +\n  labs(title = \"World HDI (2022)\") +\n  theme(axis.text = element_blank(),\n        axis.ticks = element_blank(),\n        panel.grid = element_blank())\n```\n\n### Which countries saw the biggest increases in HDI over this period? \n```{r}\nworldhdi |\u003e \n  filter(!is.na(avg_growth_1990_2022)) |\u003e \n  arrange(desc(avg_growth_1990_2022)) |\u003e \n  select(country, avg_growth_1990_2022) |\u003e\n  head(10) |\u003e \n  gt::gt() |\u003e\n  gt::as_raw_html()\n\n```\n\n### Trends in HDI by region\n```{r}\n# Use the rows where country is Organisation for Economic Co-operation and Development,\n# 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\n\nworldhdi |\u003e\n  filter(country %in% c(\"Organisation for Economic Co-operation and Development\", \n                        \"Arab States\", \"East Asia and the Pacific\", \n                        \"Europe and Central Asia\", \"Latin America and the Caribbean\", \"World\", \"Sub-Saharan Africa\", \"South Asia\")) |\u003e\n  pivot_longer(cols = starts_with(\"hdi\"), \n               names_to = \"year\", \n               values_to = \"hdi\") |\u003e\n  mutate(year = gsub(\"hdi_\", \"\", year),  # Remove \"hdi_\" prefix\n         year = ymd(paste0(year, \"-01-01\")),  # Convert to date format\n         country = ifelse(country == \"Organisation for Economic Co-operation and Development\", \"OECD\", country)) |\u003e\n  ggplot(aes(x = year, y = hdi, group = country, color = country)) +\n  geom_line() +\n  geom_point() +\n  scale_x_date(date_labels = \"%Y\", date_breaks = \"10 years\") +  # Format x-axis as date and show every 10 years\n  labs(title = \"Trends in HDI by Region\", y = \"HDI\", x = \"Year\", color = \"Country\") +  # Set legend title\n  theme_minimal()\n```\n\n## License\n\nData are available as\n[CC-BY](https://github.com/openwashdata/worldhdi/blob/main/LICENSE.md).\n\n## Citation\n\nPlease cite this package using:\n\n```{r}\ncitation(\"worldhdi\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fworldhdi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenwashdata%2Fworldhdi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenwashdata%2Fworldhdi/lists"}