This project is about plotting yourself some of the key parameters of the climate change we are (will be) experiencing.
Climate change
Definition
First of all, we need to be clear on the difference between climate and weather.
Check online what is this difference and why climate has little to do with is the afternoon going to be sunny and/or windy.
Temperature anomalies
Temperature anomalies are probably the graph you see the most in the news. The goal is to compare the average temperatures of a current average temperature in a time period (month or year) to a reference in the past. This reference has to be subsequently long to be representative. However, which block of 30 to 50 years is used as the reference is influencing what is then defined as anomalies. A good recent example for February 2021:
NASA GISS data for February 2021 saw a global average temperature anomaly of: +0.67C vs. 1951-1980 +0.57C vs. 1961-1990 +0.39C vs. 1971-2000 +0.19C vs. 1981-2010 +0.01C vs. 1991-2020 (map) which confirms the relatively cool month vs. past few years (see past tweet) https://t.co/wkLtkYxILGpic.twitter.com/hlO1FRQwYD
— Extreme Temperatures Around The World (@extremetemps) March 12, 2021
For this project, we will use data from the Bekeley Earth
They provide detailed summary of raw land-surface average in this dataset.
Moreover, we must tell what comment character is used. It might be useful to provide the string used to encode missing data (%) and also the columns types. For example, reasonable to ask year and month to be integer values.
Is this dataset tidy?
Create a date column. Assume that the missing day information is “01” for all rows. Assign the result to the name bky_anomalies
TipTip
To create dates, you can use the function as.Date() using the string in ISO8601. For example as.Date("2021-03-15")) is the date for the 15th of March 2021.
Plot the yearly anomalies from 1850 (when oil extraction started) using the newly created date column.
TipTip
dots are a good option, but how can we encode the temperature anomalies in a dot since they are usually mapped to the color aesthetic? You can use a hollow dot shape = 21 in geom_point() with no stroke (stroke = 0) and map the fill aesthetic to the yearly anomalies. A relevant gradient could the palette turbo from the scale_fill_viridis_c() as it offers blues for negative values and reds for positives.
You might like a larger gradient legend key, extended to the plot height:
theme(legend.key.height =unit(1, "null"))
Add a smooth trend line to the previous plot
TipTip
the default gam method proposed by geom_smooth() is reasonable enough. You may disable the useless standard error ribbon here. An additional horizontal line on the 0 degree anomalies with a dark dashed line could be a nice addition.
Plot the temperature anomalies for the last 40 years per month using the polar coordinates and facet per year.
Which event in 1991 could explained the significant colder years of 1992-1993?
Could it be the Sun?
This is a common argument by climate deniers. They suggest that the Sun could be sending more energy to the Earth and that climate change is not anthropogenic nor due to carbon emissions.
Thus, let’s investigate this solar activity through time, since yes, the Sun has some cycles.
Sunspots can appears and last for several months. Depending on their number and longevity, this can impact the energy the Sun provide around.
The dataset Historical_TSI_Reconstruction is provided by the University of Colorado. The TSI is Total Solar Irradiance and comes as \(W/m^2\).
Load this fixed-width dataset using read_table(). Save object astsi`.
Create a date column. Currently, the date is encoded as doubles with “.5”. Let’s assume this represents June of each year. Assign the result with the name tsi_date.
TipTip
You should first round the decimal 0.5 with the function floor() then add the the string "-06-01" to the year, then converting that to a date with as.Date() as before.
Plot the tsi per date using a line.
What can we do to make the trend clearer?
Smooth the tsi
TipTip
You should have seen this procedure used a lot for Covid-19 infections, usually using rolling means over 7-days. To achieve this, we will use the package {slider} available on CRAN, which proposes the function slider_mean(). See example of usage below.
# see example, from a vector a, we compute a rolling mean of a sliding windows# with either 2 values before or more smooth with 7tibble(a =c(1, 3, 5, 6, 8, 13, 15),a_avg_2 = slider::slide_mean(a, before =2),a_avg_7 = slider::slide_mean(a, before =7))
Luxembourg was mostly frozen all year long. Copenhagen was below meters of ice and France, Germany were covered only by tundras. Sea level was 120 meters lower too. This gives an idea on the impact of a natural change in 19,000 years. We are going to experience, maybe a similar experience in only 100 years, this time triggered by humans and towards hotter temperatures.