Local Warming

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.

workflow.svg

The plotting code is pretty simple:

library(ggplot2)
ggplot(data=knime.in, aes(x=as.Date(knime.in$”DATE”, “%Y-%m-%d”), y = knime.in$”MA(TAVG)”, group=1)) +
geom_line()+
scale_x_date(date_breaks = “10 year”, date_labels = “%Y”)+
ggtitle(“Hopewell (Zip: 23860) Temperatures 1951-08-15 to 2018-05-09”) +
xlab(“Date”) +
ylab(“Smoothed Average Daily Temperature”) +
geom_smooth(method=lm, n=365, aes(color=”red”))+
theme(legend.position=”none”)

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!

smoothedTemp

(I haven’t included the workflow itself, because it’s not one of WordPress’s supported media types.)

 

Advertisements
This entry was posted in Data Activisim, Data Mining, Information Visualization, KNIME, Tutorial. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s