bioXgeo / geodiv

Other
11 stars 2 forks source link

Vignette Data #2

Closed adammwilson closed 3 years ago

adammwilson commented 4 years ago

You will probably have to include the data for the vignettes in the package if you want it to build on cran (or to allow other people to build it). Right now the data objects reference files on your local computer:

> oregonEVI
class      : RasterLayer 
dimensions : 1918, 3670, 7039060  (nrow, ncol, ncell)
resolution : 0.002245788, 0.002245788  (x, y)
extent     : -124.7041, -116.4621, 41.99175, 46.29917  (xmin, xmax, ymin, ymax)
crs        : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
source     : /home/annie/Downloads/oregon_max_growing_season_EVI_2000_2019 (1).tif 
names      : oregon_max_growing_season_EVI_2000_2019_.1. 
values     : -3.2768, 3.2767  (min, max)

> # import EVI and elevation rasters into R
> data(oregonEVI)
> str(oregonEVI)
Error in .local(.Object, ...) : 

Note the source in the code above. Check out use_data() in devtools.

Also, what if you just made this region much smaller - like a single mountain or similar so you can run the full set of metrics on the full resolution? That would make more sense for a demonstration, I think. No reason to do the entire state at 250m resolution. Maybe switch to 1km and crop to a 200x200 area or so...

AnnieCooper commented 4 years ago

This dataset was too big, so I added a smaller elevation raster in addition to the existing NDVI rasters. It should work now.

Still deciding on the vignette example... Several of the functions can be applied with the texture image function over the orforest/orelevation datasets on my laptop, but most of them would require a better computer to be applied to the images.

Is it ok to only use some of the metrics for the texture image examples, or should we keep the example smaller-scale, but apply all functions? Right now those images are 371 x 371.

AnnieCooper commented 3 years ago

Changed vignette data to pull from figshare so that the R package can include the vignette.