gmap(lat = 40.73306, lng = -73.97351, zoom = 12,
width = 680, height = 600, map_type = "roadmap") %>%
ly_points(lon, lat, data = bike, hover = c(station, n_start, n_end))
gmap(lat = 40.73306, lng = -73.97351, zoom = 12,
width = 680, height = 600,
map_style = gmap_style("blue_water")) %>%
ly_points(lon, lat, data = bike, hover = c(station, n_start, n_end))
style <- '[{"featureType":"administrative","elementType":"all","stylers":[{"hue":"#ffffff"},{"lightness":100},{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"on"}]},{"featureType":"poi","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"road","elementType":"geometry","stylers":[{"hue":"#000000"},{"saturation":-100},{"lightness":-100},{"visibility":"simplified"}]},{"featureType":"road","elementType":"labels","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"lightness":100},{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"hue":"#000000"},{"lightness":-100},{"visibility":"on"}]},{"featureType":"transit","elementType":"labels","stylers":[{"hue":"#ffffff"},{"lightness":100},{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"hue":"#ffffff"},{"saturation":-100},{"light
cdist <- read.csv("https://gist.githubusercontent.com/hafen/a447521ff8b24ddefba5/raw/044e174d7b9e6a370fff429f9cda4d0903b4c0a6/communitydistricts.csv")
bike$diff <- bike$n_start - bike$n_end
bike$color = ifelse(bike$diff > 0, "#2CA02C", "#D62728")
gmap(lat = 40.73306, lng = -73.97351, zoom = 12,
width = 680, height = 600, map_style = gmap_style("blue_water")) %>%
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
# devtools::install_github("bokeh/rbokeh@dev") | |
library("shiny") | |
library("rbokeh") | |
dat <- data.frame(x = rnorm(10), y = rnorm(10)) | |
ui <- fluidPage( | |
rbokehOutput("rbokeh", width = 500, height = 540), | |
strong("x range change event:"), |
dat <- data.frame(x = runif(500), y = runif(500))
p <- figure(title = "select points to adjust mean line",
tools = "lasso_select") %>%
ly_points(x, y, data = dat, lname = "points") %>%
ly_lines(x = c(0, 1), y = rep(mean(dat$y), 2), line_width = 6,
color = "orange", alpha = 0.75, lname = "mean")
D <- data.frame(
x = c(2, 3, 5, 6, 8, 7),
y = c(6, 4, 3, 8, 7, 5))
links <- list(
"0" = c(1, 2),
"1" = c(0, 3, 4),
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
"x","y","f1","f2" | |
-1.20706574938542,-1.81689753163211,"d1",-1 | |
0.27742924211066,0.627166843904992,"d1",3 | |
1.08444117668306,0.518092102643454,"d1",3 | |
-2.34569770262935,0.140921830082034,"d1",-3 | |
0.42912468881105,1.45727194611984,"d1",3 | |
0.506055892157574,-0.49359652203013,"d1",1 | |
-0.574739960134649,-2.12224406186793,"d1",-1 | |
-0.546631855784187,-0.133566601258707,"d1",-1 | |
-0.564451999093283,-0.427600353483175,"d1",-1 |
figure() %>%
ly_points(x, y, data = dat)
figure(lod_threshold = 100) %>%
ly_points(x, y, data = dat)