This bar chart visualizes hierarchical data using D3. Each blue bar represents a folder, whose length encodes the total size of all files in that folder (and all subfolders). Clicking on a bar dives into that folder, while clicking on the background bubbles back up to the parent folder. The effect is similar to a zoomable partition layout, though in a more conventional display.
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
# Variables to loop | |
vars <- c("var1", "var2") | |
# Generate a list of functions (specific for each variable) | |
var_methods <- lapply(vars, function(i){ | |
fun <- function(var = i) paste("This is", var) | |
formals(fun)$var <- i | |
return(fun) | |
}) | |
names(var_methods) <- vars |
This is an example app of how to make use of the new feature - click and hover on static plots - in Shiny.
For more information, see: rstudio/shiny#183.
Other examples:
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script> | |
<script src='http://code.highcharts.com/modules/exporting.js' type='text/javascript'></script> | |
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
cData <- read.table(textConnection(" | |
no Grade Count | |
1 01 40272 | |
2 02 36902 | |
3 03 1288 | |
4 04 992 | |
5 05 517 | |
6 K 334 | |
7 KA 8236 | |
8 KP 6704"), sep = '', header = T |
Data för de olika indexen har hämtats från SCB:s API för Statistikdatabasen. Utifrån dessa har sedan de alternativa prisbasbeloppen beräknats.
Data för de olika indexen har hämtats från SCB:s API för Statistikdatabasen. Utifrån dessa har sedan de alternativa prisbasbeloppen beräknats.
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='http://cdn.oesmith.co.uk/morris-0.4.2.min.css'> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script> | |
<script src='http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js' type='text/javascript'></script> | |
<script src='http://cdn.oesmith.co.uk/morris-0.4.2.min.js' type='text/javascript'></script> | |
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<script src='http://d3js.org/d3.v3.min.js' type='text/javascript'></script> | |
<script src='http://dimplejs.org/dist/dimple.v1.min.js' type='text/javascript'></script> | |
<style> | |
.rChart { |
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
<!doctype HTML> | |
<meta charset = 'utf-8'> | |
<html> | |
<head> | |
<link rel='stylesheet' href='http://cdn.oesmith.co.uk/morris-0.4.2.min.css'> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js' type='text/javascript'></script> | |
<script src='http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js' type='text/javascript'></script> | |
<script src='http://cdn.oesmith.co.uk/morris-0.4.2.min.js' type='text/javascript'></script> | |