Time series analysis with R: Testing stuff with NetAtmo data
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
I’ve got a NetAtmo weather station. One can download the measurements from its web interface as a CSV file. I wanted to give time series analysis with the extraction of seasonal components (‘decomposition’) a try, so I thought it would be a good opportunity to use the temperature measurements of my weather station. The data is available.
To make things visually a little easier, I only tried this with 14 days of temperature measurements, including all measurements from November 1st, 2015 till November 14th, 2015.
The raw data looks like this (on the x-axis, there is a running number of measurements):
data <- read.table("temps.csv", header = T, sep = "t")
plot(data$temp, type = “l”, bty = “n”, ylab = “Temperature in °C”)
In the last step, we decompose and plot the time series.
plot(stl(data$temp, s.window = “periodic”))
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.