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(mapview) | |
library(leafem) | |
library(leaflet) | |
library(sf) | |
library(geojsonsf) | |
franc_ext <- unname(as.vector(st_bbox(franconia))) | |
francgj = geojsonsf::sf_geojson(franconia) | |
leaflet() |> |
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
--- | |
title: "snappy decompression issue" | |
--- | |
```{r} | |
#| message: false | |
library(reticulate) | |
library(ggplot2) | |
library(arrow) |
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/bash | |
url="/vsicurl/https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.20220608/conus/hrrr.t00z.wrfsfcf00.grib2" | |
bnds="-b 62 -b 77 -b 78 -b 79 -b 9 -b 71 -b 74 -b 75 -b 107 -b 112 -b 150 -b 105 -b 106 -b 124 -b 123 -b 126 -b 125" | |
ext="-2097264.0 -2088264.0 713109.3 722109.3" | |
dmsn="9 9" | |
prj="EPSG:9001" | |
ofl="/home/tim/Downloads/novsi.tif" |
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/bash | |
url="https://noaa-hrrr-bdp-pds.s3.amazonaws.com/hrrr.20220608/conus/hrrr.t00z.wrfsfcf00.grib2" | |
bnds="-b 62 -b 77 -b 78 -b 79 -b 9 -b 71 -b 74 -b 75 -b 107 -b 112 -b 150 -b 105 -b 106 -b 124 -b 123 -b 126 -b 125" | |
ext="-2097264.0 -2088264.0 713109.3 722109.3" | |
dmsn="9 9" | |
prj="EPSG:9001" | |
ofl="/home/tim/Downloads/novsi.tif" |
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(leaflet) | |
library(leafpop) | |
## using a custom css to style the table | |
className = "my-popup" | |
css = list( | |
"background" = "#ff00ff" | |
) |
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(leaflet) | |
map = leaflet() %>% | |
addTiles() | |
m = htmlwidgets::onRender( | |
map, | |
jsCode = htmlwidgets::JS( | |
"function(el,x,data){ | |
var map = this; |
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
combiner = function(x, y = x) { | |
out = vector("list"); n = 1 | |
for (i in x) { | |
for (j in y) { | |
# if (i %in% j) { | |
# next | |
# } | |
out[[n]] = c(i, j) | |
n = n + 1 |
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
# This will watch your global environment for sf objects and mapview them automagically. | |
library(later) | |
library(mapview) | |
last_value = NULL | |
dir <- tempfile() | |
dir.create(dir) | |
htmlFile <- file.path(dir, "index.html") |
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(ggplot2) | |
library(leafgl) | |
library(leaflet) | |
library(sf) | |
sfx <- sf::st_transform(sf::st_cast(dplyr::filter(silicate::inlandwaters, Province == "Tasmania"), "POLYGON")[2, ], 4326) | |
topo <- ceramic::cc_elevation(sfx, zoom = 9) | |
mesh <- anglr::as.mesh3d(anglr::copy_down(anglr::DEL(sfx, max_area = .0001), |
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(V8) | |
library(mapview) | |
library(geojsonsf) | |
ct = v8(global="window") | |
ct$source("https://cdn.jsdelivr.net/npm/[email protected]/dist/flatgeobuf-geojson.min.js") | |
ct$get("Object.keys(window)") | |
fran = sf_geojson(franconia[1, ]) |
NewerOlder