worldclim_country is full of NaNs for US
brendanwallison opened this issue · 4 comments
It works for a smaller country like Iceland:
wc <- worldclim_country("Iceland", "bio", ".") wc
class : SpatRaster
dimensions : 840, 1920, 12 (nrow, ncol, nlyr)
resolution : 0.008333333, 0.008333333 (x, y)
extent : -28, -12, 60, 67 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326)
source : ISL_wc2.1_30s_tavg.tif
names : ISL_wavg_1, ISL_wavg_2, ISL_wavg_3, ISL_wavg_4, ISL_wavg_5, ISL_wavg_6, ...
min values : -8.8, -9.8, -11.2, -10.2, -6.1, -2.7, ...
max values : 6.3, 5.9, 5.4, 5.9, 7.7, 10.8, ...
while
wc4 <- worldclim_country("US", "bio", ".") wc4
class : SpatRaster
dimensions : 6540, 43140, 19 (nrow, ncol, nlyr)
resolution : 0.008333333, 0.008333333 (x, y)
extent : -179.5, 180, 18.5, 73 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326)
source : USA_wc2.1_30s_bio.tif
names : wc2.1bio_1, wc2.1bio_2, wc2.1bio_3, wc2.1bio_4, wc2.1bio_5, wc2.1bio_6, ...
Notice the lack of min and max values and the extent that doesn't make sense. If I take the summary, it is nothing but NaNs
summary(wc4)
wc2.1_30s_bio_1 wc2.1_30s_bio_2 wc2.1_30s_bio_3
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_4 wc2.1_30s_bio_5 wc2.1_30s_bio_6
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_7 wc2.1_30s_bio_8 wc2.1_30s_bio_9
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_10 wc2.1_30s_bio_11 wc2.1_30s_bio_12
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_13 wc2.1_30s_bio_14 wc2.1_30s_bio_15
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_16 wc2.1_30s_bio_17 wc2.1_30s_bio_18
Min. : NA Min. : NA Min. : NA
1st Qu.: NA 1st Qu.: NA 1st Qu.: NA
Median : NA Median : NA Median : NA
Mean :NaN Mean :NaN Mean :NaN
3rd Qu.: NA 3rd Qu.: NA 3rd Qu.: NA
Max. : NA Max. : NA Max. : NA
NA's :100812 NA's :100812 NA's :100812
wc2.1_30s_bio_19
Min. : NA
1st Qu.: NA
Median : NA
Mean :NaN
3rd Qu.: NA
Max. : NA
NA's :100812
Warning message:
[summary] used a sample
I have the same issue and was wondering if this has been resolved?
I'm also experiencing this issue
I'm having this same issue