This file contains hidden or 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
| addGlobeControl = function(map) { | |
| let globecontrol = new maplibregl.GlobeControl(); | |
| map.addControl(globecontrol); | |
| return map; | |
| } |
This file contains hidden or 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
| addDeckGlPolygons = function(map, geom_column_name, layerId) { | |
| let gaDeckLayers = window["@geoarrow/deck"]["gl-layers"]; | |
| let data_fl = document.getElementById(layerId + '-1-attachment'); | |
| fetch(data_fl.href) | |
| .then(result => Arrow.tableFromIPC(result)) | |
| .then(arrow_table => { | |
| let geoArrowPolygon = new gaDeckLayers.GeoArrowPolygonLayer({ | |
| id: layerId, |
This file contains hidden or 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
| add_deckgl_polygons = function( | |
| map | |
| , data | |
| , layerId | |
| , geom_column_name = attr(data, "sf_column") | |
| ) { | |
| path_layer = tempfile() | |
| dir.create(path_layer) | |
| path_layer = paste0(path_layer, "/", layerId, "_layer.arrow") |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder