Skip to content

Instantly share code, notes, and snippets.

View schochastics's full-sized avatar
👨‍🍼

David Schoch schochastics

👨‍🍼
View GitHub Profile
#### ---------------------------------------------
## Edit via: RStudio > Tools > Edit Code Snippets
# Released under a MIT license
snippet fragment
[${1:text}]{.${2:type}}
snippet aside
[${1:text}]{.aside}
@marcosci
marcosci / olympus_hex.R
Created November 5, 2021 12:32
Hexagonal Rayshading
library(LaCroixColoR)
library(sf)
library(fasterize)
library(rayshader)
library(raster)
library(exactextractr)
library(rayrender)
# load raster into R
elevation <- raster("Olympus_Mons_ortho-image.tif")
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average