Skip to content

Instantly share code, notes, and snippets.

View mxblsdl's full-sized avatar
🦊
Focusing

Max Blasdel mxblsdl

🦊
Focusing
View GitHub Profile
{
"type": "FeatureCollection",
"name": "all_impacts",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "county": "Lake of the Woods", "econ_impact": 131647.49328181348, "jobs": 1.1681756879242522 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -95.322964707356888, 48.998907333083032 ], [ -95.153512661955347, 48.998386977382054 ], [ -95.153233692709975, 49.38375958178603 ], [ -95.126376624797402, 49.368819802280491 ], [ -95.058294219232565, 49.352479010067924 ], [ -94.957345828938216, 49.369386615754749 ], [ -94.854084431368136, 49.323276863333881 ], [ -94.816054079842445, 49.320075671456912 ], [ -94.824982783717232, 49.293397322734549 ], [ -94.797316646178714, 49.196945420146783 ], [ -94.773020067331146, 49.119946576813803 ], [ -94.750028408201899, 49.09899485437505 ], [ -94.750086480114476, 48.999352863813307 ], [ -94.718803033463672, 48.999350964506746 ], [ -94.683001176087672, 48.884052337188216 ], [ -94.692464
library(tidyverse)
seq(-2, 2, by = 0.01) %>%
expand.grid(x = ., y = .) %>%
ggplot(aes(x = (1 - x - sin(y^2)),
y = (1 + y - cos(x^2)))) +
geom_point(alpha = 0.05,
shape = 20,
size = 0) +
theme_void() +
K constant Genus Species Size Class (cm) Reference Fuel Class Classification Notes
0.002 Abies amabilis 1.5 Erickson et al. 1985 branch Gymnosperm suspended material
0.009 Abies amabilis 10 Erickson et al. 1985 log Gymnosperm suspended material
0.003 Abies amabilis 1.5 Erickson et al. 1985 branch Gymnosperm on ground
0.009 Abies amabilis 10 Erickson et al. 1985 log Gymnosperm on ground
0.033 Abies balsamea 12.5 Foster & Lang 1982 log Gymnosperm averaged bole size
0.038 Abies balsamea 12.5 Foster & Lang 1982 bark Gymnosperm bark
0.049 Abies concolor 20 Harmon 1987 large log Gymnosperm
0.039 Abies concolor branch Harmon 1987 branch Gymnosperm
0.027 Abies concolor bark Harmon 1987 bark Gymnosperm bark
save_outputs <- switch(menu(c("Yes", "No"), title = "Save Outputs?", graphics = T),
T,
F)
as.data.table.raster <- function(x, row.names = NULL, optional = FALSE, xy=FALSE, inmem = canProcessInMemory(x, 2), ...) {
stopifnot(require("data.table"))
if(inmem) {
v <- as.data.table(as.data.frame(x, row.names=row.names, optional=optional, xy=xy, ...))
} else {
tr <- blockSize(x, n=2)
l <- lapply(1:tr$n, function(i)
as.data.table(as.data.frame(getValues(x,
row=tr$row[i],