Skip to content

Instantly share code, notes, and snippets.

Avatar

Victor Perrier pvictor

View GitHub Profile
@pvictor
pvictor / linked-tooltip-billboarder-bar
Last active Aug 21, 2018
Linked tooltip between barcharts in {billboarder} https://github.com/dreamRs/billboarder
View linked-tooltip-billboarder-bar
# on CRAN now (version 0.2.3)
library(billboarder)
# data
data("prod_par_filiere")
# helper fun
make_bar <- function(year, show_y_axis = TRUE) {
@pvictor
pvictor / linked-tooltip-billboarder
Last active Aug 21, 2018
Linked tooltip between charts in {billboarder} https://github.com/dreamRs/billboarder
View linked-tooltip-billboarder
# on CRAN now (version 0.2.3)
library(billboarder)
# data
data("economics", package = "ggplot2")
# helper fun
make_line <- function(var, title, percent = TRUE) {
billboarder() %>%
bb_linechart(data = economics[, c("date", var)]) %>%
View billboarder-donut-title
library(billboarder)
dat <- data.frame(
lib = c("A", "B", "C"),
value = c(34, 54, 62)
)
# Donut title
billboarder() %>%
bb_donutchart(dat) %>%
@pvictor
pvictor / module_choix_groupes.R
Created Apr 12, 2018
Module Shiny pour définir des groupes
View module_choix_groupes.R
# ------------------------------------------------------------------------
#
# Title : Module choix groupe
# By : Vic
# Date : 2018-04-12
#
# ------------------------------------------------------------------------
@pvictor
pvictor / selectize-remove_button.R
Created May 6, 2017
Add a remove button to each item of a selectize input
View selectize-remove_button.R
library(shiny)
ui <- fluidPage(
selectizeInput("select", "Select", c(),
multiple = TRUE, options = list(
'plugins' = list('remove_button'),
'create' = TRUE,
'persist' = FALSE)
),
textOutput("out")
)
@pvictor
pvictor / bb8_with_ggplot2.R
Created Apr 25, 2016
A Star Wars BB-8 with ggplot2 !
View bb8_with_ggplot2.R
# BB-8 --------------------------------------------------------------------
# Inspired by Brian Hough in http://codepen.io/bhough/pen/wawrPL
# Packages ----------------------------------------------------------------
library("dplyr")
library("ggplot2")
View france_ggiraph.R
# France map with ggiraph -------------------------------------------------
#### Packages ####
library("ggplot2")
library("ggiraph")
library("ggthemes")
library("rgdal")
library("readxl")
View server.R
library(shiny)
shinyServer(function(input, output) {
sortie<-NULL
sortie <- reactive({
if (input$click1>0) {data.frame(rnorm(10), rexp(10))}
})
output$click.feeback1 <- renderText({
You can’t perform that action at this time.