Yeah, so, Global Warming, erm, I mean, Climate Change, I mean, WGAF….the world is getting warmer and extreme weather events are becoming more common. Anyhow…
I decided to see if there was measurable local warming present; this blog post is to demonstrate a quick and dirty project to illustrate exactly that. NOAA has a lovely website where you can download (FOR FREE!) daily weather data for any zip code in the US. I chose my hometown of Hopewell, VA (ZIP: 23860) as an example starting at 1950-01-01 to the present (2018-05-09 was the latest date).
I read the data into a KNIME workflow, calculated the daily average (TMAX+TMIN)/2, applied an exponential smoother (window size = 365), and then used the R View node to display it with a linear smoother (n=365) to show the trend.
The plotting code is pretty simple:
ggplot(data=knime.in, aes(x=as.Date(knime.in$”DATE”, “%Y-%m-%d”), y = knime.in$”MA(TAVG)”, group=1)) +
scale_x_date(date_breaks = “10 year”, date_labels = “%Y”)+
ggtitle(“Hopewell (Zip: 23860) Temperatures 1951-08-15 to 2018-05-09”) +
ylab(“Smoothed Average Daily Temperature”) +
geom_smooth(method=lm, n=365, aes(color=”red”))+
I filtered out the first 365 rows of data, because the exponential smoother broke down at the the beginning of the data.
The result?!? Holy moly, even only over the course of the last ~70 years, there is a clear upward trend! Local Warming it is!
(I haven’t included the workflow itself, because it’s not one of WordPress’s supported media types.)