Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
`.name_repair` is omitted as of tibble 2.0.0.
ℹ Using compatibility `.name_repair`.
sheet_header_processed
# A tibble: 23 × 2
scenario year
<chr> <chr>
1 Current Year <NA>
2 Current Year 2022
3 Current Year <NA>
4 Stated policies scenario 2025
5 Stated policies scenario 2030
6 Stated policies scenario 2035
7 Stated policies scenario 2040
8 Stated policies scenario 2045
9 Stated policies scenario 2050
10 Stated policies scenario <NA>
# ℹ 13 more rows
Rows: 228 Columns: 6
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): application_name, indicator, scenario, unit
dbl (2): year, value
ℹ 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.
# Compelling data visualizations 1 (Total Demand For Copper vs. Cobalt in EV)ggplot(our_cleaned_data) +aes(x = value, y = indicator) +geom_boxplot(fill ="red") +labs(x ="Demand in Kt",y ="Mineral Type",title ="Total Demand For Copper vs. Cobalt in EV",caption ="Haotian Duan" ) +theme_minimal()
# Compelling data visualizations 2 (Demand For Copper vs. Cobalt in Different Scenario)ggplot(our_cleaned_data) +aes(x = indicator, y = value) +geom_boxplot(fill ="blue") +labs(x ="Mineral Type",y ="Demand in Kt",title ="Demand For Copper vs. Cobalt in Different Scenario",caption ="Haotian Duan" ) +theme_minimal() +facet_wrap(vars(scenario))
# Compelling data visualizations 3 (Demand For Copper vs. Cobalt in Different Application)ggplot(our_cleaned_data) +aes(x = indicator, y = value) +geom_boxplot(fill ="green") +labs(x ="Mineral Type",y ="Demand in Kt",title ="Demand For Copper vs. Cobalt in Different Application",caption ="Haotian Duan" ) +theme_minimal() +facet_wrap(vars(application_name))
# Compelling data visualizations 4 (The Trend of Copper vs. Cobalt Demand by Years)sum_data <- our_cleaned_data |>filter(!is.na(value)) |>group_by(year, indicator) |>mutate(year_demand =sum(value))ggplot(sum_data) +aes(x = year,y = year_demand,colour = indicator,group = indicator ) +geom_line() +scale_color_hue(direction =1) +labs(x ="Year",y ="Demand in Kt",title ="The Trend of Demand by Years",caption ="Haotian Duan" ) +theme_minimal() +theme(legend.position ="left")
# Compelling data visualizations 5 (The Trend of Copper vs. Cobalt Demand by Years in Different Scenario)ggplot(sum_data) +aes(x = year,y = year_demand,colour = indicator,group = indicator ) +geom_line() +scale_color_viridis_d(option ="viridis", direction =1) +labs(x ="Year",y ="Demand in Kt",title ="The Trend of Demand by Years in Different Scenario",caption ="Haotian Duan" ) +theme_minimal() +theme(legend.position ="left") +facet_wrap(vars(scenario))
# Compelling data visualizations 5 (The Trend of Copper vs. Cobalt Demand by Years in Different Scenario)