This report analyzes global climate change trends, carbon emissions, renewable energy usage, and economic indicators using a series of visualizations.
climate_data <- tibble(
Year = c(2000, 2005, 2010, 2015, 2020),
CO2_Emissions = c(25.1, 29.3, 33.1, 35.5, 34.8)
)
country_data <- tibble(
Country = c("China", "United States", "India", "Russia", "Japan"),
CO2 = c(10668, 4713, 2442, 1577, 1061),
Renewable = c(29.3, 12.5, 24.5, 18.1, 20.3),
GDP = c(12720, 70248, 2389, 12194, 39312)
)
country_data
## # A tibble: 5 × 4
## Country CO2 Renewable GDP
## <chr> <dbl> <dbl> <dbl>
## 1 China 10668 29.3 12720
## 2 United States 4713 12.5 70248
## 3 India 2442 24.5 2389
## 4 Russia 1577 18.1 12194
## 5 Japan 1061 20.3 39312
ggplot(climate_data, aes(x = Year, y = CO2_Emissions)) +
geom_line() +
geom_point() +
labs(
title = "Global CO₂ Emissions Over Time",
x = "Year",
y = "CO₂ Emissions (Billion Tons)"
)
ggplot(country_data, aes(x = Country, y = CO2)) +
geom_col() +
labs(
title = "Top Countries by CO₂ Emissions",
x = "Country",
y = "CO₂ Emissions (Million Tons)"
)
ggplot(country_data, aes(x = GDP, y = CO2, size = Renewable)) +
geom_point() +
labs(
title = "GDP vs CO₂ Emissions",
x = "GDP Per Capita",
y = "CO₂ Emissions"
)
ggplot(country_data, aes(x = Country, y = Renewable)) +
geom_col() +
labs(
title = "Renewable Energy Usage by Country",
x = "Country",
y = "Renewable Energy (%)"
)
ggplot(climate_data, aes(x = Year, y = CO2_Emissions)) +
geom_area() +
labs(
title = "Area Chart of Global CO₂ Emissions",
x = "Year",
y = "CO₂ Emissions"
)
ggplot(country_data, aes(y = CO2)) +
geom_boxplot() +
labs(
title = "Boxplot of Country CO₂ Emissions",
y = "CO₂ Emissions"
)
ggplot(country_data, aes(x = Renewable)) +
geom_histogram(bins = 5) +
labs(
title = "Distribution of Renewable Energy Usage",
x = "Renewable Energy (%)",
y = "Frequency"
)
interactive_plot <- plot_ly(
country_data,
x = ~Renewable,
y = ~GDP,
type = "scatter",
mode = "markers",
color = ~Country,
size = ~CO2
) %>%
layout(
title = "Interactive Climate Comparison",
xaxis = list(title = "Renewable Energy (%)"),
yaxis = list(title = "GDP Per Capita")
)
interactive_plot