MazamaScience / AirFireModeling

Utilities to ease merging of USFS AirFire model output and monitoring data.
0 stars 0 forks source link

Lazy_Evaluation article #43

Closed jonathancallahan closed 4 years ago

jonathancallahan commented 4 years ago

I think it will be very important for us to have a document explaining what "lazy evaluation" is in the context of NetCDF datasets and how they are loaded by the raster package.

This will inform how people work with data and will help to avoid issues associated with loading too much data at once.

This task will be a chance for you to read up on and become fairly expert in delayed evaluation. Total time for this task with reading and writing should be 6-12 hours.

Please create articles/Lazy_Evaluation.Rmd with the sections outlined below. These are suggested sections and you may restructure the document if you wish.


Lazy Evaluation

What is it.

NetCDF

What is it and why/how does it use lazy evaluation.

raster

Lazy evaluation in the context of the raster package.

example 1

(Using raster package only functions from the example I pasted into Slack.)

AirFireModeling

example 2

_(Reduced example similar to above but using bluesky_load() .)_

optimization

Discussion of the importance of using xlim and ylim parameters to bluesky_load().

example 2

Perhaps use the example in raster_toMonitor() with shadedNight = TRUE and better labeling.

tabrasel commented 4 years ago

A question on example#1: It seems that delayed evaluation is used when rasters are loaded in from a file. I can conveniently show that using bluesky_load but it sounds like I should not be using any non-raster package functions here. I can still load a raster from an existing file, but there is no guarantee that file will exist on a reader's machine and I don't want to force loading one into their working directory.

Any suggestions on what to do for this example then? Maybe I should just what to give an example after introducing the AirFireModeling functions.

jonathancallahan commented 4 years ago

I just read what you have so far and I like it very much so far. (I'm learning things!)

I think it's OK to use functions like bluesky_load() when talking about rasters in general. This article is part of the AirFireModeling package after all. Once you have an example to work with then my previous examples in Slack don't use any AirFireModeling functions.

The "raster" section just needs to demonstrate that lazy evaluation happens in the raster package and introduce users to a few techniques for investigating raster objects.

The "AirFireModeling" section can focus more on functions and and arguments associated with the AirFireModeling package.