Introduction
1.1 About the report
1.2 The leading questions
Data background
2.1 Data source
2.2 Data credibility by “ROCCC” model
2.3: Data license
Data processing
Data analysis and visualization
Findings
5.1 Conclusion of my analysis
5.2 Answering the leading questions
This report delves into the critical issue of global warming, examining the current trajectory of temperature changes across different continents. The data utilized in this report provides insights into the rate of temperature increase based on the assumption that industrialization remains at its current pace. The goal is to shed light on the potential consequences and encourage discussions surrounding sustainable practices.
The analysis centers around two key questions:
1. How is Global Warming Evident in Temperature Trends? Explore the observed trends in temperature changes across continents, focusing on the monthly variations and identifying any discernible patterns.
2. Theoretical Scenario: Halted Industrialization. Imagine a hypothetical scenario where industrialization ceases to increase and remains stable as it is today. What are the potential implications for temperature changes globally?
The data was extracted from “Berkeley Earth”. Berkeley Earth offers high-resolution land and ocean time series data as well as gridded temperature data. Global datasets are available starting from 1850, and some land-only areas have records dating back to 1750.
Reliability: The data is accurate, thorough, and impartial.
Original: The data is verified by its original source.
Comprehensiveness: It encompasses all essential information to address the queries.
Current: The data pertains to the year 2013, a relatively recent time frame within the climate field.
Cited: The data is trustworthy and referenced from the source in the preceding paragraph.
In general, Berkeley Earth’s data is licensed under Creative Commons BY-NC 4.0 International for non-commercial use only.
Effective data processing is a pivotal aspect of any comprehensive report. It involves the systematic collection, validation, and analysis of information to derive meaningful insights and support informed decision-making. This section will delve into the significance of data processing within the context of the report, highlighting its role in ensuring accuracy, reliability, and relevance.
Installs necessary R packages such as readr, tidyverse, dplyr, ggplot2, and ggpmisc to facilitate data manipulation and visualization.
install.packages("readr")
install.packages("tidyverse")
install.packages("dplyr")
install.packages("ggplot2")
install.packages("ggpmisc")
library(readr)
library(tidyverse)
library(dplyr)
library(ggplot2)
library(ggpmisc)
Read the dataset from a CSV file.
GlobalTMP <- read_csv("Desktop/GlobalLandTemperaturesByCountry.csv")
Duplicate rows and rows with missing values (NA) are identified and eliminated to ensure data completeness and accuracy for subsequent analyses. Starting with 577,462 rows, the dataset is reduced to 544,811 after cleaning.
GlobalTMP %>% distinct()
GlobalTMP <- drop_na(GlobalTMP)
Rename columns.
GlobalTMP <- GlobalTMP %>%
rename(Date = dt) %>%
rename(Tmp = AverageTemperature)
Convert the “Date” column into separate “Month” and “Year” columns, each containing the respective numeric representations.
GlobalTMP$Month <- format(as.Date(GlobalTMP$Date), "%m")
GlobalTMP$Year <- format(as.Date(GlobalTMP$Date), "%Y")
Represent the “Month” and “Year” columns as numeric variables instead of date variables.
GlobalTMP <- GlobalTMP %>%
mutate(Month = as.numeric(Month),
Year = as.numeric(Year))
Creating a new dataframe named “ContinentTMP” by extracting and filtering data from the original “GlobalTMP” dataframe to include only information related to the specified continents.
ContinentTMP <- data.frame(GlobalTMP %>%
filter(Country %in% c("Africa", "Asia", "Europe", "North America", "South America", "Australia")))
For each month, the code generates distinct visualizations portraying the temperature change over the years for different continents. These visualizations include scatter plots, trend lines, and linear regression equations, presented in separate facets for each continent. Additional aesthetic elements and labels are incorporated to enhance clarity and interpretation. Each chart features a trend line equation in the format of y=n+m*x, where ‘m’ represents the slope, indicating the change in temperature in degrees Celsius per year. The x-axis represents years, while the y-axis represents Celsius temperatures.
ContinentTMP %>%
filter(Month == 1) %>%
ggplot(aes(x = Year, y = Tmp, color = Country)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "black") +
stat_poly_eq(aes(label = paste(..eq.label.., ..rr.label.., sep = "~~~")),
label.x.npc = "left", label.y.npc = 0.90,
formula = y ~ x, parse = TRUE, rr.digits = 3,color = "black") +
facet_wrap(~Country, scales = "free_y") +
scale_color_discrete(name = "Continent") +
theme_minimal() +
labs(title = "Temperature Change Over the Years - January",
x = "Year",
y = "Temperature",
caption = "Trend lines represent linear fits for each continent")
ContinentTMP %>%
filter(Month == 02) %>%
ggplot(aes(x = Year, y = Tmp, color = Country)) +
geom_point() +
geom_smooth(method = "lm", se = FALSE, color = "black") +
stat_poly_eq(aes(label = paste(..eq.label.., ..rr.label.., sep = "~~~")),
label.x.npc = "left", label.y.npc = 0.90,
formula = y ~ x, parse = TRUE, rr.digits = 3,color = "black") +
facet_wrap(~Country, scales = "free_y") +
scale_color_discrete(name = "Continent") +
theme_minimal() +
labs(title = "Temperature Change Over the Years - February",
x = "Year",
y = "Temperature",
caption = "Trend lines represent linear fits for each continent")
.
.
.
.
.
I aggregated the slopes (‘m’) from the temperature change charts for each continent and month, meticulously summarizing them into a new data frame. This meticulous process aimed to offer a comprehensive overview of the data, paving the way for insightful observations and meaningful conclusions.
temperature_data <- data.frame(
Month = c("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"),
Africa = c(0.00738, 0.00935, 0.00989, 0.00889, 0.00876, 0.00773, 0.00625, 0.00751, 0.00835, 0.00787, 0.00829, 0.00901),
Asia = c(0.00833, 0.00759, 0.00914, 0.00951, 0.00794, 0.00639, 0.00476, 0.00593, 0.01030, 0.01110, 0.00820, 0.00962),
Australia = c(0.00673, 0.00680, 0.00610, 0.00695, 0.00680, 0.00597, 0.00696, 0.00462, 0.00767, 0.00546, 0.00460, 0.00499),
Europe = c(0.00730, 0.00288, 0.00546, 0.00271, 0.00170, 0.00181, 0.00024, 0.00170, 0.00263, 0.00544, 0.00477, 0.00599),
`North America` = c(0.00648, 0.00821, 0.00823, 0.00643, 0.00499, 0.00336, 0.00400, 0.00510, 0.00906, 0.01130, 0.00734, 0.00915),
`South America` = c(0.00836, 0.00880, 0.00947, 0.00816, 0.00774, 0.00768, 0.00563, 0.00792, 0.00817, 0.00844, 0.00901, 0.00925)
)
Certainly, visualizations often provide a clearer understanding of data. To better comprehend the results from the aggregated slopes, two charts were created to visually represent the insights and conclusions derived from the data.
##Reshape the data frame to long format
temperature_data_long <- gather(temperature_data, key = "Continent", value = "Temperature", -Month)
##With fact_wrap
ggplot(temperature_data_long, aes(x = factor(Month, levels = month.name), y = Temperature, fill = Continent)) +
geom_bar(stat = "identity", position = "dodge") +
scale_fill_viridis_d() +
facet_wrap(~Continent, scales = "free_y") + # Facet by Continent
theme_minimal() +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(title = "Monthly Change of Temperature (Cº)",
x = "Month",
y = "Temperature change",
fill = "Continent")
##Without fact_wrap
ggplot(temperature_data_long, aes(x = factor(Month, levels = month.name), y = Temperature, fill = Continent)) +
geom_bar(stat = "identity", position = "dodge") +
scale_fill_viridis_d() +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90, hjust = 1)) +
labs(title = "Monthly Change of Temperature (Cº)",
x = "Month",
y = "Temperature change",
fill = "Continent")
The analyzed data, presented through linear trends, offers insights into the current climatic reality if the trend influenced by the last 250 years continues unchanged in strength. Relying on the assumption that current global behaviors related to industrialization and modernization remain unchanged is incorrect. However, for the purpose of the current data analysis, we will focus on it. Other studies in the field indicate an exponential increase in temperature as human development progresses.
After saying that, we can draw several conclusions:
1. Overall Increase: The slopes (m) for all the months and continents are positive, indicating an overall increase in temperature over the months. The overall trend suggests a warming climate.
2. Seasonal Patterns: There are variations in the slopes across months, suggesting seasonal patterns. For some continents, certain months show a more significant increase than others, indicating potential seasonal variability.
3. Consistent Trends: Generally, the trends are consistent across continents, with positive slopes for all months. This consistency implies a global or at least hemispheric influence on temperature changes.
4. Regional Anomalies: Some months or continents may exhibit anomalies or deviations from the overall trend. For instance, the month of July in Europe has a relatively lower slope compared to other months, indicating a potential anomaly.
5. Variability Across Continents: Different continents exhibit varying rates of temperature change. For instance, South America generally has higher slopes compared to other continents, indicating a relatively larger increase in temperature over the years.
6. Continental Differences: Each continent has its own unique pattern of temperature change, influenced by local climatic factors and geographical features. Asia and North America, for example, consistently show higher temperature increases compared to other continents.
The observed temperature trends across continents provide compelling evidence of global warming. The positive slopes in the data indicate a consistent increase in temperatures over time. Monthly variations reveal distinct seasonal patterns, with some months experiencing more significant temperature changes than others. These patterns align with expectations of climate change, emphasizing the planet’s overall warming trend.
In a hypothetical scenario where industrialization ceases to increase, the potential implications for temperature changes globally and regionally would be significant. Without further industrial development, the exponential temperature growth associated with current practices would be curtailed. Nevertheless, even if the current trend continues linearly, in a hundred years, the temperature in September in Asia will rise by 1.0279 degrees Celsius. On the surface, it may appear negligible and meaningless, but in practice, it signifies a momentous change for the climate and the Earth. Experts point out that even a one-degree change in temperature can lead to an increase in the occurrence of extreme and dangerous natural phenomena.