Atmospheric electric field from INESC TEC station (Porto) - 2018

In [1]:
options(jupyter.plot_mimetypes = c("text/plain", "image/png" )) 
options(repr.plot.width=8, repr.plot.height=4)

suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(zoo))
suppressPackageStartupMessages(library(lubridate))
suppressPackageStartupMessages(library(RCurl))
In [3]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/d934ee1e-3520-44f8-a00e-d519b347397b/download/efieldinesc201802.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.02 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-02-21 to 2018-02-28 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [4]:
ts.zoo=zoo(data2018.02$V,data2018.02$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d-%m" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="",col="darkorange", main="February 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [5]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/c3259331-74d2-4fab-98ff-526ea69600d4/download/efieldinesc201803.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.03 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-03-01 to 2018-03-31 23:59:00"
[1] "number of gaps in data: 1"
Joining, by = "dat.times"
In [6]:
ts.zoo=zoo(data2018.03$V,data2018.03$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="March 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [7]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/0450b813-87f6-4180-833e-3f8bab89971f/download/efieldinesc201804.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.04 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-04-01 to 2018-04-30 23:59:00"
[1] "number of gaps in data: 1"
Joining, by = "dat.times"
In [8]:
ts.zoo=zoo(data2018.04$V,data2018.04$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="April 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [9]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/27a5910c-17f9-4661-984d-42b69896b843/download/efieldinesc201805.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.05 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-05-01 to 2018-05-31 23:58:00"
[1] "number of gaps in data: 1"
Joining, by = "dat.times"
In [10]:
ts.zoo=zoo(data2018.05$V,data2018.05$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="May 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [11]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/5f815caf-722f-43c0-ab4f-81ead594e102/download/efieldinesc201806.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.06 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-06-01 to 2018-06-30 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [12]:
ts.zoo=zoo(data2018.06$V,data2018.06$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="June 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [13]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/47bbc71e-5d25-42d2-9d53-d9aea2d4a889/download/efieldinesc201807.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.07 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-07-01 to 2018-07-31 23:59:00"
[1] "number of gaps in data: 1"
Joining, by = "dat.times"
In [14]:
ts.zoo=zoo(data2018.07$V,data2018.07$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="July 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [15]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/a9b891bf-f632-4cd7-9fe6-3184136688f2/download/efieldinesc201808.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.08 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-08-01 to 2018-08-31 23:59:00"
[1] "number of gaps in data: 1"
Joining, by = "dat.times"
In [16]:
ts.zoo=zoo(data2018.08$V,data2018.08$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="August 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [17]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/831c9cbe-b9dc-4879-8afa-6b2234039364/download/efieldinesc201809.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.09 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-09-01 to 2018-09-30 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [18]:
ts.zoo=zoo(data2018.09$V,data2018.09$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="September 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [19]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/0c8f17d2-bf36-4093-8035-a2f320f37562/download/efieldinesc201810.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.10 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-10-01 to 2018-10-31 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [20]:
ts.zoo=zoo(data2018.10$V,data2018.10$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="October 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [2]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/31d30c5a-e567-4619-8abe-8923cf58ae43/download/efieldinesc201811.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.11 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-11-01 to 2018-11-30 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [3]:
ts.zoo=zoo(data2018.11$V,data2018.11$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="November 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [2]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/ab12761a-8169-4622-ba73-c8ddc9eaddb7/resource/4ecedd0e-e931-4cc3-8174-db7411740328/download/efieldinesc201812.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")

start.time=dat.times[1]
end.time=dat.times[length(dat.times)]

print(paste("data from", start.time, "to", end.time))

V=dat$V3

# check for continuity of record [0 --> continuous record]; result=number of gaps
# 1-minute measurements --> 60 sec
ngaps=length(which(c(1,round(diff(unclass(dat.times)/60)))!=1))
gaps=which(c(1,round(diff(unclass(dat.times)/60)))!=1)

print(paste("number of gaps in data:", ngaps))

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=60)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.12 <- full_join(df,data.frame(dat.times=dat.times, V=V))
[1] "data from 2018-12-01 to 2018-12-31 23:59:00"
[1] "number of gaps in data: 0"
Joining, by = "dat.times"
In [3]:
ts.zoo=zoo(data2018.12$V,data2018.12$dat.times)

times <- time(zoo(ts.zoo))
ticks <- seq(times[1], times[length(times)], by = "days")

fmt <- "%d" # format for axis labels
labs <- format(ticks, fmt)

plot(ts.zoo,ylab = "Efield (V/m)",xlab="day",col="darkorange", main="December 2018",xaxt="n")
axis(1, at = ticks,labels=labs, tcl = -0.3)