All posts
-
🔗Kernel Density Estimation in R
For a recent project I needed to run a kernel density estimation in R, turning GPS points into a raster of point densities. Below is how I accomplished that.
-
🔗Helpful Wordpress Snippets
Some helpful Wordpress snippets that I am always looking up.
-
🔗Cumulative Distribution Function
Cumulative distribution functions allow you to answer the questions, what percent of my sample is less than or greater than a value. For example I work with sage-brush cover frequently. With a cumulative distribution function I can answer the question, what proportion of my plots with sagebrush have greater than 90% cover.
-
🔗Subset Raster Extent w/ R
A little snippet that helps subset raster extents.
-
🔗Remote Sensing Tools
A collection of tools and documentation on remote sensing.
-
🔗Extract Raster Values
Below is a method to use the raster package
extract()
function to get a subet of rasterBrick values. To be specific, I need to extract all raster values that are within a polygon boundary. In the past I have usedcrop()
,mask()
and then thegetValues()
functions from theraster
package to subset data values within a polygon. But that method returns a data frame with a ton of NA values (anything outside of the crop area in the raster is an NA). This is fine most of the time but the current project that I am working on requires almost all of the memory on my computer. I'm working with extremely large rasters (2Gb). Removing the NA values after thecrop()
,mask()
, andgetValues()
process crashes my computer. So I need a more effecient process.