Your boss knows that they will be asking her about how the implications of the electric vehicle (EV) market and policy choices on the demand for copper and cobalt.
Use the workflow developed in this chapter to import and tidy worksheet 2.3 EV from the dataset.
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: 1368 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (3): EV_name, indicator, scenario
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.
Use the tidied dataset to come up with 5 compelling data visualizations that illustrate key actionable insights about how policy scenarios, and technological scenarios will impact demand for copper and cobalt.
Data Visualization 1
final_EV_table %>%filter(EV_name %in%"Constrained nickel supply") %>%filter(indicator %in%c("Cobalt", "Copper", "Nickel")) %>%filter(scenario %in%"Net Zero Emissions by 2050 scenario") %>%ggplot() +aes(x = year, y = value, fill = EV_name) +geom_area() +scale_fill_brewer(palette ="Accent", direction =1) +labs(x ="Year",y ="Demand (kt)",title ="Cobalt and Copper Demand in the Net Zero 2050 Scenario with the Constrained Nickel Supply",subtitle ="Copper demands remains the highest under the constrained nickel supply condition",fill ="Assumptions" ) + ggthemes::theme_base() +theme(legend.position ="none",plot.title =element_text(face ="bold", size =10), # Adjust title sizeplot.subtitle =element_text(face ="italic", size =8), # Adjust subtitle sizeaxis.title.y =element_text(face ="bold", size =8), # Adjust y-axis title sizeaxis.title.x =element_text(face ="bold", size =8), # Adjust x-axis title sizeaxis.text.x =element_text(size =8), # Adjust x-axis text sizeaxis.text.y =element_text(size =8), # Adjust y-axis text sizestrip.text =element_text(size =8) # Adjust facet label size if needed ) +facet_wrap(vars(indicator))
Data Visualization 2
final_EV_table %>%filter(indicator %in%c("Cobalt", "Copper")) %>%filter(!(scenario %in%"Current Year")) %>%filter(!is.na(value)) %>%ggplot() +aes(x = year,y = value,fill = indicator,colour = indicator ) +geom_point(shape ="circle", size =1.5) +geom_smooth(span =0.75) +scale_fill_brewer(palette ="Accent", direction =1) +scale_color_brewer(palette ="Accent", direction =1) +labs(x ="Year",y ="Demand (kt)",title ="Cobalt and Copper Demand between Scenarios",subtitle ="Copper demand is projected to increase significantly in all scenarios, while Cobalt demands relatively flat" ) +theme_minimal() +theme(plot.title =element_text(face ="bold"),axis.title.y =element_text(face ="bold"),axis.title.x =element_text(face ="bold") ) +facet_wrap(vars(scenario))
`geom_smooth()` using method = 'loess' and formula = 'y ~ x'
Data Visualization 3
cleaned_data %>%filter(indicator %in%c("Cobalt", "Copper")) %>%filter(scenario %in%"Net Zero Emissions by 2050 scenario") %>%ggplot() +aes(x = EV_name, fill = indicator, weight = value) +geom_bar() +scale_fill_hue(direction =1) +labs(x ="Conditions",y ="Demand (kt)",title ="Annual Cobalt and Copper Demand by Conditions",fill ="Minerals" ) +coord_flip() +theme_minimal() +facet_wrap(vars(year))
Data Visualization 4
filtered_data <- cleaned_data %>%filter(scenario =="Net Zero Emissions by 2050 scenario", EV_name =="constrained nickel supply")cobalt_data <- cleaned_data[cleaned_data$indicator =="Cobalt", ]copper_data <- cleaned_data[cleaned_data$indicator =="Copper", ]graphite_data <- cleaned_data[cleaned_data$indicator =="Graphite", ]lithium_data <- cleaned_data[cleaned_data$indicator =="Lithium", ]manganese_data <- cleaned_data[cleaned_data$indicator =="Manganese", ]nickel_data <- cleaned_data[cleaned_data$indicator =="Nickel", ]silicon_data <- cleaned_data[cleaned_data$indicator =="Silicon", ]neodymium_data <- cleaned_data[cleaned_data$indicator =="Neodymium", ]dysprosium_data <- cleaned_data[cleaned_data$indicator =="Dysprosium", ]praseodymium_data <- cleaned_data[cleaned_data$indicator =="Praseodymium", ]terbium_data <- cleaned_data[cleaned_data$indicator =="Terbium", ]mineral_stacked_bar <-ggplot() +geom_bar(data = cobalt_data, aes(x =factor(year), y = value), stat ="identity", fill ="maroon") +geom_bar(data = copper_data, aes(x =factor(year), y = value), stat ="identity", fill ="pink") +geom_bar(data = graphite_data, aes(x =factor(year), y = value), stat ="identity", fill ="magenta") +geom_bar(data = lithium_data, aes(x =factor(year), y = value), stat ="identity", fill ="purple") +geom_bar(data = manganese_data, aes(x =factor(year), y = value), stat ="identity", fill ="navy") +geom_bar(data = nickel_data, aes(x =factor(year), y = value), stat ="identity", fill ="lightblue") +geom_bar(data = silicon_data, aes(x =factor(year), y = value), stat ="identity", fill ="lightgreen") +geom_bar(data = neodymium_data, aes(x =factor(year), y = value), stat ="identity", fill ="darkgreen") +geom_bar(data = dysprosium_data, aes(x =factor(year), y = value), stat ="identity", fill ="yellow") +geom_bar(data = praseodymium_data, aes(x =factor(year), y = value), stat ="identity", fill ="orange") +geom_bar(data = terbium_data, aes(x =factor(year), y = value), stat ="identity", fill ="red") +labs(title ="Mineral demand for EV in the Net Zero Emissions by 2050 Scenario, Constrained nickel supply", x ="Year", y ="Demand (kt)", fill ="Scenario") +theme(plot.title =element_text(face ="bold"),axis.title.y =element_text(face ="bold"),axis.title.x =element_text(face ="bold") ) +theme_minimal()mineral_stacked_bar
copper_bar <-ggplot() +geom_bar(data = copper_data, aes(x =factor(year), y = value), stat ="identity", fill ="pink") +labs(title ="Copper demand for EV in the Net Zero Emissions by 2050 Scenario, Constrained nickel supply", x ="Year", y ="Demand (kt)", fill ="Scenario") +theme(plot.title =element_text(face ="bold"),axis.title.y =element_text(face ="bold"),axis.title.x =element_text(face ="bold") ) +theme_minimal()copper_bar