Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worldclim_country is full of NaNs for US #45

Open
brendanwallison opened this issue May 7, 2023 · 3 comments
Open

worldclim_country is full of NaNs for US #45

brendanwallison opened this issue May 7, 2023 · 3 comments

Comments

@brendanwallison
Copy link

brendanwallison commented May 7, 2023

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

@mcx8
Copy link

mcx8 commented Dec 14, 2023

I have the same issue and was wondering if this has been resolved?

@Alexromer2
Copy link

I'm also experiencing this issue

@jwbenning
Copy link

I'm having this same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants