The last decades the electricity production has been changing in favor of the environment due to the commitment of goverments and society to have a more sustainable energy generation. An important alternative to achieve the decarbonization of the generation of electricity is the use solar energy to generate electricity.
This graph shows how the 5 biggest economies countries are changing their electricity production in favor of solar energy.
Data Source :
Hannah Ritchie, Max Roser and Pablo Rosado (2020) - “Energy”.
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
solar <-read_csv('share-electricity-solar.csv', show_col_types =FALSE)solar$Solar <-round(solar$Solar,2)#Five Biggest economies countriessolar_c <-filter(solar, Entity %in%c("China", "United States", "Japan", "Germany", "United Kingdom") & Year >=1990)solar_g <-plot_ly(solar_c , x=~Year, y=~Solar, name =~Entity ,type ='scatter', mode ='lines')#adding range slider and hovermode optionsolar_g <- solar_g %>%rangeslider() %>%layout(hovermode ="x")#seting layoutsolar_g <- solar_g %>%layout( title ="Share of Electricity Production From Solar 1990-2021 \n Five Biggest Economies", xaxis =list(title="Year"), yaxis =list(title ="Solar Share", ticksuffix ="%"), legend =list(x =0.05, y =0.8))solar_g