Skip to content

Instantly share code, notes, and snippets.

View jlacko's full-sized avatar
🦜
wrrritin' pirrrate code, arrr!

Jindra Lacko jlacko

🦜
wrrritin' pirrrate code, arrr!
View GitHub Profile
@jlacko
jlacko / SOZip.R
Last active September 21, 2026 20:07 — forked from kadyb/SOZip.R
Comparison of read performance for compressed GeoPackage using SOZip
library("sf")
library("zip")
set.seed(1)
n = 500000
df = data.frame(x = runif(n, 160000, 877000), y = runif(n, 126000, 780000))
df = st_as_sf(df, coords = c("x", "y"), crs = "EPSG:2180")
buff = st_buffer(df, dist = 5000)
# ====================================================================
@jlacko
jlacko / map_projections.R
Last active March 23, 2021 08:01 — forked from DavZim/map_projections.R
Creates a gif of the world in different map projections
library(tidyverse)
library(sf)
library(giscoR)
library(gganimate)
# world, with Greenland and Congo (roughly equal in area) in red
world <- gisco_get_countries(resolution = "20") %>%
mutate(color = ifelse(CNTR_ID %in% c('GL', 'CD'), 'red', 'black')) %>%
group_by(color) %>%
summarise() %>%