Skip to content

Instantly share code, notes, and snippets.

View mjcull's full-sized avatar

Matt Cull mjcull

View GitHub Profile
# DuckDB Vector Tiles with mapgl Example
# This script demonstrates how to serve vector tiles from DuckDB using ST_AsMVT()
# and display them in a mapgl map using httpuv
library(mapgl)
library(duckdb) # Requires the latest DuckDB version (>= 1.4.0)
library(httpuv)
library(sf)
library(duckspatial)
library(tigris)
library(tidyverse)
#pbinom(q, size, prob, lower.tail = TRUE, log.p = FALSE)
# Probability of 1, 1% flood in 100 years
dbinom(1, size = 100, prob = 0.01, log = FALSE)
choose(100,1) *0.01^1*0.99^99