-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage_of_inequality_map3.Rmd
62 lines (45 loc) · 2.34 KB
/
page_of_inequality_map3.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
title: "The Map of Gender Inequality Index"
---
## Introduction
```{r message=FALSE, warning=FALSE, include=FALSE}
```
The **Gender Inequality Index (GII)** is a composite measure developed by the United Nations Development Programme (UNDP) to assess gender disparities in various dimensions of human development[^1]. It highlights the inequalities between men and women in three critical areas: reproductive health, empowerment, and labor market participation.
[^1]: [1]United Nations Development Programme (2023) *Gender Inequality Index (GII) - Statistical Annex 2023/2024.* <https://hdr.undp.org/sites/default/files/2023-24_HDR/HDR23-24_Statistical_Annex_GII_Table.xlsx>
This page transforms those statistical insights into an interactive map, allowing users to explore gender inequality patterns geographically.The map of the world provided by ESRI[^2].
[^2]: [2]ArcGIS Hub (n.d.) *World Countries Generalized.* <https://hub.arcgis.com/datasets/2b93b06dc0dc4e809d3c8db5cb96ba69_0/explore?location=-0.207545%2C0.000000%2C1.41>
```{r message=FALSE, warning=FALSE, include=FALSE}
library(sf)
library(here)
library(dplyr)
library(countrycode)
library(readr)
library(janitor)
World_map<-st_read(here::here("World_Countries_(Generalized)_9029012925078512962.geojson"))
# Adding a blank line between each line of code makes it more organized and easier to follow.
Index2 <- read_csv(here::here("inequality indexUTF8.csv"))
World_map2<-World_map %>%
mutate(isoname=countrycode::countrycode(World_map[[2]], origin="country.name", destination = 'iso.name.en') )
#Adding a blank line between each line of code makes it more organized and easier to follow.
Index_renamed<-Index2 %>%
mutate(isoname=countrycode::countrycode(Index2[[2]], origin="country.name", destination = 'iso.name.en') )
World_Index<-World_map2 %>%
left_join(Index_renamed, by = "isoname") %>%
clean_names() %>%
distinct()
```
```{r map drawing, echo=FALSE, message=FALSE, warning=FALSE}
#library tmap_mode
library(tmap)
tmap_mode("view")
tm_shape(World_Index) +
tm_polygons("gender_inequality_index",
alpha = 0.8,
title = "Gender Inequality Index",
style = "cont",
palette = "Blues",
border.col = "black", popup.vars = "gender_inequality_index") +
tm_borders() +
tm_layout(legend.outside = TRUE)
```
## Referance