library(terra)
#> terra 1.5.34
r <- rast("/vsicurl/https://dapds00.nci.org.au/thredds/fileServer/gb6/BRAN/BRAN2020/daily/ocean_u_2010_01.nc", lyrs = 1:10)
crs(r) <- "EPSG:4326"
e <- ext(c(xmin = 104, xmax = 138, ymin = 13, ymax = 32))
## set up a lower resolution
target_rast <- crop(rast(r), e)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Written by: Keefer Rourke <https://krourke.org> | |
# Based on AUR package <https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ttf-google-fonts-git> | |
# dependancies: fonts-cantarell, ttf-ubuntu-font-family, git | |
sudo apt-get install fonts-cantarell ttf-ubuntu-font-family git | |
srcdir="/tmp/google-fonts" | |
pkgdir="/usr/share/fonts/truetype/google-fonts" | |
giturl="git://github.com/google/fonts.git" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(rlang) | |
library(glue) | |
# string to append to variable name | |
suffix <- "A" | |
# example data frame | |
dat <- tibble(x = 1:5) %>% | |
# create new variable with walrus operator |
library(graticule)
lons <- seq(-80, -40, by = 5)
lats <- seq(77, 84.5, by = .5)
latpts <- cbind(min(lons), lats)
lonpts <- cbind(lons, min(lats))
prj <- "+proj=laea +lat_0=90 +lon_0=-60"
xy_lon <- sf::sf_project(pts = lonpts, to = prj, from = "OGC:CRS84")
xy_lat <- sf::sf_project(pts = latpts, to = prj, from = "OGC:CRS84")