Radon concentration from INESC TEC station (Porto) - 2019

In [52]:
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 [53]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/f57fbabd-c96f-4931-bccc-696774464301/download/radoninesc201901.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)
data2019.01 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-01-01 to 2019-01-31 18:00:00"
Joining, by = "dat.times"

In [54]:
ts.zoo=zoo(data2019.01$Rn,data2019.01$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="January 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [55]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/5e12584b-327f-4066-92f6-cc10394b6d90/download/radoninesc201902.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)
data2019.02 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-02-01 to 2019-02-28 18:00:00"
Joining, by = "dat.times"

In [56]:
ts.zoo=zoo(data2019.02$Rn,data2019.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 = "Rn (Bq/m3)",xlab="day",col="darkmagenta", main="February 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [57]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/805df922-b208-4499-8e0c-0d8ead9db628/download/radoninesc201903.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)
data2019.03 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-03-01 to 2019-03-31 18:00:00"
Joining, by = "dat.times"

In [58]:
ts.zoo=zoo(data2019.03$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [59]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/a53d8778-c4b4-479b-b4be-bb60ea6ce256/download/radoninesc201904.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)
data2019.04 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-04-01 to 2019-04-30 18:00:00"
Joining, by = "dat.times"

In [60]:
ts.zoo=zoo(data2019.04$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [61]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/ed2e8548-8542-40a1-bf13-bbae8abfd3e0/download/radoninesc201905.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)
data2019.05 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-05-01 to 2019-05-31 18:00:00"
Joining, by = "dat.times"

In [62]:
ts.zoo=zoo(data2019.05$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [63]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/4886ea59-754e-478c-ada4-1da53df9c3c3/download/radoninesc201906.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)
data2019.06 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-06-01 to 2019-06-30 18:00:00"
Joining, by = "dat.times"

In [64]:
ts.zoo=zoo(data2019.06$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [65]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/b42207b2-9574-4842-8c61-de56cae45cd3/download/radoninesc201907.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)
data2019.07 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-07-01 to 2019-07-31 18:00:00"
Joining, by = "dat.times"

In [66]:
ts.zoo=zoo(data2019.07$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [67]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/0286d1eb-3a4f-4ad1-bc94-7f9fe5c70013/download/radoninesc201908.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)
data2019.08 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-08-01 to 2019-08-31 18:00:00"
Joining, by = "dat.times"

In [68]:
ts.zoo=zoo(data2019.08$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [69]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/99f19717-3650-4a0c-86b8-5e5986a0a468/download/radoninesc201909.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)
data2019.09 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-09-01 to 2019-09-30 18:00:00"
Joining, by = "dat.times"

In [70]:
ts.zoo=zoo(data2019.09$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [71]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/277e5b07-dc5c-4927-b146-bacea1d9f61a/download/radoninesc201910.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)
data2019.10 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-10-01 to 2019-10-31 18:00:00"
Joining, by = "dat.times"

In [72]:
ts.zoo=zoo(data2019.10$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [73]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/e974b911-1223-478e-a741-522042b468f4/download/radoninesc201911.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)
data2019.11 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-11-01 to 2019-11-30 18:00:00"
Joining, by = "dat.times"

In [74]:
ts.zoo=zoo(data2019.11$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)
In [75]:
myfile <- getURL('https://rdm.inesctec.pt/dataset/8e80ec16-8124-4305-9d75-d0816ddc15b2/resource/8fb79a10-dcd5-4bac-b7ad-67c7a7d2b17e/download/radoninesc201912.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)
data2019.12 <- full_join(df,data.frame(dat.times=dat.times, Rn=Rn))
[1] "data from 2019-12-01 to 2019-12-31 18:00:00"
Joining, by = "dat.times"

In [76]:
ts.zoo=zoo(data2019.12$Rn,data2019.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 2019",xaxt="n",type="b",pch=20)
axis(1, at = ticks,labels=labs, tcl = -0.3)