Skip to content

Instantly share code, notes, and snippets.

View anthonynorth's full-sized avatar

Anthony North anthonynorth

  • Brisbane, Australia
View GitHub Profile
@anthonynorth
anthonynorth / distorted-hexagons.geojson
Last active July 22, 2019 07:08
h3 hexagons > 6 sides
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anthonynorth
anthonynorth / homework.pdf
Last active September 10, 2019 10:56
homework template
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@anthonynorth
anthonynorth / example.R
Created June 15, 2020 07:30
group_wise filter
cars %>%
group_by(speed) %>%
filter(any(dist == 2))
@anthonynorth
anthonynorth / 2.11.1.1.html
Created October 22, 2021 04:05
jgm/pandoc: data-uris crash devtools
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang xml:lang>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>deck.gl</title>
<style>
html {
line-height: 1.5;
@anthonynorth
anthonynorth / data_pipeline.R
Last active March 21, 2022 22:44
gb rivers
library(dplyr)
library(sf)
if (!file.exists("rivers_gb.rds")) {
download.file(
"https://beaver-net-app.s3.eu-west-2.amazonaws.com/gb_rivers/rivers_gb.rds",
"rivers_gb.rds"
)
}
@anthonynorth
anthonynorth / Dockerfile
Created December 20, 2023 07:53
proj dev container
FROM ghcr.io/r-lib/rig/r:latest
RUN Rscript -e 'pak::pkg_install(c("devtools", "languageserver"))'
ARG PROJ_VERSION=6.3.1
RUN apt-get -y update -y && \
apt-get -y install build-essential software-properties-common cmake \
libsqlite3-dev sqlite3 libtiff5-dev curl libcurl4-openssl-dev && \
curl -Ls https://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz | \
tar xz --strip-components=1 --one-top-level=/libproj && \
@anthonynorth
anthonynorth / quietly.md
Last active March 8, 2024 08:08
quietly
quietly <- function(fn) {
  # obvs not required in purrr namespace
  capture_output <- purrr:::capture_output

  rlang::new_function(
    rlang::fn_fmls(fn),
    rlang::expr(capture_output(!!rlang::fn_body(fn)))
  )
}