Project Part 2

Interactive and static plots for Agricultural Value added per Worker from 1991 to 2017.

  1. Packages I will use to read in and plot the data
  1. Read the data in from part 1
    regional_value <- read_csv(here::here("_posts/2022-05-10-project-part-1/regional_value.csv"))
    

Interactive Graph

regional_value %>%
  group_by(Region) %>%
  mutate(Valueaddedperworker = round(Valueaddedperworker, 2),
         Year = paste(Year, "12", "31", sep="-")) %>%
  e_charts(x = Year) %>%
  e_river(serie = Valueaddedperworker, legend = FALSE) %>%
  e_tooltip(trigger = "axis") %>%
  e_title(text = "Annual Aggriculture Value Added per Worker",
          subtext = "Source: Our World in Data",
          sublink = "https://ourworldindata.org/grapher/agriculture-value-added-per-worker-wdi",
          left = "center") %>%
  e_theme("roma")

Static graph

regional_value %>%
  ggplot(aes(x = Year, y = Valueaddedperworker,
             fill = Region)) +
  geom_area() +
  colorspace::scale_fill_discrete_divergingx(palette = "roma", nmax = 12) +
  theme_classic() +
  theme(legend.position = "bottom") +
  labs( y = "Value Added per Worker (in dollars)",
        fill = NULL)

These plots show a steady increase in value added per worker (besides in Liberia where it has stayed pretty stagnent) since 2000. The value added per worker has continued to increase.

ggsave(filename = here::here("_posts/2022-05-14-project-part-2/preview.png"))