Skip to content

Instantly share code, notes, and snippets.

View rCarto's full-sized avatar
🛠️
...

Timothée Giraud rCarto

🛠️
...
View GitHub Profile
@camriddell
camriddell / collect_univariates.py
Last active March 8, 2024 20:56
A collection of univariate plots
from functools import partial
from textwrap import fill
from scipy.stats import norm, uniform, skewnorm, gaussian_kde, triang
from numpy import (
array, linspace, quantile, histogram, atleast_2d, mean, std, add
)
from numpy.lib.stride_tricks import sliding_window_view
from matplotlib.pyplot import subplots, show, rc
@h-a-graham
h-a-graham / to-generic-projected.R
Last active October 25, 2024 09:55
An R function to convert an sf/sfc object to an appropriate utm or laea projection.
#' Project an sf/sfc object to a generic projected coordinate system
#' @param x an sf or sfc object
#' @param proj a character vector. The projection to use. One of "laea", "aeqd",
#' "utm", "pconic", or "eqdc".
#' @param ellps a character vector. The ellipsoid to use. Select from
#' `sf_proj_info(type = "ellps")`.
#' @param opts a character vector. Additional proj options to pass to the
#' proj string. see details for more information.
#' @return an sf or sfc object
#' @details For further info about the available "generic" projects see: