Skip to content

Instantly share code, notes, and snippets.

View mbannert's full-sized avatar

Matt Bannert mbannert

View GitHub Profile
@trestletech
trestletech / server.R
Last active February 2, 2022 09:47
A Shiny app combining the use of dplyr and SQLite. The goal is to demonstrate a full-fledged, database-backed user authorization framework in Shiny.
library(shiny)
library(dplyr)
library(lubridate)
# Load libraries and functions needed to create SQLite databases.
library(RSQLite)
library(RSQLite.extfuns)
saveSQLite <- function(data, name){
path <- dplyr:::db_location(filename=paste0(name, ".sqlite"))
@semerj
semerj / pretty-pie.R
Last active January 3, 2016 10:38
Pretty pie charts using k-means clustering of images in R
# adapted from http://is-r.tumblr.com/post/36660147376/dominant-color-palettes-with-k-means
library(ggplot2)
library(reshape2)
library(EBImage)
imageLoader <- function(lib) {
rd <- readImage(lib)
longImage <- melt(rd)
rgbImage <- reshape(longImage, timevar="Var3", idvar=c("Var1", "Var2"), direction="wide")
@rxaviers
rxaviers / gist:7360908
Last active June 14, 2024 18:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 13, 2024 10:59
A badass list of frontend development resources I collected over time.
@wch
wch / app.r
Last active December 18, 2023 16:41
Shiny example app with dynamic number of plots
max_plots <- 5
ui <- fluidPage(
headerPanel("Dynamic number of plots"),
sidebarPanel(
sliderInput("n", "Number of plots", value=1, min=1, max=5)
),
@wch
wch / server.r
Last active September 8, 2023 20:25
Shiny example: dynamic input fields
data_sets <- c("mtcars", "morley", "rock")
shinyServer(function(input, output) {
# Drop-down selection box for which data set
output$choose_dataset <- renderUI({
selectInput("dataset", "Data set", as.list(data_sets))
})
# Check boxes
@mbostock
mbostock / .block
Last active August 1, 2023 07:29
Hierarchical Bar Chart
license: gpl-3.0
redirect: https://observablehq.com/@d3/hierarchical-bar-chart
@mbostock
mbostock / .block
Last active March 29, 2023 23:39
Collapsible Indented Tree
license: gpl-3.0
redirect: https://observablehq.com/@d3/indented-tree