wpgp/wopr

woprize is giving me an error

Closed this issue · 5 comments

I am trying to get population estimates for areas within Guinea.

And I get an error message back, plus a couple of warnings.

The warnings either refer to an unknown column 'geometry' or 'geom', depending on whether I've renamed geometry to geom or not.

I presume I'm just doing something wrong.

G <- woprize(features = focidg, country = 'GIN', version = '1.0', confidence = 0.95)
Submitting 4 feature(s) to:
  https://api.worldpop.org/v1/wopr/polytotal
Checking status of 36 tasks:
  Error in results[[j]] : subscript out of bounds
In addition: Warning messages:
1: Unknown or uninitialised column: `geometry`.
2: Unknown or uninitialised column: `geometry`.

Would you mind sharing your vector file or at least its structure?

Here's a zipped RData file containing focidg
(dropped attachment when completed)
Can you delete when you're finished with it, please?

Dear wlepbc, I don't have any issue in processing your file.
It's true the warning "1: Unknown or uninitialised column: geometry." is returned but it does not affect the results.

I have processed as such to check if any polygon had an issue, but non was found:

results <- list() 

for(i in 1:nrow(focidg)){
  results[[i]] <- wopr::woprize(focidg[i,], 'GIN', '1.0', confidence = 0.95)
}

I can send you the results if you want.

So I've updated from R 4.0 to R4.2 this morning, and reinstalled all my packages, and it is now working fine.

Sorry to have wasted your time with this.