Radon concentration 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 [5]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/dad1a4d0-960e-4000-91c6-bfb45d7fe6d0/download/radoninesc201803.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.03 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-03-11 18:00:00 to 2018-03-31 18:00:00"
Joining, by = "dat.times"
In [6]:
ts.zoo=zoo(data2018.03$Rn,data2018.03$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="March 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [7]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/98c4060a-af81-4755-8d75-787356db46f1/download/radoninesc201804.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.04 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-04-01 to 2018-04-30 18:00:00"
Joining, by = "dat.times"
In [8]:
ts.zoo=zoo(data2018.04$Rn,data2018.04$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="April 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [9]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/815b2c24-7d58-49b3-ae50-e56d3a76f58f/download/radoninesc201805.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.05 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-05-01 to 2018-05-31 18:00:00"
Joining, by = "dat.times"
In [10]:
ts.zoo=zoo(data2018.05$Rn,data2018.05$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="May 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [11]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/c595893e-0baa-4656-b230-4107127a1c99/download/radoninesc201806.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.06 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-06-01 to 2018-06-30 18:00:00"
Joining, by = "dat.times"
In [12]:
ts.zoo=zoo(data2018.06$Rn,data2018.06$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="June 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [13]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/6c004e8c-2174-4046-85b2-32edf1f7bdb9/download/radoninesc201807.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.07 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-07-01 to 2018-07-31 18:00:00"
Joining, by = "dat.times"
In [14]:
ts.zoo=zoo(data2018.07$Rn,data2018.07$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="July 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [15]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/cc52eabc-1af3-4c78-9f0b-56fe5890b5bc/download/radoninesc201808.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.08 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-08-01 to 2018-08-31 18:00:00"
Joining, by = "dat.times"
In [16]:
ts.zoo=zoo(data2018.08$Rn,data2018.08$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="August 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [17]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/88e591f4-7202-4d8e-aea1-01c13bc0bd51/download/radoninesc201809.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.09 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-09-01 to 2018-09-30 18:00:00"
Joining, by = "dat.times"
In [18]:
ts.zoo=zoo(data2018.09$Rn,data2018.09$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="September 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [19]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/bbe0e93e-74e8-478f-bbd0-6875723397a9/download/radoninesc201810.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.10 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-10-01 to 2018-10-31 18:00:00"
Joining, by = "dat.times"
In [20]:
ts.zoo=zoo(data2018.10$Rn,data2018.10$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="October 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [21]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/312b7050-7e42-43ba-9168-e53e9b36ea26/download/radoninesc201811.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.11 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-11-01 to 2018-11-30 18:00:00"
Joining, by = "dat.times"
In [22]:
ts.zoo=zoo(data2018.11$Rn,data2018.11$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="November 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [2]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/e9f0897f-2e6c-457d-a354-21f6d639a585/download/radoninesc201812.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))

Rn=dat$V3

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

#fill-in gaps by adding missing times as NA values 
all.times <- seq.POSIXt(from=start.time, to=end.time, by=21600)
df <- data.frame(dat.times=all.times,stringsAsFactors=FALSE)
data2018.12 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2018-12-01 to 2018-12-31 18:00:00"
Joining, by = "dat.times"
In [3]:
ts.zoo=zoo(data2018.12$Rn,data2018.12$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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="December 2018",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [ ]: