Created by Ryan Hafen
library(rbokeh)
url <- 'https://raw.githubusercontent.com/weinfz/nba_shot_value_charts/master/court.png'
# image is 1155 wide x 993 high
aspect <- 993 / 1155
library(shiny) | |
MAX <- 200 | |
shinyServer(function(input, output) { | |
# input$nInputs will be changed infrequently | |
# but input$dummy will be changed frequently | |
nInputs <- reactive(function() { | |
# it would be nice to be able add some code here |
test |
x | y | |
---|---|---|
53.8815367264149 | 411.436319810874 | |
-219.24469668437 | 243.552532150571 | |
-216.749025691947 | 228.528592776184 | |
-244.301233448298 | 253.585129540112 | |
-246.821861150645 | 276.145995311617 | |
-196.708787622789 | 318.722142442355 | |
186.676190233249 | 248.568830845342 | |
26.3043722601395 | 411.436319810874 | |
-186.676190233249 | 180.911190240751 |
<head> | |
<script src="http://cdn.pydata.org/bokeh/release/bokeh-0.8.1.min.js"></script> | |
<link href="http://cdn.pydata.org/bokeh/release/bokeh-0.8.1.min.css" rel="stylesheet"> | |
</head> | |
<div id=08fd29cc51d3761133a159ca4f697be5 class="plotdiv"></div> | |
<script type="text/javascript"> | |
Bokeh.$(function() { | |
var modelid = "a57e43d6b7e067caeaa2a9159e4e5d59"; |
library(Rhipe) | |
rhinit() | |
rhoptions(zips = "/ln/share/RhipeLib.tar.gz") | |
rhoptions(runner = "sh ./RhipeLib/library/Rhipe/bin/RhipeMapReduce.sh") | |
rhoptions(file.types.remove.regex = "(/_meta|/_rh_meta|/_outputs|/_SUCCESS|/_LOG|/_log|rhipe_debug|rhipe_merged_index_db)") | |
hdfs.setwd("/ln/rhafen") | |
library(datadr) | |
housing <- drRead.csv(hdfsConn("/tmp/housing/", type = "text"), |
## installation | |
##--------------------------------------------------------- | |
install.packages("devtools") # if not installed | |
devtools::install_github("tesseradata/datadr") | |
devtools::install_github("tesseradata/trelliscope") | |
devtools::install_github("hafen/housingData") | |
devtools::install_github("bokeh/rbokeh") | |
## quick trelliscope example |
"long","lat","group","color" | |
-86.496774,32.344437,"0.1","#7F7FFF" | |
-86.717897,32.402814,"0.1","#7F7FFF" | |
-86.814912,32.340803,"0.1","#7F7FFF" | |
-86.890581,32.502974,"0.1","#7F7FFF" | |
-86.917595,32.664169,"0.1","#7F7FFF" | |
-86.71339,32.661732,"0.1","#7F7FFF" | |
-86.714219,32.705694,"0.1","#7F7FFF" | |
-86.413116,32.707386,"0.1","#7F7FFF" | |
-86.411172,32.409937,"0.1","#7F7FFF" |
Created by Ryan Hafen
library(rbokeh)
url <- 'https://raw.githubusercontent.com/weinfz/nba_shot_value_charts/master/court.png'
# image is 1155 wide x 993 high
aspect <- 993 / 1155
Created by Ryan Hafen
library(rbokeh)
url <- 'https://raw.githubusercontent.com/weinfz/nba_shot_value_charts/master/court.png'
p <- figure(width = 600, height = 600 * aspect, padding_factor = 0,
xlab = NULL, ylab = NULL) %>%
ly_image_url(x = -300, y = -20, url = url, w = 600, h = 440, anchor = 'bottom_left') %>%
Created by Ryan Hafen
library(rbokeh)
url <- 'https://raw.githubusercontent.com/weinfz/nba_shot_value_charts/master/court.png'
p <- figure(width = 600, height = 600 * aspect, padding_factor = 0,
xlab = NULL, ylab = NULL) %>%
ly_image_url(x = -300, y = -20, url = url, w = 600, h = 440, anchor = 'bottom_left') %>%