In extract_country_data(), errors in downloading of spatial files are handled by toggling sf_use_s2(). It would be preferable to have the ability to handle errors in loading spatial files in an iterative way:
sf_use_s2(T): default
Change mode by toggling sf_use_s2(F) if first pass fails.
If step 2 fails, then use a st_make_valid()
In cases other than no. 1, we should write a clear warning stating the process we are using and which data we are implementing it to. This helps with informing the user potential issues when they end up mapping their data and help us potentially spot future errors that we may not have accounted for.
In
extract_country_data()
, errors in downloading of spatial files are handled by togglingsf_use_s2()
. It would be preferable to have the ability to handle errors in loading spatial files in an iterative way:sf_use_s2(T)
: defaultsf_use_s2(F)
if first pass fails.st_make_valid()
In cases other than no. 1, we should write a clear warning stating the process we are using and which data we are implementing it to. This helps with informing the user potential issues when they end up mapping their data and help us potentially spot future errors that we may not have accounted for.