after running tidy() I got:
Error in is.data.frame(x) :
'list' object cannot be coerced to type 'double'
Error is solved by dropping the geometry. I imagine with tidy you are trying to convert the multipolygon to a non-spatial format, but I am not sure why is not doing it with the SF.
Solved by
world_sp_tidy <- st_drop_geometry(world_sp)
https://github.com/dime-worldbank/big-data-poverty-estimation/blob/5b69a88c6e5bbf8ccdd699d4acd3ffd4623d9f49/DataWork/05_figures_tables_global/main/levels_2_global_scatterplot_average_map.R#L225
after running
tidy()
I got: Error in is.data.frame(x) : 'list' object cannot be coerced to type 'double'Error is solved by dropping the geometry. I imagine with tidy you are trying to convert the multipolygon to a non-spatial format, but I am not sure why is not doing it with the SF.
Solved by
world_sp_tidy <- st_drop_geometry(world_sp)