Created
June 18, 2022 08:52
-
-
Save cavedave/53fa530945708f4533ad110fc59fd833 to your computer and use it in GitHub Desktop.
Looking at the actual data discussed in this 2013 articlel claiming no increase in world temperature 1998-2013 https://www.dailymail.co.uk/news/article-2425775/Climate-scientists-told-cover-fact-Earths-temperature-risen-15-years.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#choose or open the file directly | |
f <- file.choose() | |
library(dplyr) | |
trust <- read.csv(f) | |
#trust <- read.csv("HadCRUT.csv",header=TRUE) | |
head(trust) | |
#names(trust)[names(trust) == 'Anomaly..deg.C.'] <- "Anomaly..deg.C" | |
#if graphing all not filtering by year | |
vac<-trust | |
vac<-trust %>% | |
filter((Time >1997 & Time <2014)) | |
head(vac) | |
#theme | |
theme_web_bw <- function() { | |
theme_bw() + # note ggplot2 theme is used as a basis | |
theme(plot.title = element_text(size = 16, face = "bold", | |
hjust = .5, | |
margin = margin(t = 5, b = 25)), | |
plot.caption = element_text(size = 12, hjust = 0, | |
margin = margin(t = 15)), | |
panel.grid.major = element_line(colour = "grey88"), | |
panel.grid.minor = element_blank(), | |
legend.title = element_text(size = 14, face = "bold"), | |
legend.text = element_text(size = 14), | |
strip.text = element_text(size = 14, face = "bold"), | |
axis.text = element_text(size = 14), | |
axis.title.x = element_text(margin = margin(t = 10), size = 15), | |
axis.title.y = element_text(margin = margin(r = 10), size = 15)) | |
} | |
library(ggplot2) | |
# Basic scatter plot | |
ggplot(vac, aes(x=Time, y=Anomaly..deg.C.)) + geom_point()+ | |
geom_smooth(method=lm) + | |
ggtitle("World Temperature over time", subtitle="Hadcrut date. Anomoly above 1950-1980 average")+theme_web_bw() | |
ggsave("MailAll.png") |
Author
cavedave
commented
Jun 18, 2022
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment