Image Redesign

Author

Arya Arun

Introduction

<Add text for introduction>

Image Selection

<Why you chose the image>

Original Design

Redesign 1

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.0     ✔ readr     2.2.0
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.2     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
✔ purrr     1.2.1     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
gold_data <- read_csv("C:/Users/aryaa/Documents/GMU/R for Data Analytics - Posit Cloud_files/stat-515/data/data.csv")
Rows: 19 Columns: 4
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (1): Country
dbl (3): Production_2023, Production_2024e, Reserves

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
# Your code to recreate/redesign the plot goes here

reserves = gold_data %>%
  filter(
    !Country == "World total (rounded)",
    !is.na(Reserves)
  )

# Sort by Reserves
#sorted_reserves <- reserves %>%
#  arrange(desc(reserves))

#sorted_reserves

ggplot(reserves, aes(x = reorder(Country, Reserves), y = Reserves)) +
  geom_bar(stat = "identity", fill = "steelblue") +
  coord_flip() +
  labs(
    title = "Gold Reserves by Country ",
    x = "Country",
    y = "Reserves (Metric Tons)"
  ) +
  theme_minimal()