An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20110701/57425986/attachment.pl>
space-time kriging
7 messages · Pınar Aslantas Bostan, Tom Gottfried, Edzer Pebesma
Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr,
On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all, I am working about space-time (ST) kriging. I want to make ST ordinary kriging with sparse data set. Dependent data is annual precipitation measured from 257 meteorological station. Observation period starts from 1970 and finishes at 2008, so temporal entity of my study contains 39 year-value. Precipitation data comprised from 5365 value. It is not equal to 257 (location) *39 (time), because some stations has no value for some years. Therefore my data set fits to STSDF. An index table is required for STSDF object. But I could not create correct index object, my code does not work. I tried to summarize my code: # creating STSDF object # sp is spatial entity (257 spatial location) # time is temporal entity (39 year period) # prec is data attribute (5365 number of annual precipitation value) index <- as.matrix(expand.grid(1:length(sp),1:nrow(time))) w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index) Error: nrow(object at index) == nrow(object at data) is not TRUE Can you please help me about this error, how can I create correct index object? Thank you all in advance! With my best regards, Pinar Pinar Aslantas Bostan Research Assistant Department of Geodetic and Geographic Information Technologies (GGIT) Middle East Technical University 06531 Ankara/TURKEY aslantas at metu.edu.tr [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de
Hi Edzer, Thank you for your mail. Prec data has location and time information.
prec_data[1:10,]
Station X Y Prec Year Month Day 1 17020 693894 4931348 1274.4 1970 1 1 2 17020 693894 4931348 1134.3 1971 1 1 3 17020 693894 4931348 940.7 1972 1 1 4 17020 693894 4931348 1253.3 1973 1 1 5 17020 693894 4931348 940.8 1974 1 1 6 17020 693894 4931348 913.4 1975 1 1 7 17020 693894 4931348 895.3 1976 1 1 8 17020 693894 4931348 803.5 1977 1 1 9 17020 693894 4931348 993.1 1978 1 1 10 17020 693894 4931348 976.4 1979 1 1 -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma Sent: Friday, July 01, 2011 2:50 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr,
On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all, I am working about space-time (ST) kriging. I want to make ST ordinary kriging with sparse data set. Dependent data is annual precipitation measured from 257 meteorological station. Observation period starts from 1970 and finishes at 2008, so temporal entity of my study contains 39 year-value. Precipitation data comprised from 5365 value. It is not equal to 257 (location) *39 (time), because some stations has no value for some years. Therefore my data set fits to STSDF. An index table is required for STSDF object. But I could not create correct index object, my code does not work. I tried to summarize my code: # creating STSDF object # sp is spatial entity (257 spatial location) # time is temporal entity (39 year period) # prec is data attribute (5365 number of annual precipitation value) index <- as.matrix(expand.grid(1:length(sp),1:nrow(time))) w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index) Error: nrow(object at index) == nrow(object at data) is not TRUE Can you please help me about this error, how can I create correct index object? Thank you all in advance! With my best regards, Pinar Pinar Aslantas Bostan Research Assistant Department of Geodetic and Geographic Information Technologies (GGIT) Middle East Technical University 06531 Ankara/TURKEY aslantas at metu.edu.tr [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
You could try index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year))) Tom Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:
Hi Edzer, Thank you for your mail. Prec data has location and time information.
prec_data[1:10,]
Station X Y Prec Year Month Day 1 17020 693894 4931348 1274.4 1970 1 1 2 17020 693894 4931348 1134.3 1971 1 1 3 17020 693894 4931348 940.7 1972 1 1 4 17020 693894 4931348 1253.3 1973 1 1 5 17020 693894 4931348 940.8 1974 1 1 6 17020 693894 4931348 913.4 1975 1 1 7 17020 693894 4931348 895.3 1976 1 1 8 17020 693894 4931348 803.5 1977 1 1 9 17020 693894 4931348 993.1 1978 1 1 10 17020 693894 4931348 976.4 1979 1 1 -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma Sent: Friday, July 01, 2011 2:50 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr, On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all, I am working about space-time (ST) kriging. I want to make ST ordinary kriging with sparse data set. Dependent data is annual precipitation measured from 257 meteorological station. Observation period starts from 1970 and finishes at 2008, so temporal entity of my study contains 39 year-value. Precipitation data comprised from 5365 value. It is not equal to 257 (location) *39 (time), because some stations has no value for some years. Therefore my data set fits to STSDF. An index table is required for STSDF object. But I could not create correct index object, my code does not work. I tried to summarize my code: # creating STSDF object # sp is spatial entity (257 spatial location) # time is temporal entity (39 year period) # prec is data attribute (5365 number of annual precipitation value) index<- as.matrix(expand.grid(1:length(sp),1:nrow(time))) w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index) Error: nrow(object at index) == nrow(object at data) is not TRUE Can you please help me about this error, how can I create correct index object? Thank you all in advance! With my best regards, Pinar Pinar Aslantas Bostan Research Assistant Department of Geodetic and Geographic Information Technologies (GGIT) Middle East Technical University 06531 Ankara/TURKEY aslantas at metu.edu.tr [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Technische Universit?t M?nchen Department f?r Pflanzenwissenschaften Lehrstuhl f?r Gr?nlandlehre Alte Akademie 12 85350 Freising / Germany Phone: ++49 (0)8161 715324 Fax: ++49 (0)8161 713243 email: tom.gottfried at wzw.tum.de http://www.wzw.tum.de/gruenland
Thank you Tom! Now index is correct, comprised from 5365 record. I created STSDF object with this index. Best regards, Pinar -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Tom Gottfried Sent: Friday, July 01, 2011 3:35 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging You could try index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year))) Tom Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:
Hi Edzer, Thank you for your mail. Prec data has location and time information.
prec_data[1:10,]
Station X Y Prec Year Month Day 1 17020 693894 4931348 1274.4 1970 1 1 2 17020 693894 4931348 1134.3 1971 1 1 3 17020 693894 4931348 940.7 1972 1 1 4 17020 693894 4931348 1253.3 1973 1 1 5 17020 693894 4931348 940.8 1974 1 1 6 17020 693894 4931348 913.4 1975 1 1 7 17020 693894 4931348 895.3 1976 1 1 8 17020 693894 4931348 803.5 1977 1 1 9 17020 693894 4931348 993.1 1978 1 1 10 17020 693894 4931348 976.4 1979 1 1 -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma Sent: Friday, July 01, 2011 2:50 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr, On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all, I am working about space-time (ST) kriging. I want to make ST ordinary kriging with sparse data set. Dependent data is annual precipitation measured from 257 meteorological station. Observation period starts from 1970 and finishes at 2008, so temporal entity of my study contains 39 year-value. Precipitation data comprised from 5365 value. It is not equal to 257 (location) *39 (time), because some stations has no value for some years. Therefore my data set fits to STSDF. An index table is required for STSDF object. But I could not create correct index object, my code does not work. I tried to summarize my code: # creating STSDF object # sp is spatial entity (257 spatial location) # time is temporal entity (39 year period) # prec is data attribute (5365 number of annual precipitation value) index<- as.matrix(expand.grid(1:length(sp),1:nrow(time))) w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index) Error: nrow(object at index) == nrow(object at data) is not TRUE Can you please help me about this error, how can I create correct index object? Thank you all in advance! With my best regards, Pinar Pinar Aslantas Bostan Research Assistant Department of Geodetic and Geographic Information Technologies (GGIT) Middle East Technical University 06531 Ankara/TURKEY aslantas at metu.edu.tr [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Technische Universit?t M?nchen Department f?r Pflanzenwissenschaften Lehrstuhl f?r Gr?nlandlehre Alte Akademie 12 85350 Freising / Germany Phone: ++49 (0)8161 715324 Fax: ++49 (0)8161 713243 email: tom.gottfried at wzw.tum.de http://www.wzw.tum.de/gruenland _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Pinar / Tom,
another route you might follow is (improvised):
require(spacetime)
prec_data$YearDate = as.Date(paste(prec_data$Year, "1", "1",sep="-"))
x = stConstruct(prec_data, c("X", "Y"), "YearDate")
class(x) # STIDF
x = as(x, "STSDF") # will sort out common locations & times
Bests,
On 07/01/2011 02:34 PM, Tom Gottfried wrote:
You could try index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year))) Tom Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:
Hi Edzer, Thank you for your mail. Prec data has location and time information.
prec_data[1:10,]
Station X Y Prec Year Month Day 1 17020 693894 4931348 1274.4 1970 1 1 2 17020 693894 4931348 1134.3 1971 1 1 3 17020 693894 4931348 940.7 1972 1 1 4 17020 693894 4931348 1253.3 1973 1 1 5 17020 693894 4931348 940.8 1974 1 1 6 17020 693894 4931348 913.4 1975 1 1 7 17020 693894 4931348 895.3 1976 1 1 8 17020 693894 4931348 803.5 1977 1 1 9 17020 693894 4931348 993.1 1978 1 1 10 17020 693894 4931348 976.4 1979 1 1 -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma Sent: Friday, July 01, 2011 2:50 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr, On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all,
I am working about space-time (ST) kriging. I want to make ST ordinary
kriging with sparse data set. Dependent data is annual precipitation
measured from 257 meteorological station. Observation period starts from
1970 and finishes at 2008, so temporal entity of my study contains 39
year-value. Precipitation data comprised from 5365 value. It is not
equal to
257 (location) *39 (time), because some stations has no value for some
years. Therefore my data set fits to STSDF. An index table is
required for
STSDF object. But I could not create correct index object, my code
does not
work.
I tried to summarize my code:
# creating STSDF object
# sp is spatial entity (257 spatial location)
# time is temporal entity (39 year period)
# prec is data attribute (5365 number of annual precipitation value)
index<- as.matrix(expand.grid(1:length(sp),1:nrow(time)))
w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index)
Error: nrow(object at index) == nrow(object at data) is not TRUE
Can you please help me about this error, how can I create correct index
object?
Thank you all in advance!
With my best regards,
Pinar
Pinar Aslantas Bostan
Research Assistant
Department of Geodetic and
Geographic Information Technologies (GGIT) Middle East Technical
University
06531 Ankara/TURKEY
aslantas at metu.edu.tr
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de
Edzer, I will try also your suggestion. Thank you.
Best wishes,
-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma
Sent: Friday, July 01, 2011 4:27 PM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] space-time kriging
Pinar / Tom,
another route you might follow is (improvised):
require(spacetime)
prec_data$YearDate = as.Date(paste(prec_data$Year, "1", "1",sep="-"))
x = stConstruct(prec_data, c("X", "Y"), "YearDate")
class(x) # STIDF
x = as(x, "STSDF") # will sort out common locations & times
Bests,
On 07/01/2011 02:34 PM, Tom Gottfried wrote:
You could try index <- cbind(as.integer(as.factor(prec_data$Station)), as.integer(as.factor(prec_data$Year))) Tom Am 01.07.2011 14:02, schrieb P?nar Aslantas Bostan:
Hi Edzer, Thank you for your mail. Prec data has location and time information.
prec_data[1:10,]
Station X Y Prec Year Month Day 1 17020 693894 4931348 1274.4 1970 1 1 2 17020 693894 4931348 1134.3 1971 1 1 3 17020 693894 4931348 940.7 1972 1 1 4 17020 693894 4931348 1253.3 1973 1 1 5 17020 693894 4931348 940.8 1974 1 1 6 17020 693894 4931348 913.4 1975 1 1 7 17020 693894 4931348 895.3 1976 1 1 8 17020 693894 4931348 803.5 1977 1 1 9 17020 693894 4931348 993.1 1978 1 1 10 17020 693894 4931348 976.4 1979 1 1 -----Original Message----- From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Edzer Pebesma Sent: Friday, July 01, 2011 2:50 PM To: r-sig-geo at r-project.org Subject: Re: [R-sig-Geo] space-time kriging Hi Pinar, as you say, some data are missing, but the way you create index suggests none are missing. Does your table "prec" have information for each observation on which location and at which time it has been taken? Could you maybe show how prec[1:10,] looks like? Wbr, On 07/01/2011 01:12 PM, P?nar Aslantas Bostan wrote:
Dear all,
I am working about space-time (ST) kriging. I want to make ST ordinary
kriging with sparse data set. Dependent data is annual precipitation
measured from 257 meteorological station. Observation period starts from
1970 and finishes at 2008, so temporal entity of my study contains 39
year-value. Precipitation data comprised from 5365 value. It is not
equal to
257 (location) *39 (time), because some stations has no value for some
years. Therefore my data set fits to STSDF. An index table is
required for
STSDF object. But I could not create correct index object, my code
does not
work.
I tried to summarize my code:
# creating STSDF object
# sp is spatial entity (257 spatial location)
# time is temporal entity (39 year period)
# prec is data attribute (5365 number of annual precipitation value)
index<- as.matrix(expand.grid(1:length(sp),1:nrow(time)))
w= STSDF(sp, time, data.frame(values = as.vector(t(prec))),index)
Error: nrow(object at index) == nrow(object at data) is not TRUE
Can you please help me about this error, how can I create correct index
object?
Thank you all in advance!
With my best regards,
Pinar
Pinar Aslantas Bostan
Research Assistant
Department of Geodetic and
Geographic Information Technologies (GGIT) Middle East Technical
University
06531 Ankara/TURKEY
aslantas at metu.edu.tr
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo