Task 1: Interactive plots

library(tidyverse)
library(plotly)
library(scales)

# 1. Load and clean data
wdi_raw <- read_csv("C:/Users/yudit/Downloads/wdi_parl.csv")

wdi_clean <- wdi_raw %>%
  filter(region != "Aggregates", year == 2019) %>%
  drop_na(SG.GEN.PARL.ZS, NY.GDP.PCAP.KD) %>%
  rename(prop_women = SG.GEN.PARL.ZS, 
         gdp_cap = NY.GDP.PCAP.KD)

# Load data here
wdi_raw <- read_csv("C:/Users/yudit/Downloads/wdi_parl.csv")

Do the following:

  1. Make a plot. Any kind of plot will do (though it might be easiest to work with geom_point()). # 1. Compare 2000 vs 2020 for a subset of countries > progress_data <- read_csv(“C:/Users/yudit/Downloads/wdi_parl.csv”) %>%
  1. Make the plot interactive with ggplotly(). # 2. Create the plot > p_progress <- ggplot(progress_data) +
  1. Make sure the hovering tooltip is more informative than the default.

  2. Prepare data using 2019 instead of 2020 > progress_data <- read_csv(“C:/Users/yudit/Downloads/wdi_parl.csv”) %>%

Good luck and have fun!