Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| var d3 = require('d3') | |
| , _ = require('underscore') | |
| , w = window.innerWidth | |
| , h = window.innerHeight - 100 | |
| , tempo = 500 | |
| // , data = { | |
| // 'Derek Jeter' : { | |
| // '1995' : [12, 48] | |
| // , '1996' : [183, 582] | |
| // } |
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
| require(gdata) | |
| require("RCurl") | |
| require("XML") | |
| AtcSearch <- function(AtcCodes){ | |
| #Function inside a function is bad practice... | |
| #DummySearch searches for one atc code | |
| DummySearch <- function(Code){ | |
| #A link to WHO search |
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
| SankeyR <- function(inputs, losses, unit, labels, format="plot"){ | |
| ######################## | |
| # SankeyR version 1.01 (updated August 10, 2010) | |
| # is a function for creating Sankey Diagrams in R. | |
| # See http://www.sankey-diagrams.com for excellent examples of Sankey Diagrams. | |
| # | |
| # OPTIONS: | |
| # 'inputs' is a vector of input values | |
| # 'losses' is a vector of loss values | |
| # 'unit' is a string of the unit |