options(jupyter.plot_mimetypes = c("text/plain", "image/png" ))
options(repr.plot.width=12, repr.plot.height=5)
suppressPackageStartupMessages(library(zoo))
suppressPackageStartupMessages(library(RCurl))
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/67ec546d-074b-430c-90d9-6dc2f60706c0/download/temperaturefeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Temperature",xlab=" ",ylab="\u00b0 Celsius",col="cornflowerblue")
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/4f1da9b5-8ddd-4c2e-ad6d-7905ec36037f/download/pressurefeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Atmospheric pressure",xlab=" ",ylab="hPa",col="cornflowerblue",lwd=2)
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/3bb800a7-bf19-42bf-ace1-cf08a327306b/download/humidityfeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Relative humidity",xlab=" ",ylab="%",col="cornflowerblue")
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/606b12bb-8ed8-4ca5-af98-2b07f7f73ea5/download/precipitationfeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Precipitation",xlab=" ",ylab="mm",col="cornflowerblue",lwd=2)
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/be63190d-b24e-4a8f-bfb7-c36f7521a495/download/windspeedfeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Wind speed",xlab=" ",ylab="m/s",col="cornflowerblue")
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/742ebc59-cf69-41af-9ced-34ee03b5c3db/download/winddirectionfeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Wind direction",xlab=" ",ylab="\u00b0",col="cornflowerblue",type="p",pch=20)
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/8115df38-3d36-4415-ba39-b9c56405ddc1/download/solardiffusefeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Diffuse solar radiation",xlab=" ",ylab=expression(paste("W/m"^"2")),col="cornflowerblue")
myfile <- getURL('https://rdm.inesctec.pt/dataset/96ee15e5-58a6-4d38-a167-0e7508d192fb/resource/a592cd9e-663b-4d13-8779-b35e0a61af4e/download/solarglobalfeup.txt',ssl.verifyhost=FALSE, ssl.verifypeer=FALSE)
dat=read.table(textConnection(myfile),header=FALSE,sep="",stringsAsFactors=FALSE)
# data date/time as POSIXct
dat.times=as.POSIXct(paste(dat$V1,dat$V2),format="%Y-%m-%d %H:%M:%S",tz="UTC")
# time series
dat.zoo=zoo(dat$V3,dat.times)
# time series plot
plot(dat.zoo, main="Global solar radiation",xlab=" ",ylab=expression(paste("W/m"^"2")),col="cornflowerblue")