This project explores how global energy consumption has evolved over time, focusing on the shift from fossil fuels (Coal, Oil, Natural gas,Nuclear) to renewable energy sources (Hydro, Wind, Solar, Biofuel,Others).
data.csv: the cleaned global energy consumption dataset- Derived variables, summaries, and plots are created in
Analysis.qmd
- Clean and inspect the data
- Calculate totals by country, region, year
- Identify top energy-consuming countries
- Plot time series trends (global, regional, country-level)
- Compute and display year-to-year percentage change
All of the code is done using R and it's packages (readr, dplyr, tidyr, ggplot2).
To reproduce the analysis locally:
-
Clone or download the repository “Download ZIP”, or use the command below in your terminal:
-
Open it in RStudio.
-
Install the required R packages.
install.packages(c("readr", "dplyr", "tidyr", "ggplot2"))
-
Then render the analysis.
This will execute all R code, produce the figures, and create a complete report showing the results of the analysis.