Omnidirectional variogram for large dataset

Here you can report the problems encountered when using a function relative to the variography:
- experimental variography (vario.calc, vario.grid, vmap.calc, ...)
- model fitting (model.auto)

Omnidirectional variogram for large dataset

Postby Sammy1405 » Fri May 13, 2022 1:28 pm

Hi,

I was using omnidirectional variogram code for a very large dataset (110,000+ observations/rows). When I run the following code on RStudio Server, it freezes:-

Code: Select all
 vario.omni <- vario.calc(db, nlag = 10)
 plot(
   vario.omni,
   type = "p",
   pch = 19,
   npairpt= TRUE,
   npairdw= FALSE,
   title = paste(property, "Experimental Ominidirectional Variogram"),
   xlab = "Log distance",
   ylab = expression(paste("Variance (", gamma, "(h))", sep="")))


However, when I tried this code for a smaller dataset (~200 rows/observations), the code ran just fine. I was wondering how I can resolve the issue.

Thank you.

Regards,
Sameera
Sammy1405
 
Posts: 5
Joined: Tue Jan 11, 2022 4:57 pm

Re: Omnidirectional variogram for large dataset

Postby Fabien Ors » Sun May 15, 2022 7:18 pm

Dear Sameera.
Could you please provide us the full code and data in order to reproduce the issue ?
Thank you very much.
Best regards
Fabien Ors
Administrateur du site
 
Posts: 226
Joined: Thu Sep 20, 2012 1:07 pm

Re: Omnidirectional variogram for large dataset

Postby Sammy1405 » Thu May 19, 2022 12:49 pm

Hi Fabien,

Sure! Since the dataset is large, I saved it on GDrive: https://drive.google.com/file/d/1c2D_mY ... sp=sharing (please let me know if you have trouble accessing the file). Just wanted to mention that the data is taken from the USGS website. Here's the code:-

Code: Select all
geo_df <- read.csv("../geo_df.csv", stringsAsFactors = F, header = T)

prop <- "temp_c"
xlon <- "lon"
ylat <- "lat"

db <-
  geo_df %>%
  # selecting only the numerical variables
  select_if(is.numeric) %>%
  db.create() %>%
  db.locate(c(xlon, ylat), "x") %>%
  db.locate(names = prop, loctype = "z")

vario_omni <- vario.calc(db, nlag = 10)
plot(
  vario_omni,
  type = "p",
  pch = 19,
  npairpt= TRUE,
  npairdw= FALSE,
  title = paste(property, "Experimental Ominidirectional Variogram"),
  xlab = "Log distance",
  ylab = expression(paste("Variance (", gamma, "(h))", sep="")))


I have also seen some latitude and longitude values repeating in the dataset. I am wondering if that is causing an issue.

Thanks for your help!

Regards,
Sameera
Sammy1405
 
Posts: 5
Joined: Tue Jan 11, 2022 4:57 pm


Return to Variography

Who is online

Users browsing this forum: No registered users and 2 guests