Skip to content

Instantly share code, notes, and snippets.

Avatar

timelyportfolio timelyportfolio

View GitHub Profile
View reactiveLayer.R
library(leaflet)
map = leaflet() %>%
addTiles()
m = htmlwidgets::onRender(
map,
jsCode = htmlwidgets::JS(
"function(el,x,data){
var map = this;
View package_strip_urls.R
# process:
# - make a new branch: git checkout -b some-branch
# - run this script: Rscript path/to/package_strip_urls.R
# - update manual files and make sure package passes check
# - submit to cran
# - after accepted on cran - delete some-branch
have_pkg <- function(pkg) {
if (!requireNamespace(pkg, quietly = TRUE)) stop("need package ", pkg)
}
@texodus
texodus / .block
Last active Aug 17, 2020
regular-table / Spreadsheet
View .block
license: apache-2.0
@texodus
texodus / .block
Last active Aug 17, 2020
regular-table / File Browser
View .block
license: apache-2.0
@texodus
texodus / .block
Last active Aug 17, 2020
regular-table / Perspective
View .block
license: apache-2.0
@texodus
texodus / .block
Last active Aug 17, 2020
regular-table / Canvas Data Model
View .block
license: apache-2.0
height: 800
@texodus
texodus / .block
Last active Sep 21, 2020
Perspective / Superstore Example
View .block
license: apache-2.0
@texodus
texodus / .block
Last active Sep 21, 2020
Perspective Datagrid / Custom Style Example
View .block
license: apache-2.0
@jcheng5
jcheng5 / addDynamicTiles.R
Created Jan 19, 2019
Leaflet dynamic tiles
View addDynamicTiles.R
library(shiny)
library(leaflet)
#' Add a tile layer whose source is an R function
#'
#' @param tileFunc A function(x, y, z) that returns a 256x256 image object
#' suitable for passing to `png::writePNG`.
#' @seealso [leaflet::addTiles()] for other parameters
addDynamicTiles <- function(map, tileFunc,
layerId = paste0("leafletRaster", sample.int(9999999, 1)),
@domoritz
domoritz / .block
Last active Jan 8, 2020
Vega-Lite with Websockets
View .block
license: bsd-3-clause