# Load the necessary library
library(ggplot2)

# Load data from the CSV file
GlobalCO2Emissions <- read.csv("GlobalCO2Emissions.csv")

# Visualise the data using ggplot2 
ggplot(GlobalCO2Emissions, aes(x = Year, y = `Emissions`)) +
  geom_point(aes(fill = factor(Year)), size = 6, shape = 21, color = "#000000") +
  geom_text(aes(label = sprintf("%.2f", `Emissions`)), vjust = -1.5, hjust = 0.5, size = 3, color = "#660000") +
  labs(title = "Global CO₂ Emissions: Emissions (GtCO₂) vs Year: 1750 - 2023",
       subtitle = "2023: 40.9 gigatons of carbon dioxide is equivalent to 40,900,000,000 metric tons.",   
        x = "Year",
       y = "Emissions GtCO₂") +
  scale_x_continuous(breaks = seq(1750, 2030, by = 10)) +
  theme_minimal() +
  theme(panel.background = element_rect(fill = "#CCCCCC"),
        panel.grid.major = element_line(color = "#FFFFFF", linetype = "dashed"))